Class OutboundMessage
java.lang.Object
com.tccc.kos.commons.web.websocket.router.msg.RoutedMessage
com.tccc.kos.commons.web.websocket.router.msg.OutboundMessage
Outbound messages passed to the router from java to be sent to another
node / client on the network. The body is in original form and needs
to be serialized to json before sending. If a view is specified it
will be used to serialize the body before sending.
- Since:
- 1.0
- Version:
- 2022-08-30
-
Field Summary
Fields inherited from class com.tccc.kos.commons.web.websocket.router.msg.RoutedMessage
HEADER_DST_ADDR, HEADER_HIDE, HEADER_LINE_TERMINATOR, HEADER_NAME_VAL_SEPARATOR, HEADER_SRC_ADDR, HEADER_TRACE
-
Constructor Summary
ConstructorsConstructorDescriptionOutboundMessage
(String type) Create a new message with the specified type.OutboundMessage
(String type, Map<String, String> headers) Create a new message with the specified type and headers. -
Method Summary
Methods inherited from class com.tccc.kos.commons.web.websocket.router.msg.RoutedMessage
addHeader, addHeaders, areHeadersModified, getDstAddr, getHeader, getHeaders, getSerializedHeaders, getSrcAddr, getTrace, getType, hasHeader, isHide, removeHeader, setDstAddr, setHeadersModified, setHide, setSrcAddr, setTrace, setType, toRouterAddr
-
Constructor Details
-
OutboundMessage
Create a new message with the specified type.- Parameters:
type
- the message type
-
OutboundMessage
Create a new message with the specified type and headers.- Parameters:
type
- the message typeheaders
- the message headers (optional)
-
-
Method Details
-
getBody
Description copied from class:RoutedMessage
Returns the body of the message.- Specified by:
getBody
in classRoutedMessage
- Returns:
- the message body
-
getView
-
setBody
- Returns:
this
.
-
setView
- Returns:
this
.
-