1 |
|
//---PACKAGE DECLARATION--- |
2 |
< |
package uk.ac.ukc.iscream.clientinterface; |
2 |
> |
package uk.org.iscream.clientinterface; |
3 |
|
|
4 |
|
//---IMPORTS--- |
5 |
< |
import uk.ac.ukc.iscream.util.*; |
6 |
< |
import uk.ac.ukc.iscream.componentmanager.*; |
7 |
< |
import uk.ac.ukc.iscream.core.*; |
8 |
< |
import uk.ac.ukc.iscream.client.*; |
5 |
> |
import uk.org.iscream.util.*; |
6 |
> |
import uk.org.iscream.componentmanager.*; |
7 |
> |
import uk.org.iscream.core.*; |
8 |
> |
import uk.org.iscream.client.*; |
9 |
|
|
10 |
|
|
11 |
|
/** |
31 |
|
* Construct a new CorbaDataHandler. |
32 |
|
* |
33 |
|
* @param client A reference to the "servant" part of the connecting client. |
34 |
+ |
* @param cchServer A reference to the class that is control us. |
35 |
|
*/ |
36 |
< |
public CorbaDataHandler(Client client) { |
36 |
> |
public CorbaDataHandler(Client client, CorbaControlHandlerServant cchServant) { |
37 |
> |
// set the Thread name |
38 |
> |
setName("clientinterface.CorbaDataHandler"); |
39 |
> |
|
40 |
|
_queue = new Queue(); |
41 |
|
_client = client; |
42 |
+ |
_cchServant = cchServant; |
43 |
|
_logger.write(toString(), Logger.SYSINIT, "created"); |
44 |
|
} |
45 |
|
|
69 |
|
// lets stop sending, the client has quit |
70 |
|
run = false; |
71 |
|
_logger.write(toString(), Logger.ERROR, "Connection failure, client shutdown? : "+e); |
72 |
+ |
// disconnect the servant above us, or at least try |
73 |
+ |
_cchServant.disconnect(); |
74 |
|
} |
75 |
|
} |
76 |
|
} |
104 |
|
* Overrides the {@link java.lang.Object#toString() Object.toString()} |
105 |
|
* method to provide clean logging (every class should have this). |
106 |
|
* |
107 |
< |
* This uses the uk.ac.ukc.iscream.util.NameFormat class |
107 |
> |
* This uses the uk.org.iscream.util.NameFormat class |
108 |
|
* to format the toString() |
109 |
|
* |
110 |
|
* @return the name of this class and its CVS revision |
168 |
|
* The flag that dictates whether the main loop should *completely* exit |
169 |
|
*/ |
170 |
|
private boolean run; |
171 |
+ |
|
172 |
+ |
/** |
173 |
+ |
* A reference to our controlling class |
174 |
+ |
*/ |
175 |
+ |
private CorbaControlHandlerServant _cchServant; |
176 |
|
|
177 |
|
//---STATIC ATTRIBUTES--- |
178 |
|
|