|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.lastbamboo.common.ice.transport.AbstractIceStunChecker
public abstract class AbstractIceStunChecker
Abstract class for STUN connectivity checkers. This performs STUN checks and notifies the callers of responses. Subclasses supply the transport.
| Field Summary | |
|---|---|
protected boolean |
m_closed
|
protected Map<org.apache.commons.id.uuid.UUID,org.littleshoot.stun.stack.message.StunMessage> |
m_idsToResponses
|
protected org.littleshoot.mina.common.IoSession |
m_ioSession
|
protected Object |
m_requestLock
|
protected boolean |
m_transactionCanceled
TODO: Review if this works!! |
protected org.littleshoot.stun.stack.transaction.StunTransactionTracker<org.littleshoot.stun.stack.message.StunMessage> |
m_transactionTracker
|
protected int |
m_writeCallsForChecker
|
| Constructor Summary | |
|---|---|
AbstractIceStunChecker(org.littleshoot.mina.common.IoSession ioSession,
org.littleshoot.stun.stack.transaction.StunTransactionTracker<org.littleshoot.stun.stack.message.StunMessage> transactionTracker)
|
|
| Method Summary | |
|---|---|
void |
cancelTransaction()
Cancels the existing STUN transaction. |
void |
close()
Close any connections associated with the checker. |
Object |
onTransactionFailed(org.littleshoot.stun.stack.message.StunMessage request,
org.littleshoot.stun.stack.message.StunMessage response)
|
Object |
onTransactionSucceeded(org.littleshoot.stun.stack.message.StunMessage request,
org.littleshoot.stun.stack.message.StunMessage response)
|
protected void |
waitIfNoResponse(org.littleshoot.stun.stack.message.BindingRequest request,
long waitTime)
|
org.littleshoot.stun.stack.message.StunMessage |
write(org.littleshoot.stun.stack.message.BindingRequest bindingRequest,
long rto)
Writes a STUN binding request with the RTO value used for retransmissions explicitly set. |
protected abstract org.littleshoot.stun.stack.message.StunMessage |
writeInternal(org.littleshoot.stun.stack.message.BindingRequest bindingRequest,
long rto)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected final org.littleshoot.mina.common.IoSession m_ioSession
protected volatile int m_writeCallsForChecker
protected final Map<org.apache.commons.id.uuid.UUID,org.littleshoot.stun.stack.message.StunMessage> m_idsToResponses
protected final org.littleshoot.stun.stack.transaction.StunTransactionTracker<org.littleshoot.stun.stack.message.StunMessage> m_transactionTracker
protected final Object m_requestLock
protected volatile boolean m_transactionCanceled
protected volatile boolean m_closed
| Constructor Detail |
|---|
public AbstractIceStunChecker(org.littleshoot.mina.common.IoSession ioSession,
org.littleshoot.stun.stack.transaction.StunTransactionTracker<org.littleshoot.stun.stack.message.StunMessage> transactionTracker)
| Method Detail |
|---|
public org.littleshoot.stun.stack.message.StunMessage write(org.littleshoot.stun.stack.message.BindingRequest bindingRequest,
long rto)
IceStunChecker
write in interface IceStunCheckerbindingRequest - The STUN binding request.rto - The value to use for RTO when calculating retransmission
times. Note this only applies to UDP.
protected abstract org.littleshoot.stun.stack.message.StunMessage writeInternal(org.littleshoot.stun.stack.message.BindingRequest bindingRequest,
long rto)
protected final void waitIfNoResponse(org.littleshoot.stun.stack.message.BindingRequest request,
long waitTime)
public void cancelTransaction()
IceStunChecker"means that the agent will not retransmit the request, will not treat the lack of response to be a failure, but will wait the duration of the transaction timeout for a response."
cancelTransaction in interface IceStunChecker
public Object onTransactionFailed(org.littleshoot.stun.stack.message.StunMessage request,
org.littleshoot.stun.stack.message.StunMessage response)
onTransactionFailed in interface org.littleshoot.stun.stack.transaction.StunTransactionListener
public Object onTransactionSucceeded(org.littleshoot.stun.stack.message.StunMessage request,
org.littleshoot.stun.stack.message.StunMessage response)
onTransactionSucceeded in interface org.littleshoot.stun.stack.transaction.StunTransactionListenerpublic void close()
IceStunChecker
close in interface IceStunChecker
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||