@Override
    public void onReceive(Object message) throws Exception {
        final Class<?> klass = message.getClass();
        final ActorRef self = self();
        final ActorRef sender = sender();
        final State state = fsm.state();

        if(logger.isInfoEnabled()) {
            logger.info("********** Bridge Controller " + self().path() + " State: \"" + state.toString());
            logger.info("********** Bridge Controller " + self().path() + " Processing: \"" + klass.getName() + " Sender: "
                + sender.path());
        }

        if (Observe.class.equals(klass)) {
            onObserve((Observe) message, self, sender);
        } else if (StopObserving.class.equals(klass)) {
            onStopObserving((StopObserving) message, self, sender);
        } else if (CreateMediaSession.class.equals(klass)) {
            onCreateMediaSession((CreateMediaSession) message, self, sender);
        } else if (JoinCall.class.equals(klass)) {
            onJoinCall((JoinCall) message, self, sender);
        } else if (Stop.class.equals(klass)) {
            onStop((Stop) message, self, sender);
        } else if (MediaGatewayResponse.class.equals(klass)) {
            onMediaGatewayResponse((MediaGatewayResponse<?>) message, self, sender);
        } else if (MediaGroupStateChanged.class.equals(klass)) {
            onMediaGroupStateChanged((MediaGroupStateChanged) message, self, sender);
        } else if (StartRecording.class.equals(klass)) {
            onStartRecording((StartRecording) message, self, sender);
        }  else if(EndpointStateChanged.class.equals(klass)) {
            onEndpointStateChanged((EndpointStateChanged) message, self, sender);
        } else if (MediaResourceBrokerResponse.class.equals(klass)) {
            onMediaResourceBrokerResponse((MediaResourceBrokerResponse<?>) message, self, sender);
        } else if (MediaGroupResponse.class.equals(klass)) {
            onMediaGroupResponse((MediaGroupResponse)message);
        }
    }
@ Override public void onReceive ( Object message ) throws Exception { final Class < ? > klass = message . getClass ( ) ; final ActorRef self = self ( ) ; final ActorRef sender = sender ( ) ; final State state = fsm . state ( ) ; if ( logger . isInfoEnabled ( ) ) { logger . info ( "********** Bridge Controller " + self ( ) . path ( ) + " State: \"" + state . toString ( ) ) ; logger . info ( "********** Bridge Controller " + self ( ) . path ( ) + " Processing: \"" + klass . getName ( ) + " Sender: " + sender . path ( ) ) ; } if ( Observe . class . equals ( klass ) ) { onObserve ( ( Observe ) message , self , sender ) ; } else if ( StopObserving . class . equals ( klass ) ) { onStopObserving ( ( StopObserving ) message , self , sender ) ; } else if ( CreateMediaSession . class . equals ( klass ) ) { onCreateMediaSession ( ( CreateMediaSession ) message , self , sender ) ; } else if ( JoinCall . class . equals ( klass ) ) { onJoinCall ( ( JoinCall ) message , self , sender ) ; } else if ( Stop . class . equals ( klass ) ) { onStop ( ( Stop ) message , self , sender ) ; } else if ( MediaGatewayResponse . class . equals ( klass ) ) { onMediaGatewayResponse ( ( MediaGatewayResponse < ? > ) message , self , sender ) ; } else if ( MediaGroupStateChanged . class . equals ( klass ) ) { onMediaGroupStateChanged ( ( MediaGroupStateChanged ) message , self , sender ) ; } else if ( StartRecording . class . equals ( klass ) ) { onStartRecording ( ( StartRecording ) message , self , sender ) ; } else if ( EndpointStateChanged . class . equals ( klass ) ) { onEndpointStateChanged ( ( EndpointStateChanged ) message , self , sender ) ; } else if ( MediaResourceBrokerResponse . class . equals ( klass ) ) { onMediaResourceBrokerResponse ( ( MediaResourceBrokerResponse < ? > ) message , self , sender ) ; } else if ( MediaGroupResponse . class . equals ( klass ) ) { onMediaGroupResponse ( ( MediaGroupResponse ) message ) ; } }
/*
Events