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

Type Parameters:
T - The type visitors for transactions return.
All Known Implementing Classes:
StunTransactionTrackerImpl

public interface StunTransactionTracker<T>

Interface for classes responsible for keeping track of SIP transactions.


Method Summary
 void addTransaction(StunMessage request, StunTransactionListener listener, InetSocketAddress localAddress, InetSocketAddress remoteAddress)
          Adds a transaction for the specified request with the specified listener.
 StunClientTransaction<T> getClientTransaction(StunMessage message)
          Accessor for the client transcaction associated with the specified message.
 

Method Detail

addTransaction

void addTransaction(StunMessage request,
                    StunTransactionListener listener,
                    InetSocketAddress localAddress,
                    InetSocketAddress remoteAddress)
Adds a transaction for the specified request with the specified listener.

Parameters:
request - The request to add a transaction for.
listener - The listener for transaction events.
localAddress - The local address the request will be sent from. This allows the verification of the address when we receive responses, as required in some STUN usages such as ICE.
remoteAddress - The remote address the request will be sent to. This allows the verification of the address when we receive responses, as required in some STUN usages such as ICE.
remoteAddress2 -

getClientTransaction

StunClientTransaction<T> getClientTransaction(StunMessage message)
Accessor for the client transcaction associated with the specified message.

Parameters:
message - The message containing a branch ID and SIP method to use as a key for looking up the associated tranction.
Returns:
The transaction associated with the specified message, or null if there is no associated transaction. This can happen if the transaction has timed out, for example.


Copyright © 2013 LittleShoot. All Rights Reserved.