|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.objectweb.jac.core.dist.RemoteContainer
RemoteContainer is used as a delegate by daemons (Distd) that hold remote objects.
A remote container enables JAC objects to access and manipulate objects located on other Java VMs.
Distd
,
Serialized FormField Summary | |
String |
name
The name of the container. |
static boolean |
verbose
Verbose tells whether information message should be printed or not. |
Constructor Summary | |
RemoteContainer()
Create a new empty container. |
|
RemoteContainer(boolean verbose)
Create a new container. |
|
RemoteContainer(String className,
boolean verbose)
Create a new container and instantiates an object. |
Method Summary | |
static RemoteContainer |
bindNewContainer(String name)
This method dynamically binds the local container to a new remote container. |
RemoteRef |
bindTo(String name)
Returns a remote reference on the object corresponding to the given name. |
void |
copy(String name,
int index,
String[] fields,
byte[] state,
byte[] collaboration)
Copy a state into a base object. |
boolean |
equals(Object container)
Check the equality of two containers (on the name). |
byte[] |
getByteCodeFor(String className)
Gets the bytecode for the given class by using the current loader. |
String |
getName()
Getter method for field name. |
int |
instantiates(String name,
String className,
Object[] args,
String[] fields,
byte[] state,
byte[] collaboration)
This method instantiates a className object. |
byte[] |
invoke(int index,
String methodName,
byte[] args,
byte[] collaboration)
Invoke a method on a base object. |
byte[] |
invokeRoleMethod(int index,
String methodName,
byte[] args,
byte[] collaboration)
|
boolean |
isLocal()
Return true if the container is local. |
static boolean |
isLocal(String name)
Return true if the container is local. |
void |
launchRemoteGUI()
Launches a administration GUI on a remote container. |
static RemoteContainer |
resolve(String name)
This class method resolve a container from its name. |
void |
setName(String name)
Setter method for field name. |
String |
toString()
Return a textual representation of a container (its name). |
Methods inherited from class java.lang.Object |
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
public static boolean verbose
public String name
Constructor Detail |
public RemoteContainer(boolean verbose)
verbose
- true if information messages are to be printedpublic RemoteContainer(String className, boolean verbose)
className
- the name of the class to instantiateverbose
- true if information messages are to be printedpublic RemoteContainer()
RMIRemoteContainerStub
Method Detail |
public static RemoteContainer bindNewContainer(String name)
name
- the remote container to bind topublic String getName()
public void setName(String name)
Note that this method does not bind the container. It simply sets the value of field name. Use resolve(name) to bind a container to a name.
The name can be an incomplete name since it is completed by the
getFullHostName
method.
name
- the name of the containerresolve(String)
,
Distd.getFullHostName(String)
public static boolean isLocal(String name)
name
- the container name to resolve
resolve(String)
,
isLocal()
public static RemoteContainer resolve(String name)
Property org.objectweb.jac.dist.remoteContainerClass defines the class of the actual RemoteContainer returned (e.g. CORBARemoteContainer). If the property is not defined or if the class does not exist, RMIRemoteContainer is the default.
name
- the name of the container
public boolean isLocal()
RemoteContainer objects are always locals. RemoteContainer stubs objects (see RMIRemoteContainerStub) may not always be local.
Distd.containsContainer(RemoteContainer)
public int instantiates(String name, String className, Object[] args, String[] fields, byte[] state, byte[] collaboration)
Clients call it to remotely instantiate an object.
instantiates
creates an object and returns its
local JAC index.
The object's name can be null. If not, the object is registered into the local repository.
The Aspect Component Manager is upcalled to notify the system from a remote instantiation.
name
- the name of the objectclassName
- the class name to instantiateargs
- initialization arguments for the instantiationfields
- the object fields that are part of the statestate
- the state to copy
ACManager.whenRemoteInstantiation(Wrappee,String)
public void copy(String name, int index, String[] fields, byte[] state, byte[] collaboration)
index
- the base object index (see org.objectweb.jac.core.JacObject
)fields
- the object fields that are part of the statestate
- the state to copypublic byte[] invoke(int index, String methodName, byte[] args, byte[] collaboration)
The base object is the remote counterpart of a local object that
has been remotely instantiated by the Distd
daemon.
index
- the callee index (see org.objectweb.jac.core.JacObject)methodName
- the called method nameargs
- the called method argumentscollaboration
- the collaboration coming from the calling host
public byte[] invokeRoleMethod(int index, String methodName, byte[] args, byte[] collaboration)
public byte[] getByteCodeFor(String className)
This method is used by distributed loaders to fetch classes bytecodes from JAC remote containers that are classes repositories.
className
- the class name
public RemoteRef bindTo(String name)
Note: This method has been added for practical reason but introduces a implicit dependency towards the naming aspect. If the naming aspect is not woven, then this method does not mean anything and the returned remote reference is null.
name
- the name of the object to bind to
public boolean equals(Object container)
container
- the container to check
public String toString()
public void launchRemoteGUI()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |