Refine search
@Override public LifecycleListener[] findLifecycleListeners() { return lifecycle.findLifecycleListeners(); }
@Override public void addLifecycleListener(LifecycleListener listener) { lifecycle.addLifecycleListener(listener); }
@Override public void removeLifecycleListener(LifecycleListener listener) { lifecycle.removeLifecycleListener(listener); }
@Override public void stop() throws LifecycleException { try { shutdownRedisson(); } catch (Exception e) { throw new LifecycleException(e); } lifecycle.fireLifecycleEvent(STOP_EVENT, null); }
/** * Gracefully terminate the active use of the public methods of this * component. This method should be the last one called on a given * instance of this component. * * @exception LifecycleException if this component detects a fatal error * that needs to be reported */ @Override public void stop() throws LifecycleException { if (log.isLoggable(Level.FINE)) log.log(Level.FINE, "Stopping embedded server"); // Validate and update our current component state if (!started) throw new LifecycleException (rb.getString(LogFacade.SERVICE_NOT_BEEN_STARTED_EXCEPTION)); lifecycle.fireLifecycleEvent(STOP_EVENT, null); started = false; // Stop our defined Connectors first for (int i = 0; i < connectors.length; i++) { if (connectors[i] instanceof Lifecycle) ((Lifecycle) connectors[i]).stop(); } // Stop our defined Engines second for (int i = 0; i < engines.length; i++) { if (engines[i] instanceof Lifecycle) ((Lifecycle) engines[i]).stop(); } }
@Override public void start() throws LifecycleException { if( log.isInfoEnabled() ) log.info("Starting tomcat server"); // Validate the setup of our required system properties initDirs(); // Initialize some naming specific properties initNaming(); // Validate and update our current component state if (started) throw new LifecycleException (sm.getString("embedded.alreadyStarted")); lifecycle.fireLifecycleEvent(START_EVENT, null); started = true; service.initialize(); // Start our defined Engines first for (int i = 0; i < engines.length; i++) { if (engines[i] instanceof Lifecycle) ((Lifecycle) engines[i]).start(); } // Start our defined Connectors second Connector[] connectors = service.findConnectors(); for (int i = 0; i < connectors.length; i++) { connectors[i].initialize(); if (connectors[i] instanceof Lifecycle) ((Lifecycle) connectors[i]).start(); } }
/** * Prepare for the beginning of active use of the public methods of this * component. This method should be called after <code>configure()</code>, * and before any of the public methods of the component are utilized. * * @exception LifecycleException if this component detects a fatal error * that prevents this component from being used */ public void start() throws LifecycleException { // Validate and update our current component state if (started) throw new LifecycleException (MESSAGES.valveAlreadyStarted()); lifecycle.fireLifecycleEvent(START_EVENT, null); started = true; if (container instanceof Context) { ((Lifecycle) container).addLifecycleListener(this); } }
/** * Gracefully terminate the active use of the public methods of this * component. This method should be the last one called on a given * instance of this component. * * @exception LifecycleException if this component detects a fatal error * that needs to be reported */ public void stop() throws LifecycleException { // Validate and update our current component state if (!started) throw new LifecycleException (sm.getString("semaphoreValve.notStarted")); lifecycle.fireLifecycleEvent(STOP_EVENT, null); started = false; if (container instanceof Context) { ((Lifecycle) container).removeLifecycleListener(this); } }
/** * Prepare for the beginning of active use of the public methods of this * component. This method should be called before any of the public * methods of this component are utilized. It should also send a * LifecycleEvent of type START_EVENT to any registered listeners. * * @exception LifecycleException if this component detects a fatal error * that prevents this component from being used */ public void start() throws LifecycleException { // Validate and update our current component state if (started) { return; } // Notify our interested LifecycleListeners lifecycle.fireLifecycleEvent(BEFORE_START_EVENT, null); lifecycle.fireLifecycleEvent(START_EVENT, null); started = true; // Start our defined Services synchronized (services) { for (int i = 0; i < services.length; i++) { if (services[i] instanceof Lifecycle) ((Lifecycle) services[i]).start(); } } // Notify our interested LifecycleListeners lifecycle.fireLifecycleEvent(AFTER_START_EVENT, null); }
lifecycle.fireLifecycleEvent(START_EVENT, null);
/** * Gracefully terminate the active use of the public methods of this * component. This method should be the last one called on a given * instance of this component. It should also send a LifecycleEvent * of type STOP_EVENT to any registered listeners. * * @exception LifecycleException if this component detects a fatal error * that needs to be reported */ public void stop() throws LifecycleException { // Validate and update our current component state if (!started) return; // Notify our interested LifecycleListeners lifecycle.fireLifecycleEvent(BEFORE_STOP_EVENT, null); lifecycle.fireLifecycleEvent(STOP_EVENT, null); started = false; // Stop our defined Services for (int i = 0; i < services.length; i++) { if (services[i] instanceof Lifecycle) ((Lifecycle) services[i]).stop(); } // Notify our interested LifecycleListeners lifecycle.fireLifecycleEvent(AFTER_STOP_EVENT, null); }
protected LifecycleSupport lifecycle = new LifecycleSupport(this);
this.lifecycle.fireLifecycleEvent(START_EVENT, null); load(); } catch (ClassNotFoundException e) { throw new LifecycleException("Exception starting manager", e); } catch (IOException e) { throw new LifecycleException("Exception starting manager", e);
/** * Gracefully terminate the active use of the public methods of this * component. This method should be the last one called on a given * instance of this component. * * @exception LifecycleException if this component detects a fatal error * that needs to be reported */ public void stop() throws LifecycleException { if( log.isDebugEnabled() ) log.debug("Stopping embedded server"); // Validate and update our current component state if (!started) throw new LifecycleException (sm.getString("embedded.notStarted")); lifecycle.fireLifecycleEvent(STOP_EVENT, null); started = false; // Stop our defined Connectors first for (int i = 0; i < connectors.length; i++) { if (connectors[i] instanceof Lifecycle) ((Lifecycle) connectors[i]).stop(); } // Stop our defined Engines second for (int i = 0; i < engines.length; i++) { if (engines[i] instanceof Lifecycle) ((Lifecycle) engines[i]).stop(); } }
/** * Prepare for the beginning of active use of the public methods of this * component. This method should be called after <code>configure()</code>, * and before any of the public methods of the component are utilized. * * @exception LifecycleException if this component detects a fatal error * that prevents this component from being used */ public void start() throws LifecycleException { // Validate and update our current component state if (started) throw new LifecycleException (sm.getString("semaphoreValve.alreadyStarted")); lifecycle.fireLifecycleEvent(START_EVENT, null); started = true; if (container instanceof Context) { ((Lifecycle) container).addLifecycleListener(this); } }
/** * Gracefully terminate the active use of the public methods of this * component. This method should be the last one called on a given * instance of this component. * * @exception LifecycleException if this component detects a fatal error * that needs to be reported */ public void stop() throws LifecycleException { // Validate and update our current component state if (!started) throw new LifecycleException (MESSAGES.valveNotStarted()); lifecycle.fireLifecycleEvent(STOP_EVENT, null); started = false; if (container instanceof Context) { ((Lifecycle) container).removeLifecycleListener(this); } }
/** * Prepare for the beginning of active use of the public methods of this * component. This method should be called before any of the public * methods of this component are utilized. It should also send a * LifecycleEvent of type START_EVENT to any registered listeners. * * @exception LifecycleException if this component detects a fatal error * that prevents this component from being used */ public void start() throws LifecycleException { // Validate and update our current component state if (started) { log.debug(sm.getString("standardServer.start.started")); return; } // Notify our interested LifecycleListeners lifecycle.fireLifecycleEvent(BEFORE_START_EVENT, null); lifecycle.fireLifecycleEvent(START_EVENT, null); started = true; // Start our defined Services synchronized (services) { for (int i = 0; i < services.length; i++) { if (services[i] instanceof Lifecycle) ((Lifecycle) services[i]).start(); } } // Notify our interested LifecycleListeners lifecycle.fireLifecycleEvent(AFTER_START_EVENT, null); }
this.lifecycle.fireLifecycleEvent(STOP_EVENT, null);
/** * Gracefully terminate the active use of the public methods of this * component. This method should be the last one called on a given * instance of this component. It should also send a LifecycleEvent * of type STOP_EVENT to any registered listeners. * * @exception LifecycleException if this component detects a fatal error * that needs to be reported */ public void stop() throws LifecycleException { // Validate and update our current component state if (!started) return; // Notify our interested LifecycleListeners lifecycle.fireLifecycleEvent(BEFORE_STOP_EVENT, null); lifecycle.fireLifecycleEvent(STOP_EVENT, null); started = false; // Stop our defined Services for (int i = 0; i < services.length; i++) { if (services[i] instanceof Lifecycle) ((Lifecycle) services[i]).stop(); } // Notify our interested LifecycleListeners lifecycle.fireLifecycleEvent(AFTER_STOP_EVENT, null); }
protected LifecycleSupport lifecycle = new LifecycleSupport(this);