BSD style: see
license.txt
July 2004: Initial release
Kris
- class NetworkQueue : NetworkClient, IConsumer ¶#
-
Exposes a gateway to the cluster queues, which collect ICached
objects until they are removed. Because there is a finite limit
to the quantity of entries stored, the put() method may throw a
ClusterFullException if it cannot add a new entry.
- this(ICluster cluster, char[] channel, ChannelListener listener = null) ¶#
-
Construct a NetworkMessage gateway on the provided QOS cluster
for the specified channel. Each subsequent queue operation
will take place over the given channel.
You can listen for cluster replies by providing an optional
ChannelListener. Outgoing messages will be tagged appropriately
such that a consumer can respond using IEvent.reply
- void put(IMessage message) ¶#
-
Add an IMessage entry to the corresponding queue. This
will throw a ClusterFullException if there is no space
left in the clustered queue.
- IMessage get() ¶#
-
Query the cluster for queued entries on our corresponding
channel. Returns, and removes, a matching entry from the
cluster. This is the synchronous (polling) approach; you
should use createConsumer() instead for asynchronous style
notification instead.
- void cancel() ¶#
-
Cancel the listener. No more events will be dispatched to
the reply ChannelListener.
- IConsumer createConsumer(ChannelListener listener) ¶#
-
Create a listener for this channel. Listeners are invoked
when new content is placed into a corresponding queue.