|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.tomcat.bayeux.ClientImpl
public class ClientImpl
Field Summary | |
---|---|
static java.lang.String |
COMET_EVENT_ATTR
|
protected int |
desirectConnType
The desired connection type |
protected static java.util.LinkedList<Message> |
EMPTY_LIST
|
protected org.jboss.servlet.http.HttpEvent |
event
Currently associated event. |
protected java.lang.String |
id
Unique id representing this client |
protected Listener |
listener
The callback object for local clients |
protected boolean |
local
Same JVM clients, get local=true |
protected java.util.LinkedList<Message> |
messages
queued message for remote clients. |
protected java.util.concurrent.atomic.AtomicInteger |
nrofsubscriptions
|
static int |
SUPPORT_CALLBACK_POLL
|
static int |
SUPPORT_LONG_POLL
|
protected int |
supportedConnTypes
supported connection types, defaults to long-polling |
protected boolean |
useJsonFiltered
Does this client use json-comment-filtered messages |
Constructor Summary | |
---|---|
protected |
ClientImpl(java.lang.String id,
boolean local)
|
Method Summary | |
---|---|
protected void |
addCometEvent(org.jboss.servlet.http.HttpEvent event)
|
void |
deliver(Message message)
Deliver a message to this client only Deliver a message directly to the client. |
void |
deliver(Message[] message)
Deliver a batch of messages to this client only Deliver a batch messages directly to the client. |
protected void |
deliverInternal(ChannelImpl channel,
Message[] msgs)
|
protected void |
deliverInternal(ChannelImpl channel,
MessageImpl message)
|
void |
endBatch()
Ends a batch. since batches can be nested, messages will only be delivered after the endBatch has been called as many times as startBatch has. |
int |
getDesirectConnType()
|
java.lang.String |
getId()
Returns a unique id for this client. |
protected Listener |
getListener()
|
int |
getSupportedConnTypes()
|
boolean |
hasMessages()
Returns true if this client is holding messages to be delivered to the remote client. |
boolean |
isLocal()
|
boolean |
isSubscribed()
|
protected void |
removeCometEvent(org.jboss.servlet.http.HttpEvent event)
|
void |
setDesirectConnType(int desirectConnType)
|
void |
setListener(Listener listener)
|
void |
setSupportedConnTypes(int supportedConnTypes)
|
void |
setUseJsonFiltered(boolean useJsonFiltered)
|
void |
startBatch()
Starts a batch, no messages will be delivered until endBatch is called. |
protected void |
subscribed(ChannelImpl ch)
|
boolean |
supportsCallbackPoll()
|
boolean |
supportsLongPoll()
|
java.util.List<Message> |
takeMessages()
|
java.lang.String |
toString()
|
protected void |
unsubscribed(ChannelImpl ch)
|
boolean |
useJsonFiltered()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final int SUPPORT_CALLBACK_POLL
public static final int SUPPORT_LONG_POLL
public static final java.lang.String COMET_EVENT_ATTR
protected static java.util.LinkedList<Message> EMPTY_LIST
protected java.util.LinkedList<Message> messages
protected org.jboss.servlet.http.HttpEvent event
protected java.lang.String id
protected int supportedConnTypes
protected int desirectConnType
protected boolean useJsonFiltered
protected boolean local
protected Listener listener
protected java.util.concurrent.atomic.AtomicInteger nrofsubscriptions
Constructor Detail |
---|
protected ClientImpl(java.lang.String id, boolean local)
Method Detail |
---|
public void deliver(Message message)
Client
deliver
in interface Client
public void deliver(Message[] message)
Client
deliver
in interface Client
protected void deliverInternal(ChannelImpl channel, MessageImpl message)
protected void deliverInternal(ChannelImpl channel, Message[] msgs)
public java.lang.String getId()
Client
getId
in interface Client
protected Listener getListener()
public boolean hasMessages()
Client
hasMessages
in interface Client
public boolean isLocal()
isLocal
in interface Client
public int getSupportedConnTypes()
public int getDesirectConnType()
public boolean useJsonFiltered()
public void setListener(Listener listener)
public void setSupportedConnTypes(int supportedConnTypes)
public void setUseJsonFiltered(boolean useJsonFiltered)
public void setDesirectConnType(int desirectConnType)
public boolean supportsCallbackPoll()
public boolean supportsLongPoll()
public java.util.List<Message> takeMessages()
public java.lang.String toString()
toString
in class java.lang.Object
public boolean isSubscribed()
protected void addCometEvent(org.jboss.servlet.http.HttpEvent event)
protected void removeCometEvent(org.jboss.servlet.http.HttpEvent event)
protected void subscribed(ChannelImpl ch)
protected void unsubscribed(ChannelImpl ch)
public void startBatch()
Client
startBatch
in interface Client
public void endBatch()
Client
endBatch
in interface Client
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |