|
Openwings API Documentation (v1.0) | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
This interface provides the external interface by which the
computing resources of a platform can be accessed. This interface
extends Container, adding methods that provide
identifying information for a platform and descriptions of
processes which can be run on the platform.
In addition to extending the Container interface
by adding new methods, ContainerManager has slightly
different semantics for some of the methods it inherits from
Container.
PerformanceReport[] getPerformanceReports() throws RemoteExceptionContainerManager. This method returns an array of
PerformanceReport objects that describe the current
loading of the platform. This array must include a
PerformanceReport for every CPU and network
interface on the platform. Subsequent reports are
implementation-defined. The ContainerManager is
not required to generate updated performance reports during
execution of this method, only to report the most recent
performance statistics it has gathered. A
RemoteException is thrown if there is an
error communicating with the ContainerManager.
ContainerProcess createProcess(ComponentDescriptor componentDescriptor) throws RemoteException, ProcessCreationExceptionContainer interface semantics,
a ContainerManager can create process objects for
non-Java processes. Additionally, the ContainerManager should
only accept the same descriptors that it returns from
getRunnableProcesses. Attempting to create a process with
an unknown or modified descriptors should result in a
ProcessCreationException
ContainerProcess[] getProcesses() throws RemoteExceptionContainer interface semantics,
a ContainerManager can return process objects for
non-Java processes. The container should return objects
representing Java processes with the following states
(defined in ContainerProcessStatus):
CREATED, STARTED, FAILED,
and MOVED_CONTAINER.
ContainerProcessStatus[] getStatusOfAllProcesses() throws RemoteExceptionContainer interface semantics,
a ContainerManager can return process status for
non-Java processes.
void registerContainerProcessListener(ContainerProcessListener listener) throws RemoteExceptionContainer interface semantics,
a ContainerManagerListener can be registered with
a ContainerManager, since
ContainerManagerListener extends
ContainerListener.
void unregisterContainerProcessListener(ContainerProcessListener listener) throws RemoteExceptionContainer interface semantics,
a ContainerManagerListener can be unregistered
from a ContainerManager, since
ContainerManagerListener extends
ContainerListener.
void createProcess(ComponentDescriptor componentDescriptor, boolean restart, boolean mobile, String commandLineParameters) throws RemoteExceptionContainer interface semantics,
the ContainerManager uses the value of
componentDescriptor.getSharedContainerHint() to determine
whether the process should be started in a shared container.
| Method Summary | |
ContainerProcess |
createProcess(UniqueID componentID)
This method creates a process inside the container manager based on the unique identifier of a ComponentDescriptor returned
from getRunnableProcesses. |
ContainerProcess |
createProcess(UniqueID componentID,
boolean sharedContainer,
boolean restart,
boolean mobile,
java.lang.String commandLineParameters)
This method creates a process inside the container manager based on the unique identifier of a ComponentDescriptor returned
from getRunnableProcesses. |
ComponentDescriptor[] |
getRunnableProcesses()
This method returns the current list of ComponentDescriptors
that this ContainerManager is able to run. |
| Methods inherited from interface net.openwings.container.Container |
createProcess, createProcess, createProcess, getHost, getID, getPerformanceReports, getProcesses, getStatusOfAllProcesses, registerContainerProcessListener, registerMobileProcessListener, shutdown, unregisterContainerProcessListener, unregisterMobileProcessListener |
| Method Detail |
public ComponentDescriptor[] getRunnableProcesses()
throws java.rmi.RemoteException
ComponentDescriptors
that this ContainerManager is able to run.
ComponentDescriptors,
or null if no processes have been configured or
installed.
java.rmi.RemoteException - if there is an error communicating
with the manager.
public ContainerProcess createProcess(UniqueID componentID)
throws java.rmi.RemoteException,
ProcessCreationException
ComponentDescriptor returned
from getRunnableProcesses. This variant of
createProcess() is used as a shortcut that allows less
information to be passed to start a process. This method returns
an object that can be used to control the process. The process
is not started until the ContainerProcess.start()
method is called. Each call to createProcess()
creates a unique process.
componentID - unique identifier for the component to be started
java.rmi.RemoteException - if there is an error communicating with
the container.
ProcessCreationException - if there is a problem creating
the process or if componentID is unknown.
public ContainerProcess createProcess(UniqueID componentID,
boolean sharedContainer,
boolean restart,
boolean mobile,
java.lang.String commandLineParameters)
throws java.rmi.RemoteException,
ProcessCreationException
ComponentDescriptor returned
from getRunnableProcesses. This variant of
createProcess() allows the lifecycle-related parameters
of the descriptor to be overridden. This method returns
an object that can be used to control the process. The process
is not started until the ContainerProcess.start()
method is called. Each call to createProcess()
creates a unique process.
componentID - unique identifier for the component to be startedsharedContainer - boolean indicating whether this
process should be run standalone or in a container.restart - boolean indicating whether this
process should be restarted on failure.mobile - boolean indicating whether this
process can be moved between containers or platforms.commandLineParameters - command line parameters to be passed to the
process
ContainerProcess
service interface.
java.rmi.RemoteException - if there is an error communicating with
the container.
ProcessCreationException - if there is a problem creating
the process or if componentID is unknown.
|
Openwings API Documentation (v1.0) | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||