2 |
|
package uk.ac.ukc.iscream.clientinterface; |
3 |
|
|
4 |
|
//---IMPORTS--- |
5 |
< |
import uk.ac.ukc.iscream.util.*; |
5 |
> |
import uk.ac.ukc.iscream.componentmanager.*; |
6 |
|
import uk.ac.ukc.iscream.core.*; |
7 |
+ |
import uk.ac.ukc.iscream.util.*; |
8 |
|
|
9 |
|
/** |
10 |
|
* This class starts the real time clients |
16 |
|
* @author $Author$ |
17 |
|
* @version $Id$ |
18 |
|
*/ |
19 |
< |
public class ClientInterfaceMain implements uk.ac.ukc.iscream.util.Component { |
19 |
> |
public class ClientInterfaceMain implements Component { |
20 |
|
|
21 |
|
//---FINAL ATTRIBUTES--- |
22 |
|
|
64 |
|
NAME = ourName; |
65 |
|
|
66 |
|
_logger.write(toString(), Logger.SYSINIT, "configured"); |
67 |
< |
|
67 |
> |
|
68 |
> |
// Setup a PacketSorter |
69 |
> |
PacketSorter ps = new PacketSorter(); |
70 |
> |
ps.start(); |
71 |
> |
|
72 |
|
// ClientInterfaceServant start (for inbound data) |
73 |
|
_logger.write(toString(), Logger.DEBUG, "starting servant for inbound data"); |
74 |
< |
ClientInterfaceServant ciServant = new ClientInterfaceServant(); |
74 |
> |
ClientInterfaceServant ciServant = new ClientInterfaceServant(ps); |
75 |
|
_refman.bindToOrb(ciServant, "iscream.ClientInterface." + ClientInterfaceMain.NAME); |
76 |
|
|
77 |
< |
ClientListener clientListener = new ClientListener(listenPort, ciServant); |
78 |
< |
clientListener.start(); |
77 |
> |
// Startup the TCPListener |
78 |
> |
TCPClientListener tcpClientListener = new TCPClientListener(listenPort, ps); |
79 |
> |
tcpClientListener.start(); |
80 |
|
|
81 |
|
_logger.write(toString(), Logger.SYSINIT, "started"); |
82 |
|
} |
92 |
|
*/ |
93 |
|
public String toString() { |
94 |
|
return FormatName.getName( |
95 |
< |
_name, |
95 |
> |
NAME, |
96 |
|
getClass().getName(), |
97 |
|
REVISION); |
98 |
|
} |
102 |
|
//---ACCESSOR/MUTATOR METHODS--- |
103 |
|
|
104 |
|
//---ATTRIBUTES--- |
99 |
– |
|
100 |
– |
/** |
101 |
– |
* This is the friendly identifier of the |
102 |
– |
* component this class is running in. |
103 |
– |
* eg, a Filter may be called "filter1", |
104 |
– |
* If this class does not have an owning |
105 |
– |
* component, a name from the configuration |
106 |
– |
* can be placed here. This name could also |
107 |
– |
* be changed to null for utility classes. |
108 |
– |
*/ |
109 |
– |
private String _name = ClientInterfaceMain.NAME; |
105 |
|
|
106 |
|
/** |
107 |
|
* This holds a reference to the |