Modifier and Type | Field and Description |
---|---|
static String |
COMET_EVENT_ATTR |
protected int |
desirectConnType
The desired connection type
|
protected static LinkedList<Message> |
EMPTY_LIST |
protected HttpEvent |
event
Currently associated event.
|
protected 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 LinkedList<Message> |
messages
queued message for remote clients.
|
protected 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
|
Modifier | Constructor and Description |
---|---|
protected |
ClientImpl(String id,
boolean local) |
Modifier and Type | Method and Description |
---|---|
protected void |
addCometEvent(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.
|
int |
getDesirectConnType() |
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(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() |
List<Message> |
takeMessages() |
String |
toString() |
protected void |
unsubscribed(ChannelImpl ch) |
boolean |
useJsonFiltered() |
public static final int SUPPORT_CALLBACK_POLL
public static final int SUPPORT_LONG_POLL
public static final String COMET_EVENT_ATTR
protected static LinkedList<Message> EMPTY_LIST
protected LinkedList<Message> messages
protected HttpEvent event
protected String id
protected int supportedConnTypes
protected int desirectConnType
protected boolean useJsonFiltered
protected boolean local
protected Listener listener
protected AtomicInteger nrofsubscriptions
protected ClientImpl(String id, boolean local)
public void deliver(Message message)
Client
public void deliver(Message[] message)
Client
protected void deliverInternal(ChannelImpl channel, MessageImpl message)
protected void deliverInternal(ChannelImpl channel, Message[] msgs)
public String getId()
Client
protected Listener getListener()
public boolean hasMessages()
Client
hasMessages
in interface Client
public boolean isLocal()
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 boolean isSubscribed()
protected void addCometEvent(HttpEvent event)
protected void removeCometEvent(HttpEvent event)
protected void subscribed(ChannelImpl ch)
protected void unsubscribed(ChannelImpl ch)
public void startBatch()
Client
startBatch
in interface Client
Copyright © 2014 JBoss by Red Hat. All Rights Reserved.