Package com.tnsai.protocols.handlers
Class DirectMessageHandler
java.lang.Object
com.tnsai.protocols.handlers.AbstractProtocolHandler
com.tnsai.protocols.handlers.DirectMessageHandler
- All Implemented Interfaces:
ProtocolHandler
Handler for point-to-point direct messaging.
Supports both internal and remote transport.
-
Nested Class Summary
Nested classes/interfaces inherited from interface com.tnsai.protocols.handlers.ProtocolHandler
ProtocolHandler.HandlerCallback, ProtocolHandler.HandlerException -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncom.tnsai.protocols.models.Messagesend(com.tnsai.protocols.models.Message message) Sends a message using this protocol.voidsendAsync(com.tnsai.protocols.models.Message message, ProtocolHandler.HandlerCallback callback) Sends a message asynchronously.Methods inherited from class com.tnsai.protocols.handlers.AbstractProtocolHandler
getTransport, isRunning, start, stop
-
Constructor Details
-
DirectMessageHandler
-
-
Method Details
-
send
public com.tnsai.protocols.models.Message send(com.tnsai.protocols.models.Message message) throws ProtocolHandler.HandlerException Description copied from interface:ProtocolHandlerSends a message using this protocol.- Parameters:
message- Message to send- Returns:
- Response message (null for async protocols)
- Throws:
ProtocolHandler.HandlerException- if send fails
-
sendAsync
public void sendAsync(com.tnsai.protocols.models.Message message, ProtocolHandler.HandlerCallback callback) Description copied from interface:ProtocolHandlerSends a message asynchronously.- Parameters:
message- Message to sendcallback- Callback for response
-