com.cloudtran.jmx
Class ApplicationLifeCycle

java.lang.Object
  extended by javax.management.StandardMBean
      extended by com.cloudtran.jmx.AbstractMBean
          extended by com.cloudtran.jmx.ApplicationLifeCycle
All Implemented Interfaces:
ApplicationLifeCycleMBean, DynamicMBean, MBeanRegistration

public class ApplicationLifeCycle
extends AbstractMBean
implements ApplicationLifeCycleMBean


Field Summary
static boolean isShutDownInProgress
           
 
Constructor Summary
ApplicationLifeCycle(com.cloudtran.txb.AbstractTxBufferManager txBufferManager)
           
 
Method Summary
 boolean isAllowServiceCalls()
           
 boolean isOpenForBusiness()
           
 boolean isReadyToShutDown()
           
 boolean isShutDownInProgress()
           
 String shutDownCoordinator()
          Gracefully shuts down the transaction coordinator.
 
Methods inherited from class javax.management.StandardMBean
getAttribute, getAttributes, getImplementation, getImplementationClass, getMBeanInfo, getMBeanInterface, invoke, postDeregister, postRegister, preDeregister, preRegister, setAttribute, setAttributes, setImplementation
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

isShutDownInProgress

public static volatile boolean isShutDownInProgress
Constructor Detail

ApplicationLifeCycle

public ApplicationLifeCycle(com.cloudtran.txb.AbstractTxBufferManager txBufferManager)
                     throws NotCompliantMBeanException
Throws:
NotCompliantMBeanException
Method Detail

isAllowServiceCalls

public boolean isAllowServiceCalls()
Specified by:
isAllowServiceCalls in interface ApplicationLifeCycleMBean

isOpenForBusiness

public boolean isOpenForBusiness()
Specified by:
isOpenForBusiness in interface ApplicationLifeCycleMBean

shutDownCoordinator

public String shutDownCoordinator()
Description copied from interface: ApplicationLifeCycleMBean
Gracefully shuts down the transaction coordinator. This disallows further incoming requests e.g.: start transaction, then waits until all queues are empty before returning.

Specified by:
shutDownCoordinator in interface ApplicationLifeCycleMBean
Returns:
a message which will tell the operator it is safe to kill the coordinator JVM.

isShutDownInProgress

public boolean isShutDownInProgress()
Specified by:
isShutDownInProgress in interface ApplicationLifeCycleMBean
Returns:
true if the transaction coordinator is currently being shut down.

isReadyToShutDown

public boolean isReadyToShutDown()
Specified by:
isReadyToShutDown in interface ApplicationLifeCycleMBean
Returns:
true if the transaction coordinator is ready to be shut down.