Package 

Class PeerUdpMessageEvent

  • All Implemented Interfaces:
    java.io.Serializable

    
    public class PeerUdpMessageEvent
    extends EventObject
                        

    The class is used to dispatch incoming UDP peer messages. Apart from the message itself one could also obtain the address from where the message is coming (used by a server implementation to determine the mapped address) as well as the Descriptor of the NetAccessPoint that received it (In case the stack is used on more than one ports/addresses).

    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
    • Constructor Summary

      Constructors 
      Constructor Description
      PeerUdpMessageEvent(StunStack stunStack, RawMessage udpMessage) Initializes a new PeerUdpMessageEvent associated with a specific PeerUdp Message.
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
    • Method Summary

      Modifier and Type Method Description
      StunStack getStunStack() Gets the StunStack associated with this instance.
      Array<byte> getBytes() Returns the message itself.
      int getMessageLength() Returns the message length.
      TransportAddress getRemoteAddress() Returns the address and port of the host that sent the message
      TransportAddress getLocalAddress() Returns the address that this message was received on.
      • Methods inherited from class java.util.EventObject

        getSource, toString
      • Methods inherited from class java.lang.Object

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

      • PeerUdpMessageEvent

        PeerUdpMessageEvent(StunStack stunStack, RawMessage udpMessage)
        Initializes a new PeerUdpMessageEvent associated with a specific PeerUdp Message.
        Parameters:
        stunStack - the StunStack to be associated with the new instance.
        udpMessage - the Peer UDP Message associated with the new event.