public class SubAppLifecycleEvent extends Object implements info.magnolia.event.Event<SubAppLifecycleEventHandler>
SubAppLifecycleEvent.Type
).
Such events are fired in the sub-app scope, hence, handlers in some sub-app are notified of only those lifecycle events that happen in that particular sub-app.
Subscription to the SubAppLifecycleEvent allows the developer for managing the sub-app resources in a more fine-grained fashion, e.g. warming-up some caches once sub-app is starting/activating and cleaning them up on termination/de-activation.
Please note that this event normally should not be fired in a custom app code - the app framework is responsible for that.
SubAppEventBus
,
SubAppLifecycleEvent.Type
Modifier and Type | Class and Description |
---|---|
static class |
SubAppLifecycleEvent.Type
List of supported sub-app lifecycle phases.
|
Constructor and Description |
---|
SubAppLifecycleEvent(SubAppDescriptor app,
SubAppLifecycleEvent.Type eventType) |
Modifier and Type | Method and Description |
---|---|
void |
dispatch(SubAppLifecycleEventHandler handler) |
SubAppDescriptor |
getSubAppDescriptor() |
public SubAppLifecycleEvent(SubAppDescriptor app, SubAppLifecycleEvent.Type eventType)
public SubAppDescriptor getSubAppDescriptor()
public void dispatch(SubAppLifecycleEventHandler handler)
dispatch
in interface info.magnolia.event.Event<SubAppLifecycleEventHandler>
Copyright © 2018 Magnolia International Ltd.. All rights reserved.