FileDocCategorySizeDatePackage
StillActivatableServerImpl.javaAPI DocExample2262Wed Apr 05 11:25:42 BST 2000None

StillActivatableServerImpl

public 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");
    }
  
Methods Summary
private java.lang.StringdoSomething(java.lang.String what, java.lang.String todo)

    String result = myName + ": " + what + " " + todo + " is done.";
    return result;
  
public java.lang.StringdoThat(java.lang.String todo)

    String result = doSomething("that", todo);
    return result;
  
public java.lang.StringdoThis(java.lang.String todo)

    String result = doSomething("this", todo);
    return result;