org.littleshoot.stun.stack.message
Class BindingSuccessResponse

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

public class BindingSuccessResponse
extends AbstractStunMessage

Binding response message.


Constructor Summary
BindingSuccessResponse(byte[] transactionId, InetSocketAddress address)
          Creates a new binding response message.
BindingSuccessResponse(org.apache.commons.id.uuid.UUID transactionId, Map<StunAttributeType,StunAttribute> attributes)
          Creates a new binding response message.
 
Method Summary
<T> T
accept(StunMessageVisitor<T> visitor)
          Accepts the specified visitor class.
 InetSocketAddress getMappedAddress()
          Accessor for the mapped address received in the binding response.
 String toString()
           
 
Methods inherited from class org.littleshoot.stun.stack.message.AbstractStunMessage
createAttributes, createRemoteAddress, getAttributes, getBodyLength, getTotalLength, getTransactionId, getType
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

BindingSuccessResponse

public BindingSuccessResponse(byte[] transactionId,
                              InetSocketAddress address)
Creates a new binding response message.

Parameters:
transactionId - The ID of the transaction.
address - The mapped address.

BindingSuccessResponse

public BindingSuccessResponse(org.apache.commons.id.uuid.UUID transactionId,
                              Map<StunAttributeType,StunAttribute> attributes)
Creates a new binding response message.

Parameters:
transactionId - The transaction ID of the response.
attributes - The response attributes.
Method Detail

getMappedAddress

public InetSocketAddress getMappedAddress()
Accessor for the mapped address received in the binding response.

Returns:
The client's mapped address.

accept

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

Type Parameters:
T - The type the visitor will return.
Parameters:
visitor - The visitor to accept.
Returns:
The return value of the visitor.

toString

public String toString()
Overrides:
toString in class AbstractStunMessage


Copyright © 2013 LittleShoot. All Rights Reserved.