org.apache.geronimo.kernel.proxy
Interface GeronimoManagedBean


public interface GeronimoManagedBean

Interface provided by proxies generated by the Geronimo proxy managers. This lets a client call any of these methods on a proxy representing any Geronimo GBean. However, this should not be used on any arbitrary GBean reference, as it might not be a proxy generated by Geronimo (for example, if you're running the GBean in Spring). Note that this includes the content of the JSR-77 StateManageable type, as well as getObjectName from the JSR-77 J2EEManagedObject type. However, it is not explicitly related to JSR-77 as that is not required in order to use the Geronimo kernel.


Method Summary
 String getObjectName()
          Gets the unique name of this object.
 long getStartTime()
          Gets the start time of this component
 int getState()
          Gets the state of this component as an int.
 State getStateInstance()
          Gets the state of this component as a State instance.
 void start()
          Transitions the component to the starting state.
 void startRecursive()
          Transitions the component to the starting state.
 void stop()
          Transitions the component to the stopping state.
 

Method Detail

getObjectName

String getObjectName()
Gets the unique name of this object. The object name must comply with the ObjectName specification in the JMX specification and the restrictions in the J2EEManagementInterface.

Returns:
the unique name of this object within the server

getState

int getState()
Gets the state of this component as an int. The int return is required by the JSR77 specification.

Returns:
the current state of this component
See Also:
to obtain the State instance

getStateInstance

State getStateInstance()
Gets the state of this component as a State instance.

Returns:
the current state of this component

getStartTime

long getStartTime()
Gets the start time of this component

Returns:
time in milliseonds since epoch that this component was started.

start

void start()
           throws Exception,
                  IllegalStateException
Transitions the component to the starting state. This method has access to the container.

Normally a component uses this to cache data from other components. The other components will have been created at this stage, but not necessairly started and may not be ready to have methods invoked on them.

Throws:
Exception - if a problem occurs during the transition
IllegalStateException - if this interceptor is not in the stopped or failed state

startRecursive

void startRecursive()
                    throws Exception,
                           IllegalStateException
Transitions the component to the starting state. This method has access to the container.

If this Component is a Container, then startRecursive is called on all child Components that are in the STOPPED or FAILED state. Normally a component uses this to cache data from other components. The other components will have been created at this stage, but not necessairly started and may not be ready to have methods invoked on them.

Throws:
Exception - if a problem occurs during the transition
IllegalStateException - if this interceptor is not in the STOPPED or FAILED state

stop

void stop()
          throws Exception,
                 IllegalStateException
Transitions the component to the stopping state. This method has access to the container.

If this is Component is a Container, then all its child components must be in the STOPPED or FAILED State.

Normally a component uses this to drop references to data cached in the start method. The other components will not necessairly have been stopped at this stage and may not be ready to have methods invoked on them.

Throws:
Exception - if a problem occurs during the transition
IllegalStateException - if this interceptor is not in the STOPPED or FAILED state


Copyright © 2003-2008 The Apache Geronimo development community. All Rights Reserved.