org.littleshoot.stun.stack.message
Class NullStunMessage

java.lang.Object
  extended by org.littleshoot.stun.stack.message.NullStunMessage
All Implemented Interfaces:
StunMessage, VisitableStunMessage

public class NullStunMessage
extends Object
implements StunMessage

Placeholder class that forces callers to handle cases such as when there is no response to a request.


Constructor Summary
NullStunMessage()
           
 
Method Summary
<T> T
accept(StunMessageVisitor<T> visitor)
          Accepts the specified visitor class.
 Map<StunAttributeType,StunAttribute> getAttributes()
          Accessor for the message attributes.
 int getBodyLength()
          Accessor for the length of the message body.
 int getTotalLength()
          Accessor for the total length of the message, including headers.
 org.apache.commons.id.uuid.UUID getTransactionId()
          Accessor for the ID of the message's transaction.
 StunMessageType getType()
          Accessor for the type of the message.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

NullStunMessage

public NullStunMessage()
Method Detail

getAttributes

public Map<StunAttributeType,StunAttribute> getAttributes()
Description copied from interface: StunMessage
Accessor for the message attributes.

Specified by:
getAttributes in interface StunMessage
Returns:
The message attributes Map.

getBodyLength

public int getBodyLength()
Description copied from interface: StunMessage
Accessor for the length of the message body.

Specified by:
getBodyLength in interface StunMessage
Returns:
The length of the message body.

getTotalLength

public int getTotalLength()
Description copied from interface: StunMessage
Accessor for the total length of the message, including headers.

Specified by:
getTotalLength in interface StunMessage
Returns:
The total length of the message.

getTransactionId

public org.apache.commons.id.uuid.UUID getTransactionId()
Description copied from interface: StunMessage
Accessor for the ID of the message's transaction.

Specified by:
getTransactionId in interface StunMessage
Returns:
The transaction ID.

getType

public StunMessageType getType()
Description copied from interface: StunMessage
Accessor for the type of the message.

Specified by:
getType in interface StunMessage
Returns:
The type of the message.

accept

public <T> T accept(StunMessageVisitor<T> visitor)
Description copied from interface: VisitableStunMessage
Accepts the specified visitor class.

Specified by:
accept in interface VisitableStunMessage
Type Parameters:
T - The type the visitor will return.
Parameters:
visitor - The visitor to accept.
Returns:
The return value of the visitor.


Copyright © 2013 LittleShoot. All Rights Reserved.