Main Page | Class Hierarchy | Alphabetical List | Class List | File List | Class Members | File Members | Related Pages

NetworkQueue Class Reference

Inheritance diagram for NetworkQueue:

Client NetworkMessage NetworkTask List of all members.

Public Member Functions

 this (ICluster cluster, char[] channel)
IConsumer createConsumer (IEventListener listener)
void put (IPayload payload)
IPayload get ()

Private Member Functions

IChannel getChannel ()
ICluster getCluster ()
long getTime ()
IChannel createChannel (char[] name)

Static Private Member Functions

 this ()

Static Private Attributes

NullMessage EmptyMessage

Detailed Description

Exposes a gateway to the cluster queues, which collect IPayload 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.

Definition at line 49 of file NetworkQueue.d.


Member Function Documentation

this ICluster  cluster,
char[]  channel
[inline]
 

Construct a NetworkQueue gateway on the provided QOS cluster for the specified channel. Each subsequent queue operation will take place over the given channel.

Reimplemented from Client.

Definition at line 59 of file NetworkQueue.d.

IConsumer createConsumer IEventListener  listener  )  [inline]
 

Create a listener for this channel. Listeners are invoked when new content is placed into a corresponding queue.

Definition at line 71 of file NetworkQueue.d.

References ICluster::createConsumer().

Referenced by testClusterMessage(), and testClusterQueue().

void put IPayload  payload  )  [inline]
 

Add an IPayload entry to the corresponding queue. This will throw a ClusterFullException if there is no space left in the clustered queue.

Definition at line 84 of file NetworkQueue.d.

References ICluster::putQueue().

Referenced by testClusterQueue().

IPayload get  )  [inline]
 

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.

Definition at line 99 of file NetworkQueue.d.

References ICluster::getQueue().

this  )  [inline, static, inherited]
 

Definition at line 63 of file Client.d.

References Client::EmptyMessage.

IChannel getChannel  )  [inline, inherited]
 

Return the channel we're tuned to

Definition at line 94 of file Client.d.

References Client::channel.

ICluster getCluster  )  [inline, inherited]
 

Return the cluster specified during construction

Definition at line 105 of file Client.d.

References Client::cluster.

long getTime  )  [inline, inherited]
 

Return the number of milliseconds since Jan 1st 1970

Definition at line 116 of file Client.d.

IChannel createChannel char[]  name  )  [inline, inherited]
 

Create a channel with the specified name. A channel represents something akin to a publush/subscribe topic, or a radio station. These are used to segregate cluster operations into a set of groups, where each group is represented by a channel. Channel names are whatever you want then to be; use of dot notation has proved useful in the past. In fact, a good way to think about channels is to map them directly to a class name. That is, since you typically send and recieve classes on a channel, you might utilize the class name as the channel (this.classinfo.name).

Definition at line 136 of file Client.d.

References Client::cluster, and ICluster::createChannel().


Member Data Documentation

NullMessage EmptyMessage [static, inherited]
 

Definition at line 61 of file Client.d.

Referenced by Client::this().


The documentation for this class was generated from the following file:
Generated on Sun Nov 7 19:07:08 2004 for Mango by doxygen 1.3.6