public abstract class TransportResolver
extends java.lang.Object
| Modifier and Type | Class and Description |
|---|---|
static class |
TransportResolver.Type |
| Modifier and Type | Field and Description |
|---|---|
protected java.util.List<TransportCandidate> |
candidates |
static int |
CHECK_TIMEOUT |
TransportResolver.Type |
type |
| Modifier | Constructor and Description |
|---|---|
protected |
TransportResolver()
Default constructor.
|
| Modifier and Type | Method and Description |
|---|---|
protected void |
addCandidate(TransportCandidate cand)
Add a new transport candidate
|
void |
addListener(TransportResolverListener li)
Add a transport resolver listener.
|
abstract void |
cancel()
Cancel any asynchronous resolution operation.
|
void |
clear()
Clear the list of candidates and start a new resolution process.
|
protected void |
clearCandidates()
Clear the list of candidate
|
TransportCandidate |
getCandidate(int i)
Get the n-th candidate
|
int |
getCandidateCount()
Get the numer of transport candidates.
|
java.util.Iterator<TransportCandidate> |
getCandidates()
Get an iterator for the list of candidates
|
java.util.List<TransportCandidate> |
getCandidatesList()
Get the list of candidates
|
protected int |
getFreePort()
Obtain a free port we can use.
|
java.util.ArrayList<TransportResolverListener> |
getListenersList()
Get the list of listeners
|
TransportCandidate |
getPreferredCandidate()
Get the candididate with the highest preference.
|
TransportResolver.Type |
getType() |
abstract void |
initialize()
Initialize the Resolver
|
void |
initializeAndWait()
Initialize Transport Resolver and wait until it is complete unitialized.
|
boolean |
isInitialized()
Chack if the Transport Resolver is initialized
|
boolean |
isResolved()
Return true if the resolver has finished the search for transport
candidates.
|
boolean |
isResolving()
Return true if the resolver is working.
|
void |
removeListener(TransportResolverListener li)
Removes a transport resolver listener.
|
abstract void |
resolve(JingleSession session)
Start a the resolution.
|
void |
setInitialized()
Set the Transport Resolver as initialized.
|
protected void |
setResolveEnd()
Indicate the end of the resolution process.
|
protected void |
setResolveInit()
Indicate the beggining of the resolution process.
|
void |
setType(TransportResolver.Type type) |
protected void |
triggerCandidateAdded(TransportCandidate cand)
Trigger a new candidate added event.
|
public TransportResolver.Type type
public static final int CHECK_TIMEOUT
protected final java.util.List<TransportCandidate> candidates
public TransportResolver.Type getType()
public void setType(TransportResolver.Type type)
public abstract void initialize()
throws org.jivesoftware.smack.XMPPException,
org.jivesoftware.smack.SmackException
org.jivesoftware.smack.XMPPExceptionorg.jivesoftware.smack.SmackExceptionpublic abstract void resolve(JingleSession session) throws org.jivesoftware.smack.XMPPException, org.jivesoftware.smack.SmackException
org.jivesoftware.smack.XMPPExceptionorg.jivesoftware.smack.SmackExceptionpublic void clear()
throws org.jivesoftware.smack.XMPPException
org.jivesoftware.smack.XMPPExceptionpublic abstract void cancel()
throws org.jivesoftware.smack.XMPPException
org.jivesoftware.smack.XMPPExceptionpublic boolean isResolving()
public boolean isResolved()
public void setInitialized()
public boolean isInitialized()
protected void setResolveInit()
protected void setResolveEnd()
public void addListener(TransportResolverListener li)
li - The transport resolver listener to be added.public void removeListener(TransportResolverListener li)
li - The transport resolver listener to be removedpublic java.util.ArrayList<TransportResolverListener> getListenersList()
protected void triggerCandidateAdded(TransportCandidate cand) throws org.jivesoftware.smack.SmackException.NotConnectedException
cand - The candidate added to the list of candidates.org.jivesoftware.smack.SmackException.NotConnectedExceptionprotected void clearCandidates()
protected void addCandidate(TransportCandidate cand) throws org.jivesoftware.smack.SmackException.NotConnectedException
cand - The candidate to addorg.jivesoftware.smack.SmackException.NotConnectedExceptionpublic java.util.Iterator<TransportCandidate> getCandidates()
public TransportCandidate getPreferredCandidate()
public int getCandidateCount()
public java.util.List<TransportCandidate> getCandidatesList()
public TransportCandidate getCandidate(int i)
public void initializeAndWait()
throws org.jivesoftware.smack.XMPPException,
org.jivesoftware.smack.SmackException
org.jivesoftware.smack.SmackExceptionorg.jivesoftware.smack.XMPPExceptionprotected int getFreePort()