StillActivatableServerImplpublic class StillActivatableServerImpl extends Object implements ThisOrThatServer
Fields Summary |
---|
private String | myName |
Constructors Summary |
---|
public StillActivatableServerImpl(String name, String src, int port)
// "Regular" constructor used to create a "pre-activated" server
// Register and export object
Activatable.exportObject(this, src, new MarshalledObject(name),
false, port);
// Save name
myName = name;
//{{INIT_CONTROLS
//}}
| public StillActivatableServerImpl(ActivationID id, MarshalledObject arg)
// Export this object with the given activation id, on random port
Activatable.exportObject(this, id, 0);
// Check incoming data passed in with activation request
try {
Object oarg = arg.get();
if (oarg instanceof String) {
myName = (String)oarg;
}
else {
System.out.println("Unknown argument received on activation: " + oarg);
}
}
catch(Exception e) {
System.out.println("Error retrieving argument to activation");
}
|
|