Top Description Inners Constructors Methods
org.eclipse.lsp4j.launch

public final Class LSPLauncher

extends Object
Class Inheritance
Imports
java.io.InputStream, .OutputStream, .PrintWriter, java.util.concurrent.ExecutorService, java.util.function.Function, org.eclipse.lsp4j.jsonrpc.Launcher, .MessageConsumer, org.eclipse.lsp4j.jsonrpc.validation.ReflectiveMessageValidator, org.eclipse.lsp4j.services.LanguageClient, .LanguageServer

Specialized launcher for the Language Server Protocol.

Nested and Inner Type Summary

Modifier and TypeClass and Description
public static class
LSPLauncher.Builder<T>

Launcher builder for the Language Server Protocol.

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
public static Launcher<LanguageServer>
createClientLauncher(LanguageClient
- the client that receives method calls from the remote server
client
,
InputStream
- input stream to listen for incoming messages
in
,
OutputStream
- output stream to send outgoing messages
out
)

Create a new Launcher for a language client and an input and output stream.

public static Launcher<LanguageServer>
createClientLauncher(LanguageClient
- the client that receives method calls from the remote server
client
,
InputStream
- input stream to listen for incoming messages
in
,
OutputStream
- output stream to send outgoing messages
out
,
boolean
- whether messages should be validated with the ReflectiveMessageValidator
validate
,
PrintWriter
- a writer to which incoming and outgoing messages are traced, or null to disable tracing
trace
)

Create a new Launcher for a language client and an input and output stream, and set up message validation and tracing.

public static Launcher<LanguageServer>
createClientLauncher(LanguageClient
- the client that receives method calls from the remote server
client
,
InputStream
- input stream to listen for incoming messages
in
,
OutputStream
- output stream to send outgoing messages
out
,
ExecutorService
- the executor service used to start threads
executorService
,
Function<MessageConsumer, MessageConsumer>
- a function for plugging in additional message consumers
wrapper
)

Create a new Launcher for a language client and an input and output stream.

public static Launcher<LanguageClient>
createServerLauncher(LanguageServer
- the server that receives method calls from the remote client
server
,
InputStream
- input stream to listen for incoming messages
in
,
OutputStream
- output stream to send outgoing messages
out
)

Create a new Launcher for a language server and an input and output stream.

public static Launcher<LanguageClient>
createServerLauncher(LanguageServer
- the server that receives method calls from the remote client
server
,
InputStream
- input stream to listen for incoming messages
in
,
OutputStream
- output stream to send outgoing messages
out
,
boolean
- whether messages should be validated with the ReflectiveMessageValidator
validate
,
PrintWriter
- a writer to which incoming and outgoing messages are traced, or null to disable tracing
trace
)

Create a new Launcher for a language server and an input and output stream, and set up message validation and tracing.

public static Launcher<LanguageClient>
createServerLauncher(LanguageServer
- the server that receives method calls from the remote client
server
,
InputStream
- input stream to listen for incoming messages
in
,
OutputStream
- output stream to send outgoing messages
out
,
ExecutorService
- the executor service used to start threads
executorService
,
Function<MessageConsumer, MessageConsumer>
- a function for plugging in additional message consumers
wrapper
)

Create a new Launcher for a language server and an input and output stream.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Constructor Detail

LSPLauncherback to summary
private LSPLauncher()

Method Detail

createClientLauncherback to summary
public static Launcher<LanguageServer> createClientLauncher(LanguageClient client, InputStream in, OutputStream out)

Create a new Launcher for a language client and an input and output stream.

Parameters
client:LanguageClient

- the client that receives method calls from the remote server

in:InputStream

- input stream to listen for incoming messages

out:OutputStream

- output stream to send outgoing messages

createClientLauncherback to summary
public static Launcher<LanguageServer> createClientLauncher(LanguageClient client, InputStream in, OutputStream out, boolean validate, 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:LanguageClient

- the client that receives method calls from the remote server

in:InputStream

- input stream to listen for incoming messages

out:OutputStream

- output stream to send outgoing messages

validate:boolean

- whether messages should be validated with the ReflectiveMessageValidator

trace:PrintWriter

- a writer to which incoming and outgoing messages are traced, or null to disable tracing

createClientLauncherback to summary
public static Launcher<LanguageServer> createClientLauncher(LanguageClient client, InputStream in, OutputStream out, ExecutorService executorService, Function<MessageConsumer, 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:LanguageClient

- the client that receives method calls from the remote server

in:InputStream

- input stream to listen for incoming messages

out:OutputStream

- output stream to send outgoing messages

executorService:ExecutorService

- the executor service used to start threads

wrapper:Function<MessageConsumer, MessageConsumer>

- a function for plugging in additional message consumers

createServerLauncherback to summary
public static Launcher<LanguageClient> createServerLauncher(LanguageServer server, InputStream in, OutputStream out)

Create a new Launcher for a language server and an input and output stream.

Parameters
server:LanguageServer

- the server that receives method calls from the remote client

in:InputStream

- input stream to listen for incoming messages

out:OutputStream

- output stream to send outgoing messages

createServerLauncherback to summary
public static Launcher<LanguageClient> createServerLauncher(LanguageServer server, InputStream in, OutputStream out, boolean validate, 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:LanguageServer

- the server that receives method calls from the remote client

in:InputStream

- input stream to listen for incoming messages

out:OutputStream

- output stream to send outgoing messages

validate:boolean

- whether messages should be validated with the ReflectiveMessageValidator

trace:PrintWriter

- a writer to which incoming and outgoing messages are traced, or null to disable tracing

createServerLauncherback to summary
public static Launcher<LanguageClient> createServerLauncher(LanguageServer server, InputStream in, OutputStream out, ExecutorService executorService, Function<MessageConsumer, 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:LanguageServer

- the server that receives method calls from the remote client

in:InputStream

- input stream to listen for incoming messages

out:OutputStream

- output stream to send outgoing messages

executorService:ExecutorService

- the executor service used to start threads

wrapper:Function<MessageConsumer, MessageConsumer>

- a function for plugging in additional message consumers

org.eclipse.lsp4j.launch back to summary

public Class LSPLauncher.Builder<T>

extends Launcher.Builder<T>
Class Inheritance

Launcher builder for the Language Server Protocol.

Field Summary

Inherited from org.eclipse.lsp4j.jsonrpc.Launcher.Builder:
classLoaderconfigureGsonexceptionHandlerexecutorServiceinputlocalServicesmessageTracermessageWrapperoutputremoteInterfacesvalidateMessages

Constructor Summary

AccessConstructor and Description
public

Method Summary

Inherited from org.eclipse.lsp4j.jsonrpc.Launcher.Builder:
configureGsoncreatecreateJsonHandlercreateLaunchercreateMessageProcessorcreateProxycreateRemoteEndpointgetSupportedMethodssetClassLoadersetExceptionHandlersetExecutorServicesetInputsetLocalServicesetLocalServicessetOutputsetRemoteInterfacesetRemoteInterfacestraceMessagesvalidateMessageswrapMessageConsumerwrapMessages

Constructor Detail

Builderback to summary
public Builder()