-
- All Implemented Interfaces:
-
java.io.Serializable
public class StunMessageEvent extends BaseStunMessageEvent
The class is used to dispatch incoming stun 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).
-
-
Field Summary
Fields Modifier and Type Field Description private final RawMessage
rawMessage
-
Constructor Summary
Constructors Constructor Description StunMessageEvent(StunStack stunStack, RawMessage rawMessage, Message parsedMessage)
Constructs a StunMessageEvent according to the specified message.
-
Method Summary
Modifier and Type Method Description RawMessage
getRawMessage()
Returns the raw message that caused this event. TransportAddress
getLocalAddress()
Returns a TransportAddress referencing the access point wherethe message was received. TransportAddress
getRemoteAddress()
Returns the address that sent the message. String
toString()
Returns a String representation of this event, containing thecorresponding message, remote and local addresses. -
Methods inherited from class org.ice4j.BaseStunMessageEvent
getMessage, getStunStack, getTransactionID
-
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
-
StunMessageEvent
StunMessageEvent(StunStack stunStack, RawMessage rawMessage, Message parsedMessage)
Constructs a StunMessageEvent according to the specified message.- Parameters:
stunStack
- the StunStack to be associated with the newinstancerawMessage
- the crude message we got off the wire.parsedMessage
- the message itself
-
-
Method Detail
-
getRawMessage
RawMessage getRawMessage()
Returns the raw message that caused this event.
-
getLocalAddress
TransportAddress getLocalAddress()
Returns a TransportAddress referencing the access point wherethe message was received.
-
getRemoteAddress
TransportAddress getRemoteAddress()
Returns the address that sent the message.
-
-
-
-