Class DefaultTenantLifecycle
- java.lang.Object
-
- de.hybris.platform.servicelayer.event.impl.AbstractEventListener<AbstractEvent>
-
- de.hybris.platform.integrationservices.util.lifecycle.DefaultTenantLifecycle
-
- All Implemented Interfaces:
TenantListener,TenantLifecycle,java.util.EventListener,org.springframework.beans.factory.Aware,org.springframework.beans.factory.InitializingBean,org.springframework.context.ApplicationContextAware,org.springframework.context.ApplicationListener<AbstractEvent>
public class DefaultTenantLifecycle extends AbstractEventListener<AbstractEvent> implements TenantLifecycle, TenantListener
Default implementation of theTenantLifecycle
-
-
Constructor Summary
Constructors Constructor Description DefaultTenantLifecycle(@NotNull Tenant tenant)Instantiates the TenantLifecycle object for the given tenant
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidafterSetActivateSession(Tenant tenant)voidafterTenantStartUp(Tenant tenant)Will be called if a tenant has successfully started.voidbeforeTenantShutDown(Tenant tenant)Will be called if a tenant is about to shut down.voidbeforeUnsetActivateSession(Tenant tenant)booleanisOperational()Indicates whether the tenant is at the operational state, i.e.protected voidonEvent(AbstractEvent event)This method is called byApplicationListener.onApplicationEvent(ApplicationEvent)and processes the given event.-
Methods inherited from class de.hybris.platform.servicelayer.event.impl.AbstractEventListener
afterPropertiesSet, onApplicationEvent, setApplicationContext, setClusterService, setTenantService
-
-
-
-
Constructor Detail
-
DefaultTenantLifecycle
public DefaultTenantLifecycle(@NotNull @NotNull Tenant tenant)Instantiates the TenantLifecycle object for the given tenant- Parameters:
tenant- Tenant this lifecycle object is running under
-
-
Method Detail
-
isOperational
public boolean isOperational()
Description copied from interface:TenantLifecycleIndicates whether the tenant is at the operational state, i.e. tenant is not initializing, starting up, nor shutting down- Specified by:
isOperationalin interfaceTenantLifecycle- Returns:
trueif tenant is at the operational state, elsefalse
-
afterTenantStartUp
public void afterTenantStartUp(Tenant tenant)
Description copied from interface:TenantListenerWill be called if a tenant has successfully started.- Specified by:
afterTenantStartUpin interfaceTenantListener- Parameters:
tenant- the tenant which was started
-
beforeTenantShutDown
public void beforeTenantShutDown(Tenant tenant)
Description copied from interface:TenantListenerWill be called if a tenant is about to shut down.- Specified by:
beforeTenantShutDownin interfaceTenantListener- Parameters:
tenant- tenant which will be shut down
-
afterSetActivateSession
public void afterSetActivateSession(Tenant tenant)
- Specified by:
afterSetActivateSessionin interfaceTenantListener
-
beforeUnsetActivateSession
public void beforeUnsetActivateSession(Tenant tenant)
- Specified by:
beforeUnsetActivateSessionin interfaceTenantListener
-
onEvent
protected void onEvent(AbstractEvent event)
Description copied from class:AbstractEventListenerThis method is called byApplicationListener.onApplicationEvent(ApplicationEvent)and processes the given event.- Specified by:
onEventin classAbstractEventListener<AbstractEvent>- Parameters:
event- the event to be processed- See Also:
ApplicationListener.onApplicationEvent(ApplicationEvent)
-
-