Search in sources :

Example 1 with MuleContextStopPhase

use of org.mule.runtime.core.internal.lifecycle.phases.MuleContextStopPhase in project mule by mulesoft.

the class RegistryBrokerLifecycleManager method registerPhases.

@Override
protected void registerPhases(Registry registry) {
    RegistryLifecycleCallback callback = new RegistryLifecycleCallback(this);
    LifecycleCallback<AbstractRegistryBroker> emptyCallback = new EmptyLifecycleCallback<>();
    registerPhase(Initialisable.PHASE_NAME, new MuleContextInitialisePhase(), emptyCallback);
    registerPhase(Startable.PHASE_NAME, new MuleContextStartPhase(), callback);
    registerPhase(Stoppable.PHASE_NAME, new MuleContextStopPhase(), callback);
    registerPhase(Disposable.PHASE_NAME, new MuleContextDisposePhase(), emptyCallback);
}
Also used : AbstractRegistryBroker(org.mule.runtime.core.internal.registry.AbstractRegistryBroker) MuleContextInitialisePhase(org.mule.runtime.core.internal.lifecycle.phases.MuleContextInitialisePhase) MuleContextDisposePhase(org.mule.runtime.core.internal.lifecycle.phases.MuleContextDisposePhase) MuleContextStartPhase(org.mule.runtime.core.internal.lifecycle.phases.MuleContextStartPhase) MuleContextStopPhase(org.mule.runtime.core.internal.lifecycle.phases.MuleContextStopPhase)

Example 2 with MuleContextStopPhase

use of org.mule.runtime.core.internal.lifecycle.phases.MuleContextStopPhase in project mule by mulesoft.

the class RegistryLifecycleManager method registerPhases.

protected void registerPhases(Registry object) {
    final RegistryLifecycleCallback<Object> callback = new RegistryLifecycleCallback<>(this);
    final LifecycleCallback<AbstractRegistryBroker> emptyCallback = new EmptyLifecycleCallback<>();
    registerPhase(NotInLifecyclePhase.PHASE_NAME, new NotInLifecyclePhase(), emptyCallback);
    registerPhase(Initialisable.PHASE_NAME, new MuleContextInitialisePhase(), callback);
    registerPhase(Startable.PHASE_NAME, new MuleContextStartPhase(), emptyCallback);
    registerPhase(Stoppable.PHASE_NAME, new MuleContextStopPhase(), emptyCallback);
    registerPhase(Disposable.PHASE_NAME, new MuleContextDisposePhase(), callback);
}
Also used : AbstractRegistryBroker(org.mule.runtime.core.internal.registry.AbstractRegistryBroker) MuleContextInitialisePhase(org.mule.runtime.core.internal.lifecycle.phases.MuleContextInitialisePhase) MuleContextDisposePhase(org.mule.runtime.core.internal.lifecycle.phases.MuleContextDisposePhase) MuleContextStartPhase(org.mule.runtime.core.internal.lifecycle.phases.MuleContextStartPhase) MuleContextStopPhase(org.mule.runtime.core.internal.lifecycle.phases.MuleContextStopPhase) NotInLifecyclePhase(org.mule.runtime.core.internal.lifecycle.phases.NotInLifecyclePhase)

Example 3 with MuleContextStopPhase

use of org.mule.runtime.core.internal.lifecycle.phases.MuleContextStopPhase in project mule by mulesoft.

the class SpringRegistryLifecycleManager method registerPhases.

@Override
protected void registerPhases(Registry registry) {
    final LifecycleCallback<AbstractRegistryBroker> emptyCallback = new EmptyLifecycleCallback<>();
    registerPhase(NotInLifecyclePhase.PHASE_NAME, new NotInLifecyclePhase(), emptyCallback);
    registerPhase(Initialisable.PHASE_NAME, new SpringContextInitialisePhase(), new SpringLifecycleCallback(this, (SpringRegistry) registry));
    registerPhase(Startable.PHASE_NAME, new MuleContextStartPhase(), emptyCallback);
    registerPhase(Stoppable.PHASE_NAME, new MuleContextStopPhase(), emptyCallback);
    registerPhase(Disposable.PHASE_NAME, new SpringContextDisposePhase());
}
Also used : AbstractRegistryBroker(org.mule.runtime.core.internal.registry.AbstractRegistryBroker) EmptyLifecycleCallback(org.mule.runtime.core.internal.lifecycle.EmptyLifecycleCallback) MuleContextStartPhase(org.mule.runtime.core.internal.lifecycle.phases.MuleContextStartPhase) MuleContextStopPhase(org.mule.runtime.core.internal.lifecycle.phases.MuleContextStopPhase) NotInLifecyclePhase(org.mule.runtime.core.internal.lifecycle.phases.NotInLifecyclePhase)

Aggregations

MuleContextStartPhase (org.mule.runtime.core.internal.lifecycle.phases.MuleContextStartPhase)3 MuleContextStopPhase (org.mule.runtime.core.internal.lifecycle.phases.MuleContextStopPhase)3 AbstractRegistryBroker (org.mule.runtime.core.internal.registry.AbstractRegistryBroker)3 MuleContextDisposePhase (org.mule.runtime.core.internal.lifecycle.phases.MuleContextDisposePhase)2 MuleContextInitialisePhase (org.mule.runtime.core.internal.lifecycle.phases.MuleContextInitialisePhase)2 NotInLifecyclePhase (org.mule.runtime.core.internal.lifecycle.phases.NotInLifecyclePhase)2 EmptyLifecycleCallback (org.mule.runtime.core.internal.lifecycle.EmptyLifecycleCallback)1