public interface Dispatcher
| Modifier and Type | Field and Description |
|---|---|
static int |
DEFAULT_CONNECTION_TIMEOUT |
static long |
DEFAULT_DISPATCH_INTERVAL |
| Modifier and Type | Method and Description |
|---|---|
void |
clear()
To clear the dispatchers queue
|
boolean |
forceDispatch()
Starts the dispatcher for one cycle if it is currently not working.
|
void |
forceDispatchBlocking()
Dispatch all events in the EventCache and return only after the dispatch is complete.
|
int |
getConnectionTimeOut()
Connection timeout in milliseconds
|
boolean |
getDispatchGzipped() |
long |
getDispatchInterval() |
DispatchMode |
getDispatchMode() |
java.util.List<Packet> |
getDryRunTarget()
For debugging purposes
Mind thread-safety!
|
void |
setConnectionTimeOut(int timeOut)
Timeout when trying to establish connection and when trying to read a response.
|
void |
setDispatchGzipped(boolean dispatchGzipped)
Packets are collected and dispatched in batches.
|
void |
setDispatchInterval(long dispatchInterval)
Packets are collected and dispatched in batches, this intervals sets the pause between batches.
|
void |
setDispatchMode(DispatchMode dispatchMode) |
void |
setDryRunTarget(java.util.List<Packet> dryRunTarget)
For debugging purposes
When this is non null then instead of sending data over the network it will be written into this list.
|
void |
submit(TrackMe trackMe)
Submit for transmission
|
static final int DEFAULT_CONNECTION_TIMEOUT
static final long DEFAULT_DISPATCH_INTERVAL
int getConnectionTimeOut()
void setConnectionTimeOut(int timeOut)
timeOut - timeout in millisecondsvoid setDispatchInterval(long dispatchInterval)
dispatchInterval - in millisecondslong getDispatchInterval()
void setDispatchGzipped(boolean dispatchGzipped)
dispatchGzipped - booleanboolean getDispatchGzipped()
void setDispatchMode(DispatchMode dispatchMode)
DispatchMode getDispatchMode()
boolean forceDispatch()
void forceDispatchBlocking()
void clear()
void submit(TrackMe trackMe)
void setDryRunTarget(java.util.List<Packet> dryRunTarget)
java.util.List<Packet> getDryRunTarget()