org.littleshoot.stun.stack.message.turn
Class AllocateErrorResponse

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

public final class AllocateErrorResponse
extends AbstractStunMessage

Creates a new response to an allocate request. This includes the mapped address the server has allocated to proxy data to the TURN client.


Constructor Summary
AllocateErrorResponse(org.apache.commons.id.uuid.UUID transactionId, int errorCode, String reasonPhrase)
          Creates a new successful response to an allocate request.
AllocateErrorResponse(org.apache.commons.id.uuid.UUID transactionId, Map<StunAttributeType,StunAttribute> attributes)
          Creates a new successful response to an allocate request.
 
Method Summary
<T> T
accept(StunMessageVisitor<T> visitor)
          Accepts the specified visitor class.
 int getErrorCode()
          Returns the full error code.
 
Methods inherited from class org.littleshoot.stun.stack.message.AbstractStunMessage
createAttributes, createRemoteAddress, getAttributes, getBodyLength, getTotalLength, getTransactionId, getType, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

AllocateErrorResponse

public AllocateErrorResponse(org.apache.commons.id.uuid.UUID transactionId,
                             Map<StunAttributeType,StunAttribute> attributes)
Creates a new successful response to an allocate request.

Parameters:
transactionId - The ID of the transaction, matching the ID of the request.
attributes - The message attributes.

AllocateErrorResponse

public AllocateErrorResponse(org.apache.commons.id.uuid.UUID transactionId,
                             int errorCode,
                             String reasonPhrase)
Creates a new successful response to an allocate request.

Parameters:
transactionId - The ID of the transaction, matching the ID of the request.
errorCode - The code for the error.
reasonPhrase - The reason description.
Method Detail

getErrorCode

public int getErrorCode()
Returns the full error code.

Returns:
The full error code, including the class and the number.

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.


Copyright © 2013 LittleShoot. All Rights Reserved.