33 |
|
//---STATIC METHODS--- |
34 |
|
|
35 |
|
/** |
36 |
– |
* TO BE REMOVED ONCE CODE TIDY HAS COMPLETED! |
37 |
– |
* @deprecated should know longer use this method to construct a refman |
38 |
– |
*/ |
39 |
– |
public static ReferenceManager init(String[] args, String name) throws AlreadyInitialisedException { |
40 |
– |
System.out.println("LEGACY CALL - SORT THIS OUT! name=" + name); |
41 |
– |
if (_instance != null) { |
42 |
– |
throw new AlreadyInitialisedException("init has already been called"); |
43 |
– |
} |
44 |
– |
_instance = new ReferenceManager(args, name); |
45 |
– |
return _instance; |
46 |
– |
} |
47 |
– |
|
48 |
– |
/** |
36 |
|
* This returns a reference to the single instance of the |
37 |
|
* ReferenceManager. |
38 |
|
* |
57 |
|
private ReferenceManager() { |
58 |
|
_orb = ORB.init(new String[] {}, null); |
59 |
|
} |
73 |
– |
|
74 |
– |
/** |
75 |
– |
* TO BE REMOVED ONCE CODE TIDY HAS COMPLETED! |
76 |
– |
* @deprecated should know longer use this method to construct a refman |
77 |
– |
*/ |
78 |
– |
private ReferenceManager(String[] args, String name) { |
79 |
– |
System.out.println("LEGACY CALL - SORT THIS OUT! name=" + name); |
80 |
– |
_orb = ORB.init(args, null); |
81 |
– |
_name = name; |
82 |
– |
} |
60 |
|
|
61 |
|
//---PUBLIC METHODS--- |
62 |
|
|
63 |
|
/** |
64 |
|
* Obtains a CORBA reference through the naming service |
65 |
|
* for the named object. |
66 |
< |
* This will throw a Error if there is an error |
66 |
> |
* Calls the dieWithError() if any exceptions happen! |
67 |
|
* |
68 |
|
* @param name the name of the CORBA object to resolve |
69 |
|
* |
89 |
|
/** |
90 |
|
* Binds a given servant with the given name |
91 |
|
* to the naming service. |
92 |
< |
* Calls the dieWithError()! |
92 |
> |
* Calls the dieWithError() if any exceptions happen! |
93 |
|
* |
94 |
|
* @param objRef a reverence to the servant object |
95 |
|
* @param name the name to bind to the naming service with |
120 |
|
|
121 |
|
/** |
122 |
|
* Activates the POA |
123 |
< |
* This will throw a Error if there is an error |
123 |
> |
* Calls the dieWithError() if any exceptions happen! |
124 |
|
*/ |
125 |
|
public void activatePOA() { |
126 |
|
try { |
142 |
|
*/ |
143 |
|
public String toString() { |
144 |
|
return FormatName.getName( |
145 |
< |
null, |
146 |
< |
this.getClass().getName(), |
145 |
> |
_name, |
146 |
> |
getClass().getName(), |
147 |
|
REVISION); |
148 |
|
} |
149 |
|
|
183 |
|
|
184 |
|
/** |
185 |
|
* Returns a reference to the Root POA |
186 |
< |
* This will throw a Error if there is an error |
186 |
> |
* Calls the dieWithError() if any exceptions happen! |
187 |
|
* |
188 |
|
* @return the reference this class holds |
189 |
|
*/ |
203 |
|
|
204 |
|
/** |
205 |
|
* Returns a reference to the Naming Service |
206 |
< |
* This will throw a Error if there is an error |
206 |
> |
* Calls the dieWithError() if any exceptions happen! |
207 |
|
* |
208 |
|
* @return the reference this class holds |
209 |
|
*/ |
228 |
|
|
229 |
|
/** |
230 |
|
* Returns a reference to the configuration manager |
231 |
< |
* This will throw a Error if there is an error |
231 |
> |
* Calls the dieWithError() if any exceptions happen! |
232 |
|
* |
233 |
|
* @return the reference this class holds |
234 |
|
*/ |
256 |
|
} |
257 |
|
return _logger; |
258 |
|
} |
282 |
– |
|
283 |
– |
/** |
284 |
– |
* Sets the reference to the name |
285 |
– |
* TO BE REMOVED ONCE CODE TIDY HAS COMPLETED! |
286 |
– |
* @deprecated not stored in the refman any more - see Template.class |
287 |
– |
* @param the new name |
288 |
– |
*/ |
289 |
– |
public void setName(String name) { |
290 |
– |
System.out.println("LEGACY CALL - SORT THIS OUT! name=" + name); |
291 |
– |
_name = name; |
292 |
– |
} |
259 |
|
|
294 |
– |
/** |
295 |
– |
* Returns a reference to the name |
296 |
– |
* TO BE REMOVED ONCE CODE TIDY HAS COMPLETED! |
297 |
– |
* @deprecated not stored in the refman any more - see Template.class |
298 |
– |
* @return the reference this class holds |
299 |
– |
*/ |
300 |
– |
public String getName() { |
301 |
– |
System.out.println("LEGACY CALL - SORT THIS OUT! name=" + _name); |
302 |
– |
return _name; |
303 |
– |
} |
304 |
– |
|
260 |
|
//---ATTRIBUTES--- |
261 |
|
|
262 |
|
/** |
285 |
|
private Logger _logger; |
286 |
|
|
287 |
|
/** |
288 |
< |
* The name |
289 |
< |
* TO BE REMOVED ONCE CODE TIDY HAS COMPLETED! |
290 |
< |
* @deprecated not stored in the refman any more - see Template.class |
288 |
> |
* This is the friendly identifier of the |
289 |
> |
* component this class is running in. |
290 |
> |
* eg, a Filter may be called "filter1", |
291 |
> |
* If this class does not have an owning |
292 |
> |
* component, a name from the configuration |
293 |
> |
* can be placed here. This name could also |
294 |
> |
* be changed to null for utility classes. |
295 |
|
*/ |
296 |
< |
private String _name; |
296 |
> |
private String _name = null; |
297 |
|
|
298 |
|
//---STATIC ATTRIBUTES--- |
299 |
|
|