com.caucho.env.deploy
Class DeployControllerAdmin<C extends EnvironmentDeployController>

java.lang.Object
  extended by com.caucho.management.server.AbstractManagedObject
      extended by com.caucho.env.deploy.DeployControllerAdmin<C>
All Implemented Interfaces:
LifecycleListener, DeployControllerMXBean, ManagedObjectMXBean, java.io.Serializable, javax.management.NotificationBroadcaster, javax.management.NotificationEmitter
Direct Known Subclasses:
EarAdmin, HostAdmin, WebAppAdmin

public abstract class DeployControllerAdmin<C extends EnvironmentDeployController>
extends AbstractManagedObject
implements DeployControllerMXBean, javax.management.NotificationEmitter, LifecycleListener, java.io.Serializable

A deploy controller for an environment.

See Also:
Serialized Form

Constructor Summary
DeployControllerAdmin(C controller)
           
 
Method Summary
 void addNotificationListener(javax.management.NotificationListener listener, javax.management.NotificationFilter filter, java.lang.Object handback)
           
 boolean destroy()
           
protected  C getController()
          Returns the controller.
 java.lang.String getErrorMessage()
          Returns any error message
 java.lang.String getId()
           
 java.lang.String getName()
          The JMX name property of the mbean.
 javax.management.MBeanNotificationInfo[] getNotificationInfo()
           
 long getRedeployCheckInterval()
          Returns the interval between redeploy checks.
 java.lang.String getRedeployMode()
          Returns the redeploy mode, one of "default", "automatic", "lazy", or "manual".
 java.util.Map<java.lang.String,java.lang.String> getRepositoryMetaData()
          Returns the repository metadata for the entry.
 java.lang.String getRootDirectory()
          Returns the root directory
 java.util.Date getStartTime()
          Returns the time the controller was last started.
 java.lang.String getStartupMode()
          Returns the startup mode, one of "default", "automatic", "lazy", or "manual".
 java.lang.String getState()
          Returns the controller's state.
 void lifecycleEvent(LifecycleState oldState, LifecycleState newState)
           
protected  void register()
           
 void removeNotificationListener(javax.management.NotificationListener listener)
           
 void removeNotificationListener(javax.management.NotificationListener listener, javax.management.NotificationFilter filter, java.lang.Object handback)
           
 void restart()
          Restarts the instance.
 void start()
          Starts the controller.
 void stop()
          Stops the instance.
 java.lang.String toString()
           
protected  void unregister()
           
 void update()
          Restarts the instance if any changes are detected.
 
Methods inherited from class com.caucho.management.server.AbstractManagedObject
addObjectNameProperties, getObjectName, getType, registerSelf, unregisterSelf
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface com.caucho.management.server.ManagedObjectMXBean
getObjectName, getType
 

Constructor Detail

DeployControllerAdmin

public DeployControllerAdmin(C controller)
Method Detail

getController

protected C getController()
Returns the controller.


register

protected void register()

unregister

protected void unregister()

getId

public java.lang.String getId()
Specified by:
getId in interface DeployControllerMXBean

getName

public java.lang.String getName()
Description copied from class: AbstractManagedObject
The JMX name property of the mbean.

Specified by:
getName in interface ManagedObjectMXBean
Specified by:
getName in class AbstractManagedObject

getStartupMode

public java.lang.String getStartupMode()
Description copied from interface: DeployControllerMXBean
Returns the startup mode, one of "default", "automatic", "lazy", or "manual".

Specified by:
getStartupMode in interface DeployControllerMXBean

getRedeployMode

public java.lang.String getRedeployMode()
Description copied from interface: DeployControllerMXBean
Returns the redeploy mode, one of "default", "automatic", "lazy", or "manual".

Specified by:
getRedeployMode in interface DeployControllerMXBean

getRedeployCheckInterval

public long getRedeployCheckInterval()
Description copied from interface: DeployControllerMXBean
Returns the interval between redeploy checks.

Specified by:
getRedeployCheckInterval in interface DeployControllerMXBean

getState

public java.lang.String getState()
Description copied from interface: DeployControllerMXBean
Returns the controller's state.

Specified by:
getState in interface DeployControllerMXBean

getErrorMessage

public java.lang.String getErrorMessage()
Description copied from interface: DeployControllerMXBean
Returns any error message

Specified by:
getErrorMessage in interface DeployControllerMXBean

getStartTime

public java.util.Date getStartTime()
Description copied from interface: DeployControllerMXBean
Returns the time the controller was last started.

Specified by:
getStartTime in interface DeployControllerMXBean

getRepositoryMetaData

public java.util.Map<java.lang.String,java.lang.String> getRepositoryMetaData()
Description copied from interface: DeployControllerMXBean
Returns the repository metadata for the entry.

Specified by:
getRepositoryMetaData in interface DeployControllerMXBean

start

public void start()
           throws java.lang.Exception
Starts the controller.

Specified by:
start in interface DeployControllerMXBean
Throws:
java.lang.Exception

stop

public void stop()
          throws java.lang.Exception
Description copied from interface: DeployControllerMXBean
Stops the instance.

Specified by:
stop in interface DeployControllerMXBean
Throws:
java.lang.Exception

restart

public void restart()
             throws java.lang.Exception
Description copied from interface: DeployControllerMXBean
Restarts the instance.

Specified by:
restart in interface DeployControllerMXBean
Throws:
java.lang.Exception

update

public void update()
            throws java.lang.Exception
Description copied from interface: DeployControllerMXBean
Restarts the instance if any changes are detected.

Specified by:
update in interface DeployControllerMXBean
Throws:
java.lang.Exception

destroy

public boolean destroy()
                throws java.lang.Exception
Specified by:
destroy in interface DeployControllerMXBean
Throws:
java.lang.Exception

getRootDirectory

public java.lang.String getRootDirectory()
Returns the root directory

Specified by:
getRootDirectory in interface DeployControllerMXBean

addNotificationListener

public void addNotificationListener(javax.management.NotificationListener listener,
                                    javax.management.NotificationFilter filter,
                                    java.lang.Object handback)
                             throws java.lang.IllegalArgumentException
Specified by:
addNotificationListener in interface javax.management.NotificationBroadcaster
Throws:
java.lang.IllegalArgumentException

removeNotificationListener

public void removeNotificationListener(javax.management.NotificationListener listener)
                                throws javax.management.ListenerNotFoundException
Specified by:
removeNotificationListener in interface javax.management.NotificationBroadcaster
Throws:
javax.management.ListenerNotFoundException

removeNotificationListener

public void removeNotificationListener(javax.management.NotificationListener listener,
                                       javax.management.NotificationFilter filter,
                                       java.lang.Object handback)
                                throws javax.management.ListenerNotFoundException
Specified by:
removeNotificationListener in interface javax.management.NotificationEmitter
Throws:
javax.management.ListenerNotFoundException

getNotificationInfo

public javax.management.MBeanNotificationInfo[] getNotificationInfo()
Specified by:
getNotificationInfo in interface javax.management.NotificationBroadcaster

lifecycleEvent

public void lifecycleEvent(LifecycleState oldState,
                           LifecycleState newState)
Specified by:
lifecycleEvent in interface LifecycleListener

toString

public java.lang.String toString()
Overrides:
toString in class AbstractManagedObject