| java.lang.Object org.apache.geronimo.gbean.runtime.GBeanInstance
GBeanInstance | final public class GBeanInstance implements StateManageable(Code) | | A GBeanInstance is a J2EE Management Managed Object, and is standard base for Geronimo services.
version: $Rev:385718 $ $Date: 2008-01-04 16:47:14 -0800 (Fri, 04 Jan 2008) $ |
RAW_INVOKER | final public static String RAW_INVOKER(Code) | | Attribute name used to retrieve the RawInvoker for the GBean
|
destroyInstance | boolean destroyInstance(boolean stop) throws Exception(Code) | | |
getAttribute | public Object getAttribute(int index) throws Exception(Code) | | Gets the attribute value using the attribute index. This is the most efficient way to get
an attribute as it avoids a HashMap lookup.
Parameters: index - the index of the attribute the attribute value throws: Exception - if a target instance throws and exception throws: IndexOutOfBoundsException - if the index is invalid |
getAttribute | public Object getAttribute(String attributeName) throws NoSuchAttributeException, Exception(Code) | | Gets an attribute's value by name. This get style is less efficient becuse the attribute must
first be looked up in a HashMap.
Parameters: attributeName - the name of the attribute to retrieve the attribute value throws: Exception - if a problem occurs while getting the value throws: NoSuchAttributeException - if the attribute name is not found in the map |
getAttributeIndex | public Map getAttributeIndex()(Code) | | Gets an unmodifiable map from attribute names to index number (Integer). This index number
can be used to efficiently set or retrieve an attribute value.
an unmodifiable map of attribute indexes by name |
getClassLoader | public ClassLoader getClassLoader()(Code) | | The class loader used to build this gbean. This class loader is set into the thread context
class loader before callint the target instace.
the class loader used to build this gbean |
getGBeanData | public GBeanData getGBeanData()(Code) | | Gets the gbean data for the gbean held by this gbean mbean.
the gbean data |
getGBeanInfo | public GBeanInfo getGBeanInfo()(Code) | | Gets the GBeanInfo used to build this gbean.
the GBeanInfo used to build this gbean |
getName | public String getName()(Code) | | Gets the name of the GBean as defined in the gbean info.
the gbean name |
getOperationIndex | public Map getOperationIndex()(Code) | | Gets an unmodifiable map from operation signature (GOperationSignature) to index number (Integer).
This index number can be used to efficciently invoke the operation.
an unmodifiable map of operation indexec by signature |
getStartTime | final public synchronized long getStartTime()(Code) | | |
getState | public int getState()(Code) | | |
getStateInstance | final public State getStateInstance()(Code) | | |
getStateReason | public String getStateReason()(Code) | | Gets the reason we are in the current state.
the reason we are in the current state |
getType | public Class getType()(Code) | | The java type of the wrapped gbean instance
the java type of the gbean |
hashCode | public int hashCode()(Code) | | |
invoke | public Object invoke(int index, Object[] arguments) throws Exception(Code) | | Invokes an opreation using the operation index. This is the most efficient way to invoke
an operation as it avoids a HashMap lookup.
Parameters: index - the index of the attribute Parameters: arguments - the arguments to the operation the result of the operation throws: Exception - if a target instance throws and exception throws: IndexOutOfBoundsException - if the index is invalid throws: IllegalStateException - if the gbean instance has been destroyed |
invoke | public Object invoke(String operationName, Object[] arguments, String[] types) throws Exception, NoSuchOperationException(Code) | | Invokes an operation on the target gbean by method signature. This style if invocation is
inefficient, because the target method must be looked up in a hashmap using a freshly constructed
GOperationSignature object.
Parameters: operationName - the name of the operation to invoke Parameters: arguments - arguments to the operation Parameters: types - types of the operation arguemtns the result of the operation throws: Exception - if a target instance throws and exception throws: NoSuchOperationException - if the operation signature is not found in the map throws: IllegalStateException - if the gbean instance has been destroyed |
isDead | public synchronized boolean isDead()(Code) | | Has this gbean instance been destroyed. An destroyed gbean can no longer be used.
true if the gbean has been destroyed |
referenceFailed | final void referenceFailed()(Code) | | Moves this GBeanInstance to the FAILED state. There are no calls to dependent children, but they will be
notified using standard J2EE management notification.
|
setAttribute | public void setAttribute(int index, Object value) throws Exception, IndexOutOfBoundsException(Code) | | Sets the attribute value using the attribute index. This is the most efficient way to set
an attribute as it avoids a HashMap lookup.
Parameters: index - the index of the attribute Parameters: value - the new value of attribute value throws: Exception - if a target instance throws and exception throws: IndexOutOfBoundsException - if the index is invalid |
setAttribute | public void setAttribute(String attributeName, Object value) throws Exception, NoSuchAttributeException(Code) | | Sets an attribute's value by name. This set style is less efficient becuse the attribute must
first be looked up in a HashMap.
Parameters: attributeName - the name of the attribute to retrieve Parameters: value - the new attribute value throws: Exception - if a target instance throws and exception throws: NoSuchAttributeException - if the attribute name is not found in the map |
setStateReason | public void setStateReason(String reason)(Code) | | Sets the reason we are in the current state.
Parameters: reason - The reason we are in the current state |
start | final public void start()(Code) | | Moves this GBeanInstance to the starting state and then attempts to move this MBean immediately
to the running state.
throws: IllegalStateException - If the gbean is disabled |
startRecursive | final public void startRecursive()(Code) | | Starts this GBeanInstance and then attempts to start all of its start dependent children.
throws: IllegalStateException - If the gbean is disabled |
stop | final public void stop()(Code) | | Moves this GBeanInstance to the STOPPING state, calls stop on all start dependent children, and then attempt
to move this MBean to the STOPPED state.
|
|
|