Package io.moderne.jsonrpc.handler
Class HeaderDelimitedMessageHandler
java.lang.Object
io.moderne.jsonrpc.handler.HeaderDelimitedMessageHandler
- All Implemented Interfaces:
MessageHandler
This handler is compatible with the
vscode-jsonrpc NPM package.
It utilizes HTTP-like headers to introduce each JSON-RPC message by describing its
length and (optionally) its text encoding.
-
Constructor Summary
ConstructorsConstructorDescriptionHeaderDelimitedMessageHandler(MessageFormatter formatter, InputStream inputStream, OutputStream outputStream) Deprecated.The formatter is now passed to individual receive/send calls. -
Method Summary
Modifier and TypeMethodDescriptionreceive(MessageFormatter formatter) voidsend(JsonRpcMessage msg, MessageFormatter formatter)
-
Constructor Details
-
HeaderDelimitedMessageHandler
@Deprecated public HeaderDelimitedMessageHandler(MessageFormatter formatter, InputStream inputStream, OutputStream outputStream) Deprecated.The formatter is now passed to individual receive/send calls. Use the two-argument constructor instead.- Parameters:
formatter- the formatter to use for serialization/deserializationinputStream- the input stream to read messages fromoutputStream- the output stream to write messages to
-
-
Method Details
-
receive
- Specified by:
receivein interfaceMessageHandler
-
send
- Specified by:
sendin interfaceMessageHandler
-