use of org.jowidgets.invocation.common.impl.MethodInvocationMessage in project jo-client-platform by jo-source.
the class InvocationClientImpl method getMethod.
@Override
public IMethod getMethod(final String methodName) {
return new IMethod() {
@Override
public void invoke(final Object invocationId, final Object parameter) {
final MethodInvocationMessage message = new MethodInvocationMessage(invocationId, methodName, parameter);
messageChannel.send(message, new ExceptionCallback(invocationClientServiceRegistry, invocationId));
}
};
}
use of org.jowidgets.invocation.common.impl.MethodInvocationMessage in project jo-client-platform by jo-source.
the class InvocationServerMessageReceiver method onMessage.
@Override
public void onMessage(final Object message, final IMessageChannel replyChannel) {
if (message instanceof MethodInvocationMessage) {
final MethodInvocationMessage invocationMessage = (MethodInvocationMessage) message;
final Object invocationId = invocationMessage.getInvocationId();
invocationServer.registerInvocation(invocationId, replyChannel);
invocationServerServiceRegistry.onMethodInvocation((MethodInvocationMessage) message);
} else if (message instanceof CancelMessage) {
final CancelMessage cancelMessage = (CancelMessage) message;
invocationServerServiceRegistry.onCancel(cancelMessage);
invocationServer.unregisterInvocation(cancelMessage.getInvocationId());
} else if (message instanceof ResponseMessage) {
invocationServerServiceRegistry.onResponse((ResponseMessage) message);
}
}
Aggregations