|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.cometd.common.AbstractTransport
org.cometd.server.AbstractServerTransport
public abstract class AbstractServerTransport
The base class of all server transports.
Each derived Transport class should declare all options that it supports by callingAbstractTransport.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.
| Nested Class Summary | |
|---|---|
static interface |
AbstractServerTransport.OneTimeScheduler
|
static interface |
AbstractServerTransport.Scheduler
|
| Field Summary | |
|---|---|
protected org.slf4j.Logger |
_logger
|
static String |
INTERVAL_OPTION
|
static String |
MAX_INTERVAL_OPTION
|
static String |
MAX_LAZY_OPTION
|
static String |
META_CONNECT_DELIVERY_OPTION
|
static String |
TIMEOUT_OPTION
|
| Constructor Summary | |
|---|---|
protected |
AbstractServerTransport(BayeuxServerImpl bayeux,
String name)
The constructor is passed the BayeuxServerImpl instance for
the transport. |
| Method Summary | |
|---|---|
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 |
| Methods inherited from class org.cometd.common.AbstractTransport |
|---|
getName, getOption, getOption, getOption, getOption, getOption, getOptionNames, getOptionPrefix, setOption, setOptionPrefix |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface org.cometd.bayeux.server.ServerTransport |
|---|
getContext, getCurrentLocalAddress, getCurrentRemoteAddress |
| Methods inherited from interface org.cometd.bayeux.Transport |
|---|
getName, getOption, getOptionNames, getOptionPrefix |
| Field Detail |
|---|
public static final String TIMEOUT_OPTION
public static final String INTERVAL_OPTION
public static final String MAX_INTERVAL_OPTION
public static final String MAX_LAZY_OPTION
public static final String META_CONNECT_DELIVERY_OPTION
protected final org.slf4j.Logger _logger
| Constructor Detail |
|---|
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 transport| Method Detail |
|---|
public 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
ParseException
IOException
protected 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()
protected void debug(String format,
Object... args)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||