@Override public void transition(ServiceController< ? extends S> controller, Transition transition) { if(transition.getAfter().equals(Substate.UP)) { serviceAvailable(); synchronized(this) { this.notifyAll(); } } else if(transition.getAfter().equals(Substate.CANCELLED)){ synchronized(this) { cancelled = true; this.notifyAll(); } } else if(transition.getAfter().equals(Substate.START_FAILED)) { synchronized (this) { failed = true; this.notifyAll(); } } }
@Override public void transition(ServiceController< ? extends S> controller, Transition transition) { if(transition.getAfter().equals(Substate.UP)) { serviceAvailable(); synchronized(this) { this.notifyAll(); } } else if(transition.getAfter().equals(Substate.CANCELLED)){ synchronized(this) { cancelled = true; this.notifyAll(); } } else if(transition.getAfter().equals(Substate.START_FAILED)) { synchronized (this) { failed = true; this.notifyAll(); } } }
@Override public void transition(ServiceController< ? extends S> controller, Transition transition) { if(transition.getAfter().equals(Substate.UP)) { serviceAvailable(); synchronized(this) { this.notifyAll(); } } else if(transition.getAfter().equals(Substate.CANCELLED)){ synchronized(this) { cancelled = true; this.notifyAll(); } } else if(transition.getAfter().equals(Substate.START_FAILED)) { synchronized (this) { failed = true; this.notifyAll(); } } }
@Override public void transition(ServiceController<? extends Object> serviceController, ServiceController.Transition transition) { switch (transition.getAfter()) { case UP: { ServiceName serviceName = serviceController.getName();
@Override public void transition(ServiceController<? extends Object> serviceController, ServiceController.Transition transition) { switch (transition.getAfter()) { case UP: { ServiceName serviceName = serviceController.getName();
@Override public void transition(ServiceController< ? extends S> controller, Transition transition) { if(transition.getAfter().equals(Substate.UP)) { serviceAvailable(); synchronized(this) { this.notifyAll(); } } else if(transition.getAfter().equals(Substate.CANCELLED)){ synchronized(this) { cancelled = true; this.notifyAll(); } } else if(transition.getAfter().equals(Substate.START_FAILED)) { synchronized (this) { failed = true; this.notifyAll(); } } }
@Override public void transition(ServiceController< ? extends S> controller, Transition transition) { if(transition.getAfter().equals(Substate.UP)) { serviceAvailable(); synchronized(this) { this.notifyAll(); } } else if(transition.getAfter().equals(Substate.CANCELLED)){ synchronized(this) { cancelled = true; this.notifyAll(); } } else if(transition.getAfter().equals(Substate.START_FAILED)) { synchronized (this) { failed = true; this.notifyAll(); } } }
@Override public void transition(ServiceController controller, ServiceController.Transition transition) { if (this.direction == Direction.DOWNWARDS) { if (transition.getAfter().equals(ServiceController.Substate.DOWN)) { this.direction = Direction.UPWARDS; this.controller.setMode(this.mode); } } else if (this.direction == Direction.UPWARDS) { if (transition.entersRestState()) { this.controller.removeListener(this); if (this.callback != null) { this.callback.accept(controller); } } } } }
@Override public void transition(ServiceController< ? extends S> controller, Transition transition) { if(transition.getAfter().equals(Substate.UP)) { serviceAvailable(); synchronized(this) { this.notifyAll(); } } else if(transition.getAfter().equals(Substate.CANCELLED)){ synchronized(this) { cancelled = true; this.notifyAll(); } } else if(transition.getAfter().equals(Substate.START_FAILED)) { synchronized (this) { failed = true; this.notifyAll(); } } }
@SuppressWarnings({ "rawtypes", "unchecked" }) public void transition(ServiceController controller, Transition transition) { if(!typeToTrack.isParentOf(controller.getName())) { return; } if(transition.getAfter().getState().equals(State.UP)) { serviceCollection.add((S) controller.getValue()); } else { serviceCollection.remove(controller.getValue()); } }
@SuppressWarnings({ "rawtypes", "unchecked" }) public void transition(ServiceController controller, Transition transition) { if(!typeToTrack.isParentOf(controller.getName())) { return; } if(transition.getAfter().getState().equals(State.UP)) { serviceCollection.add((S) controller.getValue()); } else { serviceCollection.remove(controller.getValue()); } }
@Override public void transition(final ServiceController<?> controller, final ServiceController.Transition transition) { if(transition.getAfter().equals(ServiceController.Substate.DOWN)) { controller.setMode(Mode.ACTIVE); controller.removeListener(this); } } });
@Override public void transition(ServiceController<? extends T> serviceController, ServiceController.Transition transition) { if (transition.getAfter() == ServiceController.Substate.UP) { synchronized (this) { notify(); } } }
@Override public void transition(final ServiceController<? extends T> serviceController, final ServiceController.Transition transition) { if (transition.getAfter() == ServiceController.Substate.STOPPING) { binderService.release(); serviceController.removeListener(this); } } }
public void transition(ServiceController< ? extends ContainerProcessEngineController> controller, Transition transition) { if(isDown(transition.getAfter())) { synchronized (shutdownMonitor) { shutdownMonitor.notifyAll(); } } } });
@Override public void transition(ServiceController<?> controller, ServiceController.Transition transition) { if (transition.getAfter().equals(ServiceController.Substate.START_FAILED)) { log.errorf(controller.getStartException(), "Unable to start service: %s", controller.getName()); } } });
@Override public void transition(ServiceController<?> controller, ServiceController.Transition transition) { if (transition.getAfter().equals(ServiceController.Substate.REMOVED)) { latch.countDown(); } } });
@SuppressWarnings({ "rawtypes", "unchecked" }) public void transition(ServiceController controller, Transition transition) { if(!typeToTrack.isParentOf(controller.getName())) { return; } if(transition.getAfter().getState().equals(State.UP)) { serviceCollection.add((S) controller.getValue()); } else { serviceCollection.remove(controller.getValue()); } }
@SuppressWarnings({ "rawtypes", "unchecked" }) public void transition(ServiceController controller, Transition transition) { if(!typeToTrack.isParentOf(controller.getName())) { return; } if(transition.getAfter().getState().equals(State.UP)) { serviceCollection.add((S) controller.getValue()); } else { serviceCollection.remove(controller.getValue()); } }
@SuppressWarnings({ "rawtypes", "unchecked" }) public void transition(ServiceController controller, Transition transition) { if(!typeToTrack.isParentOf(controller.getName())) { return; } if(transition.getAfter().getState().equals(State.UP)) { serviceCollection.add((S) controller.getValue()); } else { serviceCollection.remove(controller.getValue()); } }