Package org.opensearch.transport
Class NativeMessageHandler
java.lang.Object
org.opensearch.transport.NativeMessageHandler
- All Implemented Interfaces:
ProtocolMessageHandler
Native handler for inbound data
- Opensearch.internal:
-
Method Summary
Modifier and TypeMethodDescriptionvoid
messageReceived
(TcpChannel channel, ProtocolInboundMessage message, long startTime, long slowLogThresholdMs, TransportMessageListener messageListener) Handles the message received on the channel.void
setMessageListener
(TransportMessageListener listener) Sets the message listener to be used by the handler.
-
Method Details
-
messageReceived
public void messageReceived(TcpChannel channel, ProtocolInboundMessage message, long startTime, long slowLogThresholdMs, TransportMessageListener messageListener) throws IOException Description copied from interface:ProtocolMessageHandler
Handles the message received on the channel.- Specified by:
messageReceived
in interfaceProtocolMessageHandler
- Parameters:
channel
- the channel on which the message was receivedmessage
- the message receivedstartTime
- the start timeslowLogThresholdMs
- the threshold for slow logsmessageListener
- the message listener- Throws:
IOException
-
setMessageListener
Description copied from interface:ProtocolMessageHandler
Sets the message listener to be used by the handler.- Specified by:
setMessageListener
in interfaceProtocolMessageHandler
- Parameters:
listener
- the message listener
-