This class holds information about a Binding Component (BC) or a Service
Engine (SE). This information is used by the JBI framework to install and
manage BCs and SEs. Some of the information is permanent, and is persisted
by the Component Registry across restarts of the JBI framework. Other
information is only relevant for the duration of a JBI framework lifecycle.
All attributes that are not persisted are marked transient.
author: Sun Microsystems, Inc.
getStatusAsString(ComponentState status) Get a component state as a string value.
Parameters: status - A state, either LOADED, SHUTDOWN,STARTED, or STOPPED.
isEngine() Check to see if this component is a SE.
public boolean
isInitialized() Check to see if this component is initialized.
public boolean
isInstalled() Check to see if this component is installed.
public boolean
isLoaded() Check to see if this component is loaded.
public boolean
isObserver() Check to see if this component is an NMR observer.
public boolean
isServiceUnitRegistered(String serviceUnitName) Check to see if a Service Unit is registered to this component.
Parameters: serviceUnitName - the unique name of the Service Unit.
public boolean
isShutDown() Check to see if this component is shut down.
public boolean
isStarted() Check to see if this component is started.
public boolean
isStopped() Check to see if this component is stopped.
public boolean
isUpdating() Check to see if this component is being updated.
public void
removeServiceUnit(String serviceUnitName) Remove a ServiceUnit object from the list of Service Units deployed to
this BC or SE.
public void
setBootstrapClassLoaderSelfFirst(boolean isSelfFirst) Set the flag that determines the hierarchy for the bootstrap class loader
which is true for self-first or false for parent-first.
public void
setBootstrapClassName(String className) Set the class name of the bootstrap implementation for this
BC or SE.
public void
setBootstrapClassPathElements(List classPathElements) Set the class path elements for the bootstrap implementation for this
BC or SE.
public void
setBootstrapCleanUpNeeded(boolean isCleanUpNeeded) Set the flag that indicates whether the bootstrap cleanUp() method needs
to be called.
public synchronized void
setBusy() Set the flag indicating the component is busy processing a life cycle
operation.
public void
setBusyForce() Set the flag indicating the component is busy processing a life cycle
operation.
public void
setComponentClassLoaderSelfFirst(boolean isSelfFirst) Set the flag that determines the hierarchy for the component class loader
which is true for self-first or false for parent-first.
public void
setComponentClassName(String className) Set the class name of the Component implementation for this component.
public void
setComponentClassPathElements(List classPathElements) Set the class path elements that this BC or SE needs in its runtime
environment.
Add a ServiceUnit object to the list of Service Units deployed to this
BC or SE.
Parameters: serviceUnit - The ServiceUnit object representing the Service Unit. throws: javax.jbi.JBIException - if the Service Unit is already in the list.
Compare another Object with this one for equality.
Parameters: object - The object to be compared with this one. True if the object is equal to this Component, falseif they are not equal.
Get the class path elements that this BC or SE needs in its bootstrap
runtime environment.
A list of the elements of the bootstrap class path as strings.
Get an instance of the bootstrap class for this BC or SE. This method
can create a new instance if necessary. This is controlled by the
canCreate parameter. If the value of canCreate
is true, then if there is no instance of the bootstrap
class a new one is created. In this case, the return value is guaranteed
to be non-null. If the value of canCreate is false,
then a new instance of the bootstrap class is never created. In this
case, the return value can be null if there is no bootstrap instance.
Parameters: canCreate - Is true if a new instance of the bootstrap class canbe created if one does not already exist, and false if no new instancecan be created. The bootstrap class instance. throws: javax.jbi.JBIException - if the class cannot be loaded.
Get the javax.jbi.component.Component instance for the BC or SE. If none
is available, returns null.
The instance of javax.jbi.component.Component or null if noinstance is currently available.
Get an instance of the life cycle class for this BC or SE. This method
can create a new instance if necessary. This is controlled by the
canCreate parameter. If the value of canCreate
is true, then if there is no instance of the life cycle
class a new one is created. In this case, the return value is guaranteed
to be non-null. If the value of canCreate is false,
then a new instance of the life cycle class is never created. In this
case, the return value can be null if there is no life cycle instance.
Parameters: canCreate - is true if a new instance of the life cycle class canbe created if one does not already exist, and false if no new instancecan be created. The life cycle class instance. throws: javax.jbi.JBIException - if the class cannot be loaded.
Get the ServiceUnit object for a specified Service Unit name. If none
is found, return null.
Parameters: serviceUnitName - The unique name of the Service Unit. The Service Unit or null if not found.
Get the instance of the statistics MBean. If there is none, return null.
Instance of com.sun.jbi.monitoring.ComponentStatisticsBaseor null if no instance is currently available.
Get a component state as a string value.
Parameters: status - A state, either LOADED, SHUTDOWN,STARTED, or STOPPED. The status as a string, either "loaded", "installed", "started",or "stopped".
Check to see if this component is a BC.
True if the component is a BC, false if not.
isBootstrapClassLoaderSelfFirst
public boolean isBootstrapClassLoaderSelfFirst()(Code)
Check to see if the bootstrap class loader should use a self-first
search hierarchy.
True if the bootstrap class loader should use a self-firstsearch hierarchy, false if it should use parent-first.
Check to see if the bootstrap cleanUp() method needs to be called.
true if the bootstrap cleanUp() method should be called, orfalse if it has already been called.
Return an indication of whether the class loaders for this component
should use the self-first hierarchy.
true/false depending on the value of the ClassLoaderSelfFirst attribute.
isComponentClassLoaderSelfFirst
public boolean isComponentClassLoaderSelfFirst()(Code)
Check to see if the component class loader should use a self-first
search hierarchy.
True if the component class loader should use a self-firstsearch hierarchy, false if it should use parent-first.
Check to see if this component is an NMR observer.
true if the component is an observer,false if not.
isServiceUnitRegistered
public boolean isServiceUnitRegistered(String serviceUnitName)(Code)
Check to see if a Service Unit is registered to this component.
Parameters: serviceUnitName - the unique name of the Service Unit. true if the Service Unit is registered, false if not.
Remove a ServiceUnit object from the list of Service Units deployed to
this BC or SE.
Parameters: serviceUnitName - The name of the Service Unit. throws: javax.jbi.JBIException - if no service unit is found by thespecified name.
setBootstrapClassLoaderSelfFirst
public void setBootstrapClassLoaderSelfFirst(boolean isSelfFirst)(Code)
Set the flag that determines the hierarchy for the bootstrap class loader
which is true for self-first or false for parent-first.
Parameters: isSelfFirst - is true for a self-first class loading hierarchy, orfalse for a parent-first hierarchy.
setBootstrapClassName
public void setBootstrapClassName(String className)(Code)
Set the class name of the bootstrap implementation for this
BC or SE.
Parameters: className - The bootstrap class name.
setBootstrapClassPathElements
public void setBootstrapClassPathElements(List classPathElements)(Code)
Set the class path elements for the bootstrap implementation for this
BC or SE.
Parameters: classPathElements - The list of class path elements as strings.
setBootstrapCleanUpNeeded
public void setBootstrapCleanUpNeeded(boolean isCleanUpNeeded)(Code)
Set the flag that indicates whether the bootstrap cleanUp() method needs
to be called.
Parameters: isCleanUpNeeded - true if the bootstrap cleanUp() method should becalled, or false if it has already been called.
Set the flag indicating the component is busy processing a life cycle
operation. This method is synchronized so that the flag can be set by
only one caller at any time. If the flag is already set, an exception
is thrown indicating that an operation is already in progress on the
component.
throws: javax.jbi.JBIException - when the component is already busy.
Set the flag indicating the component is busy processing a life cycle
operation. This method is used only when processing a forced shutdown
of the component. No checking is done for the busy flag already being
set. Do NOT use this method for any purpose other than during a forced
shutdown of the component, or the results will be unpredictable.
setComponentClassLoaderSelfFirst
public void setComponentClassLoaderSelfFirst(boolean isSelfFirst)(Code)
Set the flag that determines the hierarchy for the component class loader
which is true for self-first or false for parent-first.
Parameters: isSelfFirst - is true for a self-first class loading hierarchy, orfalse for a parent-first hierarchy.
setComponentClassName
public void setComponentClassName(String className)(Code)
Set the class name of the Component implementation for this component.
Parameters: className - The life cycle class name.
setComponentClassPathElements
public void setComponentClassPathElements(List classPathElements)(Code)
Set the class path elements that this BC or SE needs in its runtime
environment.
Parameters: classPathElements - A list containing the class path elements asstrings.
Set the JMX ObjectName for the component configuration Dynamic MBean.
Parameters: objectName - The JMX ObjectName of the component configurationDynamic MBean.
Set the component state to loaded. The only time a component can be in
this state is when its bootstrap class is loaded for an install or an
uninstall that has not yet completed.
Set the observer flag for this component. This flag indicates whether
the component is an NMR observer.
Parameters: isObserver - true indicates that the component is anNMR observer, false indicates that it is not.
Set the list of Shared Library names required by this BC or SE.
The names must be in the list in the order in which the Shared
Libraries should appear in the class path.
Parameters: nameList - A list containing the names as Strings.
Set the component state. This method is used ONLY by startup and unit
test code. It does no validation of the state.
Parameters: status - The ComponentState to be set.Valid states are LOADED, SHUTDOWN,STOPPED, and STARTED.
Set the Updating flag indicating the component is being
updated. This requires first setting the Busy flag to prevent
any life cycle operations from being processed for the component while
it is being updated. If the Busy flag is already set, this
means that a life cycle operation is in progress and the update cannot
proceed. In this case an exception is thrown.
setWorkspaceRoot
public void setWorkspaceRoot(String workspaceRoot)(Code)
Set the workspace root directory for this BC or SE.
Parameters: workspaceRoot - The component workspace root directory.