public class CotDispatcher
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
TAG |
Constructor and Description |
---|
CotDispatcher() |
Modifier and Type | Method and Description |
---|---|
void |
dispatch(CotEvent event) |
void |
dispatch(CotEvent event,
android.os.Bundle data) |
java.util.List<java.lang.String> |
dispatch(CotEvent event,
android.os.Bundle data,
CoTSendMethod sendMethod)
Returns the contacts which are unknown, known to no longer be reachable, or
who do not match the provided CoTSendMethod.
|
void |
dispatchFrom(CotEvent event,
java.lang.String fromString)
Used as an internal dispatcher with the fromString only specifying which internal component sent it.
|
void |
dispatchToBroadcast(CotEvent event)
Sends a CoTEvent out as a broadcast over all connections, streaming and peer to peer.
|
void |
dispatchToBroadcast(CotEvent event,
CoTSendMethod method)
Sends a CoTEvent out as a broadcast over a specified connection type.
|
void |
dispatchToConnectString(CotEvent event,
java.lang.String connectString)
Instead of the connect string, we will just need to pass down the appropriate
multicast information.
|
void |
dispatchToContact(CotEvent event,
Contact contact)
Send a CotEvent to a specific contact by any known connection type.
|
void |
dispatchToContact(CotEvent event,
Contact contact,
CoTSendMethod method)
Send a CotEvent to a specific contact by a specified sending method.
|
void |
setDispatchFlags(int flags)
Set the dispatch flags to determine basic dispatch behavior (@see DispatchFlags).
|
public static final java.lang.String TAG
public final void setDispatchFlags(int flags)
flags
- one of INTERNAL or EXTERNAL.public final void dispatch(CotEvent event)
public void dispatch(CotEvent event, android.os.Bundle data)
public java.util.List<java.lang.String> dispatch(CotEvent event, android.os.Bundle data, CoTSendMethod sendMethod)
NetConnectString
public final void dispatchToConnectString(CotEvent event, java.lang.String connectString)
event
- the cot event to dispatchconnectString
- the connect string to send the cot event too.public final void dispatchToContact(CotEvent event, Contact contact)
event
- the cot event to dispatchcontact
- the contact to send the event topublic final void dispatchToContact(CotEvent event, Contact contact, CoTSendMethod method)
event
- the cot event to dispatchcontact
- the contact to send the event tomethod
- can be ANY, TAK_SERVER or POINT TO POINT.public final void dispatchToBroadcast(CotEvent event)
event
- the event to dispatch.public final void dispatchToBroadcast(CotEvent event, CoTSendMethod method)
event
- the event to dispatch.method
- can be ANY, TAK_SERVER or POINT TO POINT.public final void dispatchFrom(CotEvent event, java.lang.String fromString)
event
- the cot event to dispatchfromString
- what component is sending this event.