osl.manager
Class ActorCreateRequest

java.lang.Object
  |
  +--osl.manager.ActorRequest
        |
        +--osl.manager.ActorCreateRequest

public class ActorCreateRequest
extends ActorRequest

This class packages a request to create a new actor.

Version:
$Revision: 1.6 $ ($Date: 1999/03/06 21:18:36 $)
See Also:
Actor, ActorManager, Serialized Form

Field Summary
 java.lang.Class behToCreate
          The class of the new actor requested.
 java.lang.Object[] constructorArgs
          The array of arguments to pass to the constructor of the newly created actor behavior.
 ActorContext context
          The context that should be associated with the new actor.
 java.lang.Class implToCreate
          The class of the implementation of the new actor.
 ActorName requester
          The actor performing the creation.
 ActorManagerName site
          The name of the ActorManager on which to construct the new actor.
 
Fields inherited from class osl.manager.ActorRequest
ID, originator, tags
 
Constructor Summary
ActorCreateRequest()
          The default constructor.
ActorCreateRequest(ActorName R, java.lang.Class toCreate, java.lang.Class toImpl, java.lang.Object[] args, ActorManagerName loc)
          The usual constructor that is used to build creation requests.
 
Method Summary
 java.lang.Object clone()
          Provide a "safe" clone of a create request.
 void readExternal(java.io.ObjectInput in)
          Deserialize into a new instnace of UDPAddress by reading from the given input stream.
 java.lang.String toString()
          A useful method for debugging.
 void writeExternal(java.io.ObjectOutput out)
          Serialize the contents of this class to the output stream.
 
Methods inherited from class osl.manager.ActorRequest
addTag, equals, getTag, hashCode, valid
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

requester

public ActorName requester
The actor performing the creation.

behToCreate

public transient java.lang.Class behToCreate
The class of the new actor requested. This should be a subclass of Actor.

implToCreate

public transient java.lang.Class implToCreate
The class of the implementation of the new actor. This should be a subclass of ActorImpl.

constructorArgs

public java.lang.Object[] constructorArgs
The array of arguments to pass to the constructor of the newly created actor behavior.

site

public ActorManagerName site
The name of the ActorManager on which to construct the new actor.

context

public ActorContext context
The context that should be associated with the new actor.
Constructor Detail

ActorCreateRequest

public ActorCreateRequest()
The default constructor. Note that this DOES NOT construct a legal creation request.

ActorCreateRequest

public ActorCreateRequest(ActorName R,
                          java.lang.Class toCreate,
                          java.lang.Class toImpl,
                          java.lang.Object[] args,
                          ActorManagerName loc)
The usual constructor that is used to build creation requests.
Method Detail

toString

public java.lang.String toString()
A useful method for debugging. Returns a string representation of this create request.
Overrides:
toString in class ActorRequest

clone

public java.lang.Object clone()
                       throws ActorRequestCloneException
Provide a "safe" clone of a create request. A safe create request clone is a regular clone of the original request with the exception that a deep copy is performed on the constructorArgs and context fields. This allows cloning to be used when an a copy of a ActorCreateRequest must be created for starting a new local actor.
Throws:
ActorRequestCloneException - Thrown as a wrapper for any error which occurs during clone creation. Typically, this exception is thrown due to a serialization error in the constructorArgs field. This field is serialized in order to create a deep copy. We use a deep copy to prevent the creation of hidden channels between actors sharing a reference to a common object.
Overrides:
clone in class ActorRequest

writeExternal

public void writeExternal(java.io.ObjectOutput out)
                   throws java.io.IOException
Serialize the contents of this class to the output stream.
Parameters:
out - The OutputStream to which we should write this instance.
Overrides:
writeExternal in class ActorRequest

readExternal

public void readExternal(java.io.ObjectInput in)
                  throws java.io.IOException,
                         java.lang.ClassNotFoundException
Deserialize into a new instnace of UDPAddress by reading from the given input stream.

Parameters:
in - The InputStream from which we should deserialize this instance.
Throws:
java.io.IOException - Thrown if an I/O error is encountered while reading the input stream.
java.lang.ClassNotFoundException - Thrown if a class being deserialized from the input stream cannot be found by the class loader.
java.lang.ClassCastException - Thrown if a class deserialized from the input stream had an unexpected type.
Overrides:
readExternal in class ActorRequest