org.littleshoot.stun.stack.message
Interface StunMessageVisitor<T>

Type Parameters:
T - The return type for this visitor.
All Known Subinterfaces:
StunClientTransaction<T>
All Known Implementing Classes:
StunClientTransactionImpl, StunMessageVisitorAdapter

public interface StunMessageVisitor<T>

Visitor for various STUN messages.


Method Summary
 T visitAllocateErrorResponse(AllocateErrorResponse response)
          Visits a response for a failed Allocate Request.
 T visitAllocateRequest(AllocateRequest request)
          Visits the TURN usage allocate request message.
 T visitAllocateSuccessResponse(AllocateSuccessResponse response)
          Visits a response for a successful Allocate Request.
 T visitBindingErrorResponse(BindingErrorResponse response)
          Visits a binding error response.
 T visitBindingRequest(BindingRequest binding)
          Visits a binding message.
 T visitBindingSuccessResponse(BindingSuccessResponse response)
          Visits a binding success response.
 T visitCanceledMessage(CanceledStunMessage message)
          Visits a STUN message indicating the STUN transaction was canceled.
 T visitConnectErrorMesssage(ConnectErrorStunMessage message)
          Visits a STUN "message" indicating there was a connection error, such as an ICMP error or a failure to create a TCP connection.
 T visitConnectionStatusIndication(ConnectionStatusIndication indication)
          Visits a connection status indication message informing clients of the connection status of remote hosts.
 T visitConnectRequest(ConnectRequest request)
          Visits a connection request from a client.
 T visitDataIndication(DataIndication data)
           
 T visitNullMessage(NullStunMessage message)
          Visits the absence of a message.
 T visitSendIndication(SendIndication request)
           
 

Method Detail

visitBindingRequest

T visitBindingRequest(BindingRequest binding)
Visits a binding message.

Parameters:
binding - The binding message.
Returns:
The return type for this visitor.

visitBindingSuccessResponse

T visitBindingSuccessResponse(BindingSuccessResponse response)
Visits a binding success response.

Parameters:
response - The binding success response.
Returns:
The return type for this visitor.

visitBindingErrorResponse

T visitBindingErrorResponse(BindingErrorResponse response)
Visits a binding error response.

Parameters:
response - Binding error response.
Returns:
The return type for this visitor.

visitAllocateRequest

T visitAllocateRequest(AllocateRequest request)
Visits the TURN usage allocate request message.

Parameters:
request - The TURN usage allocate request.
Returns:
The return type for this visitor.

visitAllocateSuccessResponse

T visitAllocateSuccessResponse(AllocateSuccessResponse response)
Visits a response for a successful Allocate Request.

Parameters:
response - The response to a successful Allocate Request.
Returns:
The return type for this visitor.

visitAllocateErrorResponse

T visitAllocateErrorResponse(AllocateErrorResponse response)
Visits a response for a failed Allocate Request.

Parameters:
response - The response to a failed Allocate Request.
Returns:
The return type for this visitor.

visitDataIndication

T visitDataIndication(DataIndication data)

visitSendIndication

T visitSendIndication(SendIndication request)

visitConnectRequest

T visitConnectRequest(ConnectRequest request)
Visits a connection request from a client. Only STUN servers will respond to this request. This request indicates the client wishes to allow connections from the host specified in the REMOTE ADDRESS attribute.

Parameters:
request - The connect request.
Returns:
The return type for this visitor.

visitConnectionStatusIndication

T visitConnectionStatusIndication(ConnectionStatusIndication indication)
Visits a connection status indication message informing clients of the connection status of remote hosts. The connection status is sent in the CONNECT STAT attribute.

Parameters:
indication - The connection status indication message.
Returns:
The return type for this visitor.

visitNullMessage

T visitNullMessage(NullStunMessage message)
Visits the absence of a message. This can occur, for example, when a request receives no response whatsoever.

Parameters:
message - The message to visit.
Returns:
The return type for this visitor.

visitCanceledMessage

T visitCanceledMessage(CanceledStunMessage message)
Visits a STUN message indicating the STUN transaction was canceled. This allows visitors to differentiate between canceled messages and messages where the server never responded.

Parameters:
message - The canceled message.
Returns:
The type the visitor returns.

visitConnectErrorMesssage

T visitConnectErrorMesssage(ConnectErrorStunMessage message)
Visits a STUN "message" indicating there was a connection error, such as an ICMP error or a failure to create a TCP connection.

Parameters:
message - The connection error message.
Returns:
The type the visitor returns.


Copyright © 2013 LittleShoot. All Rights Reserved.