public abstract class AbstractServerTransport extends AbstractTransport implements ServerTransport
AbstractTransport.setOption(String, Object) for each option.
Then during the call the init(), each transport should
call the variants of AbstractTransport.getOption(String) to obtained the configured
value for the option.| Modifier and Type | Class and Description |
|---|---|
static interface |
AbstractServerTransport.OneTimeScheduler |
static interface |
AbstractServerTransport.Scheduler |
| Modifier and Type | Field and Description |
|---|---|
protected org.slf4j.Logger |
_logger |
static String |
INTERVAL_OPTION |
static String |
MAX_INTERVAL_OPTION |
static String |
MAX_LAZY_TIMEOUT_OPTION |
static String |
MAX_QUEUE_OPTION |
static String |
META_CONNECT_DELIVERY_OPTION |
static String |
RANDOMIZE_LAZY_TIMEOUT_OPTION |
static String |
TIMEOUT_OPTION |
| Modifier | Constructor and Description |
|---|---|
protected |
AbstractServerTransport(BayeuxServerImpl bayeux,
String name)
The constructor is passed the
BayeuxServerImpl instance for
the transport. |
| Modifier and Type | Method and Description |
|---|---|
protected void |
debug(String format,
Object... args) |
protected void |
destroy() |
Object |
getAdvice() |
BayeuxServerImpl |
getBayeux()
Get the bayeux.
|
long |
getInterval()
Get the interval.
|
long |
getMaxInterval()
Get the maxInterval.
|
long |
getMaxLazyTimeout()
Get the max time before dispatching lazy message.
|
long |
getTimeout() |
protected void |
init()
Initialise the transport, resolving default and direct options.
|
boolean |
isMetaConnectDeliveryOnly() |
protected ServerMessage.Mutable[] |
parseMessages(BufferedReader reader,
boolean jsonDebug) |
protected ServerMessage.Mutable[] |
parseMessages(String json) |
void |
setAdvice(Object advice)
Set the advice.
|
void |
setInterval(long interval)
Set the interval.
|
void |
setMaxInterval(long maxInterval)
Set the maxInterval.
|
void |
setMaxLazyTimeout(long maxLazyTimeout)
Set the maxLazyTimeout.
|
void |
setMetaConnectDeliveryOnly(boolean meta) |
void |
setTimeout(long timeout)
Set the timeout.
|
protected void |
sweep()
Housekeeping sweep, called a regular intervals
|
getName, getOption, getOption, getOption, getOption, getOption, getOptionNames, getOptionPrefix, setOption, setOptionPrefixclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetContextgetName, getOption, getOptionNames, getOptionPrefixpublic static final String TIMEOUT_OPTION
public static final String INTERVAL_OPTION
public static final String MAX_INTERVAL_OPTION
public static final String MAX_LAZY_TIMEOUT_OPTION
public static final String RANDOMIZE_LAZY_TIMEOUT_OPTION
public static final String META_CONNECT_DELIVERY_OPTION
public static final String MAX_QUEUE_OPTION
protected final org.slf4j.Logger _logger
protected AbstractServerTransport(BayeuxServerImpl bayeux, String name)
The constructor is passed the BayeuxServerImpl instance for
the transport. The BayeuxServerImpl.getOptions() map is
populated with the default options known by this transport. The options
are then inspected again when init() is called, to set the
actual values used. The options are arranged into a naming hierarchy
by derived classes adding prefix by calling add AbstractTransport.setOptionPrefix(String).
Calls to AbstractTransport.getOption(String) will use the list of prefixes
to search for the most specific option set.
bayeux - the BayeuxServer implementationname - the name of the transportpublic Object getAdvice()
getAdvice in interface ServerTransportpublic long getInterval()
getInterval in interface ServerTransportpublic long getMaxInterval()
getMaxInterval in interface ServerTransportpublic long getMaxLazyTimeout()
getMaxLazyTimeout in interface ServerTransportpublic long getTimeout()
getTimeout in interface ServerTransportpublic boolean isMetaConnectDeliveryOnly()
isMetaConnectDeliveryOnly in interface ServerTransportpublic void setMetaConnectDeliveryOnly(boolean meta)
protected void init()
protected void destroy()
protected ServerMessage.Mutable[] parseMessages(BufferedReader reader, boolean jsonDebug) throws ParseException, IOException
ParseExceptionIOExceptionprotected ServerMessage.Mutable[] parseMessages(String json) throws ParseException
ParseExceptionpublic BayeuxServerImpl getBayeux()
public void setInterval(long interval)
interval - the interval to setpublic void setMaxInterval(long maxInterval)
maxInterval - the maxInterval to setpublic void setTimeout(long timeout)
timeout - the timeout to setpublic void setMaxLazyTimeout(long maxLazyTimeout)
maxLazyTimeout - the maxLazyTimeout to setpublic void setAdvice(Object advice)
advice - the advice to setprotected void sweep()
Copyright © 2008-2013 Dojo Foundation. All Rights Reserved.