Class AbstractInitializableComponent
java.lang.Object
net.shibboleth.utilities.java.support.component.AbstractInitializableComponent
- All Implemented Interfaces:
Component
,DestructableComponent
,InitializableComponent
- Direct Known Subclasses:
AbstractIdentifiedInitializableComponent
,BasicKeystoreKeyStrategy
,BasicParserPool
,CookieManager
,DataSealer
,EvaluableScript
,ScriptedKeyStrategy
@ThreadSafe
public abstract class AbstractInitializableComponent
extends Object
implements DestructableComponent, InitializableComponent
Base class for things that implement
DestructableComponent
and InitializableComponent
.-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate boolean
Whether this component has been destroyed.private boolean
Whether this component has been initialized. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfinal void
destroy()
Destroys the component.protected void
Performs component specific destruction logic.protected void
Performs the initialization of the component.final void
Initializes the component.final boolean
Gets whether this component has been destroyed.boolean
Gets whether this component is initialized.
-
Field Details
-
isDestroyed
private boolean isDestroyedWhether this component has been destroyed. -
isInitialized
private boolean isInitializedWhether this component has been initialized.
-
-
Constructor Details
-
AbstractInitializableComponent
public AbstractInitializableComponent()
-
-
Method Details
-
isDestroyed
public final boolean isDestroyed()Gets whether this component has been destroyed. Normally, once a component has been destroyed it cannot be used.- Specified by:
isDestroyed
in interfaceDestructableComponent
- Returns:
- true iff the component has been destroyed
-
isInitialized
public boolean isInitialized()Gets whether this component is initialized.- Specified by:
isInitialized
in interfaceInitializableComponent
- Returns:
- true iff this component is initialized
-
destroy
public final void destroy()Destroys the component.- Specified by:
destroy
in interfaceDestructableComponent
-
initialize
Initializes the component.- Specified by:
initialize
in interfaceInitializableComponent
- Throws:
ComponentInitializationException
- thrown if there is a problem initializing the component
-
doDestroy
protected void doDestroy()Performs component specific destruction logic. This method is executed within the lock on the object being destroyed. The default implementation of this method is a no-op. -
doInitialize
Performs the initialization of the component. This method is executed within the lock on the object being initialized. The default implementation of this method is a no-op.- Throws:
ComponentInitializationException
- thrown if there is a problem initializing the component
-