|
Openwings API Documentation (v1.1) | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
This interface represents a single execution of a process running
inside a Container or ContainerManager.
It describes the operations that can be performed remotely on a
process. The Container and
ContainerManager interfaces return objects implementing
this interface to provide control of individual processes.
| Method Summary | |
ComponentDescriptor |
getComponentDescriptor()
This method returns the ComponentDescriptor object
that was used to create this ContainerProcess. |
ContainerProcessStatus |
getContainerProcessStatus()
This method returns a ContainerProcessStatus object that
represents the status of the ContainerProcess. |
UniqueID |
getProcessID()
This method returns the unique identifier for this process. |
void |
registerContainerProcessListener(ContainerProcessListener listener)
This method is used to register interest in receiving process status updates from a ContainerProcess. |
void |
start()
This method is used to start the execution of a ContainerProcess object returned from the
Container.createProcess() method. |
void |
stop()
This method is used to explicitly stop the execution of a ContainerProcess object. |
void |
unregisterContainerProcessListener(ContainerProcessListener listener)
This method is used to cancel interest in receiving process status updates from a ContainerProcess. |
| Method Detail |
public UniqueID getProcessID()
throws java.rmi.RemoteException
Container or
ContainerManager.
java.rmi.RemoteException - if there is an error communicating with
the process.
public ComponentDescriptor getComponentDescriptor()
throws java.rmi.RemoteException
ComponentDescriptor object
that was used to create this ContainerProcess. This method
can be called without throwing an IllegalStateException
regardless of the state of the process.
Remember that the lifecycle-related "hint" parameters in the descriptor
may have been overridden when the process was created. Check the
process status to get the actual command line parameters, and to
determine whether the process is mobile, set to be restarted on failure,
or running in a shared container.
ComponentDescriptor object that was used
to start the ContainerProcess
java.rmi.RemoteException - if there is an error communicating with
the process.
public ContainerProcessStatus getContainerProcessStatus()
throws java.rmi.RemoteException
ContainerProcessStatus object that
represents the status of the ContainerProcess. The
ContainerProcess is not required to generate an updated
process status report during execution of this method, only to
report the most recent status report it has. This method can be
called without throwing an IllegalStateException
regardless of the state of the process. After the
ContainerProcess has stopped, this method should return the
final status report.
ContainerProcessStatus object containing the most
recent status of the ContainerProcess
java.rmi.RemoteException - if there is an error communicating with
the process.
public void start()
throws java.lang.IllegalStateException,
java.rmi.RemoteException
ContainerProcess object returned from the
Container.createProcess() method. This method
cannot be called to restart a stopped process.
java.lang.IllegalStateException - if the process is not in the
CREATED state (defined in
ContainerProcessStatus).
java.rmi.RemoteException - if there is an error communicating with
the process.
public void stop()
throws java.rmi.RemoteException
ContainerProcess object.
This method can be called without throwing an
IllegalStateException regardless of the state of the
process.
java.rmi.RemoteException - if there is an error communicating with
the process.
public void registerContainerProcessListener(ContainerProcessListener listener)
throws java.rmi.RemoteException
ContainerProcess.
The ContainerProcess implementation must call the
appropriate method on listener whenever the status of the
process changes.
This method can be called after the process has stopped without
throwing an IllegalStateException, but
listener will never receive any updates.
listener - an object that implements the
ContainerProcessListener interface.
java.rmi.RemoteException - if there is an error communicating with
the process.
public void unregisterContainerProcessListener(ContainerProcessListener listener)
throws java.rmi.RemoteException
ContainerProcess.
The ContainerProcess implementation should no longer call
methods on listener, but method calls that are
already in progress will be completed. This method can be called
after the process has stopped without throwing an
IllegalStateException, but it is not necessary to
explicitly unregister listeners for a stopped process since no
further updates will be generated.
listener - an object that implements the
ContainerProcessListener interface.
java.rmi.RemoteException - if there is an error communicating with
the process.
|
Openwings API Documentation (v1.1) | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||