protected Type[] getParameterTypes(String method) { if (method != null) { JsonRpcMethod jsonRpcMethod = handler.getJsonRpcMethod(method); if (jsonRpcMethod != null) return jsonRpcMethod.getParameterTypes(); } return EMPTY_TYPE_ARRAY; }
@Override public String toString() { return MessageJsonHandler.toString(this); } }
public StandardLauncher(StreamMessageProducer reader, MessageConsumer messageConsumer, ExecutorService execService, T remoteProxy, RemoteEndpoint remoteEndpoint) { this(execService, remoteProxy, remoteEndpoint, new ConcurrentMessageProcessor(reader, messageConsumer)); }
public static JsonRpcMethod request(String name, Type returnType, TypeAdapterFactory returnTypeAdapterFactory, Type... parameterTypes) { return new JsonRpcMethod(name, parameterTypes, returnType, returnTypeAdapterFactory, false); }
@Override public boolean cancel(boolean mayInterruptIfRunning) { if (mayInterruptIfRunning) { messageProducer.close(); } return result.cancel(mayInterruptIfRunning); }
@Override public Future<Void> startListening() { return ConcurrentMessageProcessor.startProcessing(reader, messageConsumer, execService); }
@Override public Future<Void> startListening() { return msgProcessor.beginProcessing(execService); }
protected Type[] getParameterTypes(String method) { if (method != null) { JsonRpcMethod jsonRpcMethod = handler.getJsonRpcMethod(method); if (jsonRpcMethod != null) return jsonRpcMethod.getParameterTypes(); } return EMPTY_TYPE_ARRAY; }
@Override public String toString() { return MessageJsonHandler.toString(this); }
public static JsonRpcMethod request(String name, Type returnType, Type... parameterTypes) { return new JsonRpcMethod(name, parameterTypes, returnType, null, false); }
/** * Create a message processor given the provided parameters. * * Clients may override this method to create a message processor * with an expanded feature set. * * @param reader - A message producer capable of receiving messages from clients * @param messageConsumer - A message consumer capable of passing completed messages to the local service * @param remoteProxy - The remote proxy for communicating with the connecting client * @return A ConcurrentMessageProcessor capable of linking an incoming request to the local service's implementation */ protected ConcurrentMessageProcessor createMessageProcessor(MessageProducer reader, MessageConsumer messageConsumer, T remoteProxy) { return new ConcurrentMessageProcessor(reader, messageConsumer); }
@Override public String toString() { return MessageJsonHandler.toString(this); }
public static JsonRpcMethod request(String name, Type returnType, TypeAdapterFactory returnTypeAdapterFactory, Type... parameterTypes) { return new JsonRpcMethod(name, parameterTypes, returnType, returnTypeAdapterFactory, false); }
@Override public String toString() { return MessageJsonHandler.toString(this); }
public static JsonRpcMethod notification(String name, Type... parameterTypes) { return new JsonRpcMethod(name, parameterTypes, Void.class, null, true); }
@Override public String toString() { return MessageJsonHandler.toString(this); }
public static JsonRpcMethod request(String name, Type returnType, Type... parameterTypes) { return new JsonRpcMethod(name, parameterTypes, returnType, null, false); }
@Override public String toString() { return MessageJsonHandler.toString(this); }
public static JsonRpcMethod notification(String name, Type... parameterTypes) { return new JsonRpcMethod(name, parameterTypes, Void.class, null, true); }
@Override public String toString() { return MessageJsonHandler.toString(this); }