Class MessageContext


  • public final class MessageContext
    extends java.lang.Object
    MessageContext captures meta information of a response, error or event.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      java.net.SocketAddress sender
      Address and port of the sender
      long time
      Time the message was issued
      int type
      The type of the message
    • Constructor Summary

      Constructors 
      Constructor Description
      MessageContext​(java.net.SocketAddress sender, long time, int type)
      Creates a new message context.
    • Method Summary

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • time

        public final long time
        Time the message was issued
      • sender

        public final java.net.SocketAddress sender
        Address and port of the sender
      • type

        public final int type
        The type of the message
    • Constructor Detail

      • MessageContext

        public MessageContext​(java.net.SocketAddress sender,
                              long time,
                              int type)
        Creates a new message context.
        Parameters:
        sender - The sender IP and port
        time - The creation time of the message.
        type - The type of the message.