Search in sources :

Example 1 with FinishedMessage

use of org.jowidgets.invocation.common.impl.FinishedMessage in project jo-client-platform by jo-source.

the class InvocationCallbackMessageReceiver method onMessage.

@Override
public void onMessage(final Object message, final IMessageChannel replyChannel) {
    if (message instanceof AcknowledgeMessage) {
        final AcknowledgeMessage acknowledgeMessage = (AcknowledgeMessage) message;
        invocationClient.registerAcknowledge(acknowledgeMessage.getInvocationId(), replyChannel);
    } else if (message instanceof FinishedMessage) {
        invocationClientServiceRegistry.onFinished((FinishedMessage) message);
    } else if (message instanceof ExceptionMessage) {
        invocationClientServiceRegistry.onException((ExceptionMessage) message);
    } else if (message instanceof InterimResponseMessage) {
        invocationClientServiceRegistry.onInterimResponse((InterimResponseMessage) message);
    } else if (message instanceof InterimRequestMessage) {
        final InterimRequestMessage interimRequestMessage = (InterimRequestMessage) message;
        invocationClient.registerInterimRequest(interimRequestMessage.getInvocationId(), interimRequestMessage.getRequestId(), replyChannel);
        invocationClientServiceRegistry.onInterimRequest((InterimRequestMessage) message);
    }
}
Also used : ExceptionMessage(org.jowidgets.invocation.common.impl.ExceptionMessage) InterimResponseMessage(org.jowidgets.invocation.common.impl.InterimResponseMessage) InterimRequestMessage(org.jowidgets.invocation.common.impl.InterimRequestMessage) AcknowledgeMessage(org.jowidgets.invocation.common.impl.AcknowledgeMessage) FinishedMessage(org.jowidgets.invocation.common.impl.FinishedMessage)

Aggregations

AcknowledgeMessage (org.jowidgets.invocation.common.impl.AcknowledgeMessage)1 ExceptionMessage (org.jowidgets.invocation.common.impl.ExceptionMessage)1 FinishedMessage (org.jowidgets.invocation.common.impl.FinishedMessage)1 InterimRequestMessage (org.jowidgets.invocation.common.impl.InterimRequestMessage)1 InterimResponseMessage (org.jowidgets.invocation.common.impl.InterimResponseMessage)1