@Override public void onManagementStarting() { super.onManagementStarting(); Preconditions.checkNotNull(getName(), "Name must be specified"); }
@Override public void onManagementStarting() { super.onManagementStarting(); Lifecycle state = getAttribute(SERVICE_STATE_ACTUAL); if (state == null || state == Lifecycle.CREATED) { // Expect this is a normal start() sequence (i.e. start() will subsequently be called) sensors().set(SERVICE_UP, false); ServiceStateLogic.setExpectedState(this, Lifecycle.CREATED); // force actual to be created because this is expected subsequently sensors().set(SERVICE_STATE_ACTUAL, Lifecycle.CREATED); } }
@Override public void onManagementStarting() { super.onManagementStarting(); exchange = (getConfig(EXCHANGE_NAME) != null) ? getConfig(EXCHANGE_NAME) : getDefaultExchangeName(); virtualHost = getConfig(RabbitBroker.VIRTUAL_HOST_NAME); sensors().set(RabbitBroker.VIRTUAL_HOST_NAME, virtualHost); machine = (SshMachineLocation) Iterables.find(getParent().getLocations(), Predicates.instanceOf(SshMachineLocation.class)); shellEnvironment = getParent().getShellEnvironment(); }