Class OutboundMessage

java.lang.Object
com.kosdev.kos.commons.web.websocket.router.msg.RoutedMessage
com.kosdev.kos.commons.web.websocket.router.msg.OutboundMessage

public class OutboundMessage extends RoutedMessage
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
Version:
1
  • Constructor Details

    • OutboundMessage

      public OutboundMessage(String type)
      Create a new message with the specified type.
      Parameters:
      type - the message type
      Since:
      1
    • OutboundMessage

      public OutboundMessage(String type, Map<String,String> headers)
      Create a new message with the specified type and headers.
      Parameters:
      type - the message type
      headers - the message headers (optional)
      Since:
      1
  • Method Details