|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.littleshoot.stun.stack.transaction.StunTransactionTrackerImpl
public class StunTransactionTrackerImpl
Class for matching requests and responses to their associated transactions.
| Constructor Summary | |
|---|---|
StunTransactionTrackerImpl()
|
|
| Method Summary | |
|---|---|
void |
addTransaction(StunMessage request,
StunTransactionListener listener,
InetSocketAddress localAddress,
InetSocketAddress remoteAddress)
Adds a transaction for the specified request with the specified listener. |
StunClientTransaction<StunMessage> |
getClientTransaction(StunMessage message)
Accessor for the client transcaction associated with the specified message. |
Object |
onTransactionFailed(StunMessage request,
StunMessage response)
Called when the transaction failed with an error response, a timeout, or for any other reason. |
Object |
onTransactionSucceeded(StunMessage request,
StunMessage response)
Called when the transaction completed normally with a successful binding response. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public StunTransactionTrackerImpl()
| Method Detail |
|---|
public void addTransaction(StunMessage request,
StunTransactionListener listener,
InetSocketAddress localAddress,
InetSocketAddress remoteAddress)
StunTransactionTracker
addTransaction in interface StunTransactionTracker<StunMessage>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.public StunClientTransaction<StunMessage> getClientTransaction(StunMessage message)
StunTransactionTracker
getClientTransaction in interface StunTransactionTracker<StunMessage>message - The message containing a branch ID and SIP method to use
as a key for looking up the associated tranction.
null if there is no associated transaction. This can
happen if the transaction has timed out, for example.
public Object onTransactionFailed(StunMessage request,
StunMessage response)
StunTransactionListener
onTransactionFailed in interface StunTransactionListenerrequest - The original request.response - The binding response.
public Object onTransactionSucceeded(StunMessage request,
StunMessage response)
StunTransactionListener
onTransactionSucceeded in interface StunTransactionListenerrequest - The binding request.response - The binding response.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||