Class LSPLauncher


  • public final class LSPLauncher
    extends java.lang.Object
    Specialized launcher for the Language Server Protocol.
    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
      static class  LSPLauncher.Builder<T>
      Launcher builder for the Language Server Protocol.
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static org.eclipse.lsp4j.jsonrpc.Launcher<LanguageServer> createClientLauncher​(LanguageClient client, java.io.InputStream in, java.io.OutputStream out)
      Create a new Launcher for a language client and an input and output stream.
      static org.eclipse.lsp4j.jsonrpc.Launcher<LanguageServer> createClientLauncher​(LanguageClient client, java.io.InputStream in, java.io.OutputStream out, boolean validate, java.io.PrintWriter trace)
      Create a new Launcher for a language client and an input and output stream, and set up message validation and tracing.
      static org.eclipse.lsp4j.jsonrpc.Launcher<LanguageServer> createClientLauncher​(LanguageClient client, java.io.InputStream in, java.io.OutputStream out, java.util.concurrent.ExecutorService executorService, java.util.function.Function<org.eclipse.lsp4j.jsonrpc.MessageConsumer,​org.eclipse.lsp4j.jsonrpc.MessageConsumer> wrapper)
      Create a new Launcher for a language client and an input and output stream.
      static org.eclipse.lsp4j.jsonrpc.Launcher<LanguageClient> createServerLauncher​(LanguageServer server, java.io.InputStream in, java.io.OutputStream out)
      Create a new Launcher for a language server and an input and output stream.
      static org.eclipse.lsp4j.jsonrpc.Launcher<LanguageClient> createServerLauncher​(LanguageServer server, java.io.InputStream in, java.io.OutputStream out, boolean validate, java.io.PrintWriter trace)
      Create a new Launcher for a language server and an input and output stream, and set up message validation and tracing.
      static org.eclipse.lsp4j.jsonrpc.Launcher<LanguageClient> createServerLauncher​(LanguageServer server, java.io.InputStream in, java.io.OutputStream out, java.util.concurrent.ExecutorService executorService, java.util.function.Function<org.eclipse.lsp4j.jsonrpc.MessageConsumer,​org.eclipse.lsp4j.jsonrpc.MessageConsumer> wrapper)
      Create a new Launcher for a language server and an input and output stream.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • createServerLauncher

        public static org.eclipse.lsp4j.jsonrpc.Launcher<LanguageClient> createServerLauncher​(LanguageServer server,
                                                                                              java.io.InputStream in,
                                                                                              java.io.OutputStream out)
        Create a new Launcher for a language server and an input and output stream.
        Parameters:
        server - - the server that receives method calls from the remote client
        in - - input stream to listen for incoming messages
        out - - output stream to send outgoing messages
      • createServerLauncher

        public static org.eclipse.lsp4j.jsonrpc.Launcher<LanguageClient> createServerLauncher​(LanguageServer server,
                                                                                              java.io.InputStream in,
                                                                                              java.io.OutputStream out,
                                                                                              boolean validate,
                                                                                              java.io.PrintWriter trace)
        Create a new Launcher for a language server and an input and output stream, and set up message validation and tracing.
        Parameters:
        server - - the server that receives method calls from the remote client
        in - - input stream to listen for incoming messages
        out - - output stream to send outgoing messages
        validate - - whether messages should be validated with the ReflectiveMessageValidator
        trace - - a writer to which incoming and outgoing messages are traced, or null to disable tracing
      • createServerLauncher

        public static org.eclipse.lsp4j.jsonrpc.Launcher<LanguageClient> createServerLauncher​(LanguageServer server,
                                                                                              java.io.InputStream in,
                                                                                              java.io.OutputStream out,
                                                                                              java.util.concurrent.ExecutorService executorService,
                                                                                              java.util.function.Function<org.eclipse.lsp4j.jsonrpc.MessageConsumer,​org.eclipse.lsp4j.jsonrpc.MessageConsumer> wrapper)
        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.
        Parameters:
        server - - the server that receives method calls from the remote client
        in - - input stream to listen for incoming messages
        out - - output stream to send outgoing messages
        executorService - - the executor service used to start threads
        wrapper - - a function for plugging in additional message consumers
      • createClientLauncher

        public static org.eclipse.lsp4j.jsonrpc.Launcher<LanguageServer> createClientLauncher​(LanguageClient client,
                                                                                              java.io.InputStream in,
                                                                                              java.io.OutputStream out)
        Create a new Launcher for a language client and an input and output stream.
        Parameters:
        client - - the client that receives method calls from the remote server
        in - - input stream to listen for incoming messages
        out - - output stream to send outgoing messages
      • createClientLauncher

        public static org.eclipse.lsp4j.jsonrpc.Launcher<LanguageServer> createClientLauncher​(LanguageClient client,
                                                                                              java.io.InputStream in,
                                                                                              java.io.OutputStream out,
                                                                                              boolean validate,
                                                                                              java.io.PrintWriter trace)
        Create a new Launcher for a language client and an input and output stream, and set up message validation and tracing.
        Parameters:
        client - - the client that receives method calls from the remote server
        in - - input stream to listen for incoming messages
        out - - output stream to send outgoing messages
        validate - - whether messages should be validated with the ReflectiveMessageValidator
        trace - - a writer to which incoming and outgoing messages are traced, or null to disable tracing
      • createClientLauncher

        public static org.eclipse.lsp4j.jsonrpc.Launcher<LanguageServer> createClientLauncher​(LanguageClient client,
                                                                                              java.io.InputStream in,
                                                                                              java.io.OutputStream out,
                                                                                              java.util.concurrent.ExecutorService executorService,
                                                                                              java.util.function.Function<org.eclipse.lsp4j.jsonrpc.MessageConsumer,​org.eclipse.lsp4j.jsonrpc.MessageConsumer> wrapper)
        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.
        Parameters:
        client - - the client that receives method calls from the remote server
        in - - input stream to listen for incoming messages
        out - - output stream to send outgoing messages
        executorService - - the executor service used to start threads
        wrapper - - a function for plugging in additional message consumers