56 |
|
|
57 |
import java.io.IOException; |
import java.io.IOException; |
58 |
|
|
59 |
|
import java.net.Socket; |
60 |
|
|
61 |
/** |
/** |
62 |
* The Classpath implementation of the {@link Delegate} functionality in the |
* The Classpath implementation of the {@link Delegate} functionality in the |
63 |
* case, when the object was constructed from an IOR object. The IOR can be |
* case, when the object was constructed from an IOR object. The IOR can be |
283 |
|
|
284 |
return request.getParameterStream(); |
return request.getParameterStream(); |
285 |
} |
} |
286 |
} |
|
287 |
|
/** |
288 |
|
* If there is an opened cache socket to access this object, close |
289 |
|
* that socket. |
290 |
|
* |
291 |
|
* @param target The target is not used, this delegate requires a |
292 |
|
* single instance per object. |
293 |
|
*/ |
294 |
|
public void release(org.omg.CORBA.Object target) |
295 |
|
{ |
296 |
|
String key = ior.Internet.host + ":" + ior.Internet.port; |
297 |
|
|
298 |
|
Socket socket = SocketRepository.get_socket(key); |
299 |
|
try |
300 |
|
{ |
301 |
|
if (socket != null) |
302 |
|
{ |
303 |
|
socket.close(); |
304 |
|
} |
305 |
|
} |
306 |
|
catch (IOException ex) |
307 |
|
{ |
308 |
|
// do nothing, then. |
309 |
|
} |
310 |
|
} |
311 |
|
} |