|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.neeve.util.UtlListElement
com.neeve.event.Event
com.neeve.event.lifecycle.LifecycleEvent
com.neeve.aep.event.AepEngineStoppingEvent
public final class AepEngineStoppingEvent
Event notifying an AEP application that its engine is about to stop.
This event is dispatched to an application to notify it that the AEP engine is about to be stopped.
Field Summary |
---|
Fields inherited from class com.neeve.util.UtlListElement |
---|
count, head, next, prev |
Method Summary | |
---|---|
static AepEngineStoppingEvent |
create(Exception cause,
boolean preserveChannelJoins)
Create a new (initialized) engine stopping event. |
static Event |
create(Properties props)
Create a new (uninitialized) engine stopping event. |
Exception |
getCause()
Get the reason for the stop. |
boolean |
getPreserveChannelJoins()
Tests whether or not the engine will preserve subscriptions on closed message bus bindings. |
MessageView |
getTriggeringMessage()
Implementation of IAlertEvent.getTriggeringMessage() |
void |
setPreserveChannelJoins(boolean preserveChannelJoins)
A handler of an AepEngineStoppingEvent can set this value to indicate
whether channel joins should be preserved when closing the engine's buses. |
String |
toString()
Get a string representation of the object |
Methods inherited from class com.neeve.event.lifecycle.LifecycleEvent |
---|
getBackingMessage, getEventTime, setBackingMessage |
Methods inherited from class com.neeve.event.Event |
---|
acquire, dispose, getAcknowledger, getAttachment, getDelay, getDispatchTime, getInstanceNumber, getOfferTs, getPollTs, getPool, getRemainingTime, getScheduledTime, getSource, getType, init, isEndOfBatch, isHandled, owners, referenceTracker, setAcknowledger, setAttachment, setDelay, setDispatchTime, setEndOfBatch, setHandled, setPool, setScheduledTime, setSource |
Methods inherited from class com.neeve.util.UtlListElement |
---|
count, insertAfter, insertBefore, isLinked, next, previous, unlink, wipe |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface com.neeve.event.alert.IAlertEvent |
---|
getBackingMessage, getEventTime, setBackingMessage |
Methods inherited from interface com.neeve.event.IEvent |
---|
acquire, dispose, getAcknowledger, getAttachment, getDelay, getDispatchTime, getInstanceNumber, getRemainingTime, getScheduledTime, getSource, getType, isEndOfBatch, isHandled, owners, setAcknowledger, setAttachment, setDelay, setEndOfBatch, setHandled, setSource |
Methods inherited from interface com.neeve.util.UtlReferenceTracker.HasReferenceTracker |
---|
referenceTracker |
Method Detail |
---|
public static Event create(Properties props)
This method instantiates a new engine stopping event object. The method is for use by the event factory to instantiate new engine stopping events. The method should not be used directly by the user since the method bypasses any event pooling i.e. it creates a new engine stopping event object even if there are eligible event objects available in the event type's pool.
public static AepEngineStoppingEvent create(Exception cause, boolean preserveChannelJoins)
This method instantiates and initializes a engine stopping event. The method uses the event factory to instantiate a new engine stopping event (the factory recycles objects through the event type's object pool is configured for the type) and then initializes it with the supplied parameters.
cause
- Specifies the reason why the engine is stopping. A null value
indicates a graceful stop.preserveChannelJoins
- Indicates whether or not the engine will preserve
subscriptions established by channels that were joined.public final Exception getCause()
public boolean getPreserveChannelJoins()
public void setPreserveChannelJoins(boolean preserveChannelJoins)
AepEngineStoppingEvent
can set this value to indicate
whether channel joins should be preserved when closing the engine's buses.
When an AepEngine stops cleanly the default behavior is to remove any subscriptions or
interests that its bus bindings have created unless it is configured to preserve joins
on stop
. This method allows overriding of the configured behavior at runtime.
In the event that there are multiple handlers for an AepEngineStoppingEvent
that
both set the value, the last value set will be the one used.
Note that setting this value to false
will not have an effect if the engine is
stopping as the result of an exception (e.g. getCause()
!= null. Similarly A value of false
will not take effect if the bus binding is in a failed state (a bus connection that has failed will not
be reestablished so its joins can be removed). In both of these cases subscriptions are preserved with
the presumption that the engine will failover to a backup as the result of an ungraceful shutdown.
Setting this to true
will only preserve joined channels
established at the time the engine was stopped (it is possible that not all channels will have been joined
if an error occurred opening the engine's bus bindings).
preserveChannelJoins
- True to preserve subscriptions/interests of joined channels.public final MessageView getTriggeringMessage()
IAlertEvent.getTriggeringMessage()
getTriggeringMessage
in interface IAlertEvent
public String toString()
toString
in class LifecycleEvent
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |