Package org.eclipse.lsp4j.launch
Class LSPLauncher
- java.lang.Object
-
- org.eclipse.lsp4j.launch.LSPLauncher
-
public final class LSPLauncher extends java.lang.ObjectSpecialized launcher for the Language Server Protocol.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classLSPLauncher.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.
-
-
-
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 clientin- - input stream to listen for incoming messagesout- - 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 clientin- - input stream to listen for incoming messagesout- - output stream to send outgoing messagesvalidate- - whether messages should be validated with theReflectiveMessageValidatortrace- - a writer to which incoming and outgoing messages are traced, ornullto 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 clientin- - input stream to listen for incoming messagesout- - output stream to send outgoing messagesexecutorService- - the executor service used to start threadswrapper- - 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 serverin- - input stream to listen for incoming messagesout- - 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 serverin- - input stream to listen for incoming messagesout- - output stream to send outgoing messagesvalidate- - whether messages should be validated with theReflectiveMessageValidatortrace- - a writer to which incoming and outgoing messages are traced, ornullto 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 serverin- - input stream to listen for incoming messagesout- - output stream to send outgoing messagesexecutorService- - the executor service used to start threadswrapper- - a function for plugging in additional message consumers
-
-