org.littleshoot.stun.stack.transaction
Interface StunClientTransaction<T>

Type Parameters:
T - The visitor return type.
All Superinterfaces:
StunMessageVisitor<T>
All Known Implementing Classes:
StunClientTransactionImpl

public interface StunClientTransaction<T>
extends StunMessageVisitor<T>

Interface for client transactions.


Method Summary
 void addListener(StunTransactionListener listener)
          Adds a listener to the transaction.
 InetSocketAddress getIntendedDestination()
          Gets the destination host the transaction was intended for.
 StunMessage getRequest()
          Accessor for the request that started the transaction.
 long getTransactionTime()
          Accessor for the total transaction time for the transaction.
 
Methods inherited from interface org.littleshoot.stun.stack.message.StunMessageVisitor
visitAllocateErrorResponse, visitAllocateRequest, visitAllocateSuccessResponse, visitBindingErrorResponse, visitBindingRequest, visitBindingSuccessResponse, visitCanceledMessage, visitConnectErrorMesssage, visitConnectionStatusIndication, visitConnectRequest, visitDataIndication, visitNullMessage, visitSendIndication
 

Method Detail

getRequest

StunMessage getRequest()
Accessor for the request that started the transaction.

Returns:
The request that started the transaction.

getTransactionTime

long getTransactionTime()
Accessor for the total transaction time for the transaction.

Returns:
The total time the transaction took.

addListener

void addListener(StunTransactionListener listener)
Adds a listener to the transaction. This should typically be called before any message has been sent -- before the transaction has started -- to ensure events aren't missed.

Parameters:
listener - The listener to add.

getIntendedDestination

InetSocketAddress getIntendedDestination()
Gets the destination host the transaction was intended for. This allows handlers to verify that the source of incoming packets is the source we expect.

Returns:
The intended destination host.


Copyright © 2013 LittleShoot. All Rights Reserved.