Package org.jboss.bootstrap.api.lifecycle

Examples of org.jboss.bootstrap.api.lifecycle.LifecycleState


      if (tomcatDeployer == null)
         throw new IllegalStateException("Must set TomcatDeployer before stopping");

      // Hot undeploy
      final LifecycleState currentState = (LifecycleState) server.getAttribute(ServerImplMBean.OBJECT_NAME, "State");
      boolean inShutdown = currentState.equals(LifecycleState.STOPPING);
      if (!inShutdown || connectorsRunning)
      {
         log.debug("Server '" + ServerImplMBean.OBJECT_NAME + "' already started, stopping connectors now");

         stopConnectors();
View Full Code Here


    * more AS5.x support)
    */
   @Deprecated
   public boolean isStarted()
   {
      final LifecycleState state = this.getState();
      return state.equals(LifecycleState.STARTED);
   }
View Full Code Here

      if (server == null)
      {
         throw new IllegalArgumentException("Server must be specified");
      }

      final LifecycleState state = server.getState();
      final LifecycleState required = LifecycleState.PRE_INIT;
      if (!state.equals(required))
      {
         throw new IllegalStateException(this + " may only be invoked when " + LifecycleState.class.getSimpleName()
               + " is " + required + ", was: " + state);
      }
View Full Code Here

   /* (non-Javadoc)
    * @see org.jboss.bootstrap.spi.server.Server#getState()
    */
   public final LifecycleState getState()
   {
      final LifecycleState state = this.state;
      if (state == null)
      {
         throw new IllegalStateException("null state");
      }
      return state;
View Full Code Here

      // Synchronized for atomicity
      synchronized (this)
      {
         // Ensure running
         final LifecycleState required = LifecycleState.STARTED;
         final LifecycleState actual = this.getState();
         this.checkState(required, actual);

         // Initiate shutdown sequence
         log.info("Stopping: " + this);
         final StopWatch watch = new StopWatch(true);
View Full Code Here

      {
         throw new IllegalStateException("Configuration must be supplied before server is initialized");
      }

      // State must be instanciated
      final LifecycleState state = this.getState();
      if (!state.equals(LifecycleState.INSTANCIATED))
      {
         throw new IllegalStateException("Cannot initialize an already initialized server, state is: " + state);
      }

      // Set state to pre-init to fire lifecycle callbacks
View Full Code Here

         synchronized (thisRef)
         {
            try
            {
               // Ensure idle
               final LifecycleState required = LifecycleState.IDLE;
               final LifecycleState actual = getState();
               checkState(required, actual);

               // Initiate start sequence
               log.infof("Starting: %s", thisRef);
               final StopWatch watch = new StopWatch(true);
View Full Code Here

    * more AS5.x support)
    */
   @Deprecated
   public boolean isStarted()
   {
      final LifecycleState state = this.getState();
      return state.equals(LifecycleState.STARTED);
   }
View Full Code Here

   /* (non-Javadoc)
    * @see org.jboss.bootstrap.spi.server.Server#getState()
    */
   public final LifecycleState getState()
   {
      final LifecycleState state = this.state;
      if (state == null)
      {
         throw new IllegalStateException("null state");
      }
      return state;
View Full Code Here

      // Synchronized for atomicity
      synchronized (this)
      {
         // Ensure running
         final LifecycleState required = LifecycleState.STARTED;
         final LifecycleState actual = this.getState();
         this.checkState(required, actual);

         // Initiate shutdown sequence
         log.info("Stopping: " + this);
         final StopWatch watch = new StopWatch(true);
View Full Code Here

TOP

Related Classes of org.jboss.bootstrap.api.lifecycle.LifecycleState

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.