Enum Class PushEngineState
- All Implemented Interfaces:
Serializable, Comparable<PushEngineState>, Constable
The lifecycle state of the
IPushNotificationEngine.The engine is lazily created on first access and progresses through these states in order. IPushNotificationEngine.getState() reports the current one. Terminal state is STOPPED; a stopped engine is not restarted, a new one is created on the next access after disposal.
Persistence note. Should a state ever be stored in a property container, it is stored by ordinal() (see the enum-storage idiom in IPushSettings). The order of these constants is therefore part of the persisted contract: new constants MUST be appended at the end, never inserted or reordered, or an existing stored value will silently change meaning.
- Author:
- IIZI
Nested Class Summary
Nested classes/interfaces inherited from class Enum
Enum.EnumDesc<E>Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionThe engine instance exists but its resources (executor, semaphore, spool, transports) have not yet been initialized.The engine is fully initialized and accepting sends.The engine is initializing its resources.The engine has released its resources and will accept no further work.The engine is draining: it accepts no new sends, allows in-flight sends to complete, and flushes or persists the spool.Method Summary
Modifier and TypeMethodDescriptionstatic PushEngineStateReturns the enum constant of this class with the specified name.static PushEngineState[]values()Returns an array containing the constants of this enum class, in the order they are declared.
Enum Constant Details
NOT_STARTED
The engine instance exists but its resources (executor, semaphore, spool, transports) have not yet been initialized. This is the state immediately after lazy construction and before the firststart().STARTING
The engine is initializing its resources. Sends requested in this state are rejected or held untilRUNNING, at the engine's discretion; they are never silently dropped.RUNNING
The engine is fully initialized and accepting sends. This is the only state in which a send is dispatched.STOPPING
The engine is draining: it accepts no new sends, allows in-flight sends to complete, and flushes or persists the spool. A send requested in this state is rejected, not queued.STOPPED
The engine has released its resources and will accept no further work. This is terminal; the engine is not restarted from this state.
Method Details
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)- Parameters:
name- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException- if this enum class has no constant with the specified nameNullPointerException- if the argument is null