org.cometd.server
Class ServerTransport

java.lang.Object
  extended by org.cometd.server.ServerTransport
All Implemented Interfaces:
Transport
Direct Known Subclasses:
HttpTransport

public class ServerTransport
extends java.lang.Object
implements Transport


Nested Class Summary
static interface ServerTransport.Dispatcher
           
 
Field Summary
protected  java.lang.Object _advice
           
protected  BayeuxServerImpl _bayeux
           
protected  long _interval
           
protected  long _maxInterval
           
protected  long _maxLazyTimeout
           
protected  boolean _metaConnectDeliveryOnly
           
protected  java.util.List<java.lang.String> _prefix
           
protected  long _timeout
           
static java.lang.String INTERVAL_OPTION
           
static java.lang.String MAX_INTERVAL_OPTION
           
static java.lang.String MAX_LAZY_OPTION
           
static java.lang.String META_CONNECT_DELIVERY_OPTION
           
static java.lang.String TIMEOUT_OPTION
           
 
Constructor Summary
protected ServerTransport(BayeuxServerImpl bayeux, java.lang.String name, java.util.Map<java.lang.String,java.lang.Object> options)
           
 
Method Summary
 java.lang.Object getAdvice()
           
 long getInterval()
          Get the interval.
 long getMaxInterval()
          Get the maxInterval.
 long getMaxLazyTimeout()
          Get the max time before dispatching lazy message.
 java.lang.String getName()
           
 java.lang.Object getOption(java.lang.String name)
           
 boolean getOption(java.lang.String option, boolean dftValue)
           
 int getOption(java.lang.String option, int dftValue)
           
 long getOption(java.lang.String option, long dftValue)
           
 java.lang.String getOption(java.lang.String option, java.lang.String dftValue)
           
 java.util.Set<java.lang.String> getOptionNames()
           
 java.lang.String getOptionPrefix()
           
 long getTimeout()
          Get the timeout.
protected  void init()
          Initialise the transport.
 boolean isMetaConnectDeliveryOnly()
           
 void setMetaConnectDeliveryOnly(boolean meta)
           
 void setOption(java.lang.String name, java.lang.Object value)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

TIMEOUT_OPTION

public static final java.lang.String TIMEOUT_OPTION
See Also:
Constant Field Values

INTERVAL_OPTION

public static final java.lang.String INTERVAL_OPTION
See Also:
Constant Field Values

MAX_INTERVAL_OPTION

public static final java.lang.String MAX_INTERVAL_OPTION
See Also:
Constant Field Values

MAX_LAZY_OPTION

public static final java.lang.String MAX_LAZY_OPTION
See Also:
Constant Field Values

META_CONNECT_DELIVERY_OPTION

public static final java.lang.String META_CONNECT_DELIVERY_OPTION
See Also:
Constant Field Values

_bayeux

protected final BayeuxServerImpl _bayeux

_interval

protected long _interval

_maxInterval

protected long _maxInterval

_timeout

protected long _timeout

_maxLazyTimeout

protected long _maxLazyTimeout

_metaConnectDeliveryOnly

protected boolean _metaConnectDeliveryOnly

_advice

protected java.lang.Object _advice

_prefix

protected final java.util.List<java.lang.String> _prefix
Constructor Detail

ServerTransport

protected ServerTransport(BayeuxServerImpl bayeux,
                          java.lang.String name,
                          java.util.Map<java.lang.String,java.lang.Object> options)
Method Detail

getAdvice

public java.lang.Object getAdvice()

getInterval

public long getInterval()
Get the interval.

Returns:
the interval

getMaxInterval

public long getMaxInterval()
Get the maxInterval.

Returns:
the maxInterval

getMaxLazyTimeout

public long getMaxLazyTimeout()
Get the max time before dispatching lazy message.

Returns:
the max lazy timeout in MS

getName

public java.lang.String getName()
Specified by:
getName in interface Transport

getOption

public java.lang.Object getOption(java.lang.String name)
Specified by:
getOption in interface Transport

getOption

public boolean getOption(java.lang.String option,
                         boolean dftValue)

getOption

public int getOption(java.lang.String option,
                     int dftValue)

getOption

public long getOption(java.lang.String option,
                      long dftValue)

getOption

public java.lang.String getOption(java.lang.String option,
                                  java.lang.String dftValue)

getOptionNames

public java.util.Set<java.lang.String> getOptionNames()
Specified by:
getOptionNames in interface Transport
See Also:
AbstractTransport.getOptionNames()

getOptionPrefix

public java.lang.String getOptionPrefix()
Specified by:
getOptionPrefix in interface Transport

getTimeout

public long getTimeout()
Get the timeout.

Returns:
the timeout

isMetaConnectDeliveryOnly

public boolean isMetaConnectDeliveryOnly()

setMetaConnectDeliveryOnly

public void setMetaConnectDeliveryOnly(boolean meta)

setOption

public void setOption(java.lang.String name,
                      java.lang.Object value)

init

protected void init()
Initialise the transport. Initialise the transport, resolving default and direct options. After the call to init, the #getMutableOptions() set should be reset to reflect only the options that can be changed on a running transport. This implementation clears the mutable options set.



Copyright © 2010 Dojo Foundation. All Rights Reserved.