132
|
1 /*******************************************************************************
|
|
2
|
|
3 copyright: Copyright (c) 2004 Kris Bell. All rights reserved
|
|
4
|
|
5 license: BSD style: $(LICENSE)
|
|
6
|
|
7 version: July 2004: Initial release
|
|
8
|
|
9 author: Kris
|
|
10
|
|
11 *******************************************************************************/
|
|
12
|
|
13 module tango.net.cluster.NetworkTask;
|
|
14
|
|
15 private import tango.net.cluster.NetworkClient;
|
|
16
|
|
17 /*******************************************************************************
|
|
18
|
|
19 *******************************************************************************/
|
|
20
|
|
21 class NetworkTask : NetworkClient
|
|
22 {
|
|
23 /***********************************************************************
|
|
24
|
|
25 Construct a NetworkTask gateway on the provided QOS cluster
|
|
26 for the specified channel. Each subsequent task operation
|
|
27 will take place over the given channel.
|
|
28
|
|
29 ***********************************************************************/
|
|
30
|
|
31 this (ICluster cluster, char[] channel)
|
|
32 {
|
|
33 super (cluster, channel);
|
|
34 }
|
|
35
|
|
36 /***********************************************************************
|
|
37
|
|
38 Add an ITask entry to the corresponding queue. This
|
|
39 will throw a ClusterFullException if there is no space
|
|
40 left in the clustered queue.
|
|
41
|
|
42 ***********************************************************************/
|
|
43
|
|
44 void execute (IMessage task)
|
|
45 {
|
|
46 channel.execute (task);
|
|
47 }
|
|
48 }
|
|
49
|