.setInput(in) .setOutput(out) .setExecutorService(executorService) .wrapMessages(wrapper) .configureGson(configureGson)
.setInput(in) .setOutput(out) .setExecutorService(executorService) .wrapMessages(wrapper) .configureGson(configureGson)
.setInput(in) .setOutput(out) .setExecutorService(executorService) .wrapMessages(wrapper) .create();
/** * Create a new Launcher for a given local service object, a given remote interface and an input and output stream. * Threads are started with the given executor service. The wrapper function is applied to the incoming and * outgoing message streams so additional message handling such as validation and tracing can be included. * The {@code configureGson} function can be used to register additional type adapters in the {@link GsonBuilder} * in order to support protocol classes that cannot be handled by Gson's reflective capabilities. * * @param localService - the object that receives method calls from the remote service * @param remoteInterface - an interface on which RPC methods are looked up * @param in - input stream to listen for incoming messages * @param out - output stream to send outgoing messages * @param validate - whether messages should be validated with the {@link ReflectiveMessageValidator} * @param executorService - the executor service used to start threads * @param wrapper - a function for plugging in additional message consumers * @param configureGson - a function for Gson configuration */ static <T> Launcher<T> createIoLauncher(Object localService, Class<T> remoteInterface, InputStream in, OutputStream out, boolean validate, ExecutorService executorService, Function<MessageConsumer, MessageConsumer> wrapper, Consumer<GsonBuilder> configureGson) { return new Builder<T>() .setLocalService(localService) .setRemoteInterface(remoteInterface) .setInput(in) .setOutput(out) .validateMessages(validate) .setExecutorService(executorService) .wrapMessages(wrapper) .configureGson(configureGson) .create(); }
/** * Create a new Launcher for a given local service object, a given remote interface and an input and output stream. * Threads are started with the given executor service. The wrapper function is applied to the incoming and * outgoing message streams so additional message handling such as validation and tracing can be included. * The {@code configureGson} function can be used to register additional type adapters in the {@link GsonBuilder} * in order to support protocol classes that cannot be handled by Gson's reflective capabilities. * * @param localService - the object that receives method calls from the remote service * @param remoteInterface - an interface on which RPC methods are looked up * @param in - input stream to listen for incoming messages * @param out - output stream to send outgoing messages * @param validate - whether messages should be validated with the {@link ReflectiveMessageValidator} * @param executorService - the executor service used to start threads * @param wrapper - a function for plugging in additional message consumers * @param configureGson - a function for Gson configuration */ static <T> Launcher<T> createIoLauncher(Object localService, Class<T> remoteInterface, InputStream in, OutputStream out, boolean validate, ExecutorService executorService, Function<MessageConsumer, MessageConsumer> wrapper, Consumer<GsonBuilder> configureGson) { return new Builder<T>() .setLocalService(localService) .setRemoteInterface(remoteInterface) .setInput(in) .setOutput(out) .validateMessages(validate) .setExecutorService(executorService) .wrapMessages(wrapper) .configureGson(configureGson) .create(); }
/** * Create a new Launcher for a given local service object, a given remote interface and an input and output stream. * Threads are started with the given executor service. The wrapper function is applied to the incoming and * outgoing message streams so additional message handling such as validation and tracing can be included. * The {@code configureGson} function can be used to register additional type adapters in the {@link GsonBuilder} * in order to support protocol classes that cannot be handled by Gson's reflective capabilities. * * @param localService - the object that receives method calls from the remote service * @param remoteInterface - an interface on which RPC methods are looked up * @param in - input stream to listen for incoming messages * @param out - output stream to send outgoing messages * @param executorService - the executor service used to start threads * @param wrapper - a function for plugging in additional message consumers * @param configureGson - a function for Gson configuration */ static <T> Launcher<T> createIoLauncher(Object localService, Class<T> remoteInterface, InputStream in, OutputStream out, ExecutorService executorService, Function<MessageConsumer, MessageConsumer> wrapper, Consumer<GsonBuilder> configureGson) { return new Builder<T>() .setLocalService(localService) .setRemoteInterface(remoteInterface) .setInput(in) .setOutput(out) .setExecutorService(executorService) .wrapMessages(wrapper) .configureGson(configureGson) .create(); }
.setInput(in) .setOutput(out) .setExecutorService(executorService) .wrapMessages(wrapper) .configureGson(configureGson)
/** * Create a new Launcher for a given local service object, a given remote interface and an input and output stream. * Threads are started with the given executor service. The wrapper function is applied to the incoming and * outgoing message streams so additional message handling such as validation and tracing can be included. * The {@code configureGson} function can be used to register additional type adapters in the {@link GsonBuilder} * in order to support protocol classes that cannot be handled by Gson's reflective capabilities. * * @param localService - the object that receives method calls from the remote service * @param remoteInterface - an interface on which RPC methods are looked up * @param in - input stream to listen for incoming messages * @param out - output stream to send outgoing messages * @param executorService - the executor service used to start threads * @param wrapper - a function for plugging in additional message consumers * @param configureGson - a function for Gson configuration */ static <T> Launcher<T> createIoLauncher(Object localService, Class<T> remoteInterface, InputStream in, OutputStream out, ExecutorService executorService, Function<MessageConsumer, MessageConsumer> wrapper, Consumer<GsonBuilder> configureGson) { return new Builder<T>() .setLocalService(localService) .setRemoteInterface(remoteInterface) .setInput(in) .setOutput(out) .setExecutorService(executorService) .wrapMessages(wrapper) .configureGson(configureGson) .create(); }
/** * Create a new Launcher for a given local service object, a given remote interface and an input and output stream. * Threads are started with the given executor service. The wrapper function is applied to the incoming and * outgoing message streams so additional message handling such as validation and tracing can be included. * * @param localService - the object that receives method calls from the remote service * @param remoteInterface - an interface on which RPC methods are looked up * @param in - input stream to listen for incoming messages * @param out - output stream to send outgoing messages * @param executorService - the executor service used to start threads * @param wrapper - a function for plugging in additional message consumers */ static <T> Launcher<T> createIoLauncher(Object localService, Class<T> remoteInterface, InputStream in, OutputStream out, ExecutorService executorService, Function<MessageConsumer, MessageConsumer> wrapper) { return new Builder<T>() .setLocalService(localService) .setRemoteInterface(remoteInterface) .setInput(in) .setOutput(out) .setExecutorService(executorService) .wrapMessages(wrapper) .create(); }
/** * Create a new Launcher for a language client and an input and output stream. Threads are started with the given * executor service. The wrapper function is applied to the incoming and outgoing message streams so additional * message handling such as validation and tracing can be included. * * @param client - the client that receives method calls from the remote server * @param in - input stream to listen for incoming messages * @param out - output stream to send outgoing messages * @param executorService - the executor service used to start threads * @param wrapper - a function for plugging in additional message consumers */ public static Launcher<LanguageServer> createClientLauncher(LanguageClient client, InputStream in, OutputStream out, ExecutorService executorService, Function<MessageConsumer, MessageConsumer> wrapper) { return new Builder<LanguageServer>() .setLocalService(client) .setRemoteInterface(LanguageServer.class) .setInput(in) .setOutput(out) .setExecutorService(executorService) .wrapMessages(wrapper) .create(); }
/** * Create a new Launcher for a language server and an input and output stream. Threads are started with the given * executor service. The wrapper function is applied to the incoming and outgoing message streams so additional * message handling such as validation and tracing can be included. * * @param server - the server that receives method calls from the remote client * @param in - input stream to listen for incoming messages * @param out - output stream to send outgoing messages * @param executorService - the executor service used to start threads * @param wrapper - a function for plugging in additional message consumers */ public static Launcher<LanguageClient> createServerLauncher(LanguageServer server, InputStream in, OutputStream out, ExecutorService executorService, Function<MessageConsumer, MessageConsumer> wrapper) { return new Builder<LanguageClient>() .setLocalService(server) .setRemoteInterface(LanguageClient.class) .setInput(in) .setOutput(out) .setExecutorService(executorService) .wrapMessages(wrapper) .create(); }
/** * Create a new Launcher for a language server and an input and output stream. Threads are started with the given * executor service. The wrapper function is applied to the incoming and outgoing message streams so additional * message handling such as validation and tracing can be included. * * @param server - the server that receives method calls from the remote client * @param in - input stream to listen for incoming messages * @param out - output stream to send outgoing messages * @param executorService - the executor service used to start threads * @param wrapper - a function for plugging in additional message consumers */ public static Launcher<LanguageClient> createServerLauncher(LanguageServer server, InputStream in, OutputStream out, ExecutorService executorService, Function<MessageConsumer, MessageConsumer> wrapper) { return new Builder<LanguageClient>() .setLocalService(server) .setRemoteInterface(LanguageClient.class) .setInput(in) .setOutput(out) .setExecutorService(executorService) .wrapMessages(wrapper) .create(); }
/** * Create a new Launcher for a language client and an input and output stream. Threads are started with the given * executor service. The wrapper function is applied to the incoming and outgoing message streams so additional * message handling such as validation and tracing can be included. * * @param client - the client that receives method calls from the remote server * @param in - input stream to listen for incoming messages * @param out - output stream to send outgoing messages * @param executorService - the executor service used to start threads * @param wrapper - a function for plugging in additional message consumers */ public static Launcher<LanguageServer> createClientLauncher(LanguageClient client, InputStream in, OutputStream out, ExecutorService executorService, Function<MessageConsumer, MessageConsumer> wrapper) { return new Builder<LanguageServer>() .setLocalService(client) .setRemoteInterface(LanguageServer.class) .setInput(in) .setOutput(out) .setExecutorService(executorService) .wrapMessages(wrapper) .create(); }
/** * Create a new Launcher for a given local service object, a given remote interface and an input and output stream. * Threads are started with the given executor service. The wrapper function is applied to the incoming and * outgoing message streams so additional message handling such as validation and tracing can be included. * * @param localService - the object that receives method calls from the remote service * @param remoteInterface - an interface on which RPC methods are looked up * @param in - input stream to listen for incoming messages * @param out - output stream to send outgoing messages * @param executorService - the executor service used to start threads * @param wrapper - a function for plugging in additional message consumers */ static <T> Launcher<T> createIoLauncher(Object localService, Class<T> remoteInterface, InputStream in, OutputStream out, ExecutorService executorService, Function<MessageConsumer, MessageConsumer> wrapper) { return new Builder<T>() .setLocalService(localService) .setRemoteInterface(remoteInterface) .setInput(in) .setOutput(out) .setExecutorService(executorService) .wrapMessages(wrapper) .create(); }