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,ScriptedKeyStrategy
public abstract class AbstractInitializableComponent extends Object implements DestructableComponent, InitializableComponent
Base class for things that implementDestructableComponentandInitializableComponent.
-
-
Field Summary
Fields Modifier and Type Field Description private booleanisDestroyedWhether this component has been destroyed.private booleanisInitializedWhether this component has been initialized.
-
Constructor Summary
Constructors Constructor Description AbstractInitializableComponent()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voiddestroy()Destroys the component.protected voiddoDestroy()Performs component specific destruction logic.protected voiddoInitialize()Performs the initialization of the component.voidinitialize()Initializes the component.booleanisDestroyed()Gets whether this component has been destroyed.booleanisInitialized()Gets whether this component is initialized.
-
-
-
Method Detail
-
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:
isDestroyedin interfaceDestructableComponent- Returns:
- true iff the component has been destroyed
-
isInitialized
public boolean isInitialized()
Gets whether this component is initialized.- Specified by:
isInitializedin interfaceInitializableComponent- Returns:
- true iff this component is initialized
-
destroy
public final void destroy()
Destroys the component.- Specified by:
destroyin interfaceDestructableComponent
-
initialize
public final void initialize() throws ComponentInitializationExceptionInitializes the component.- Specified by:
initializein 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
protected void doInitialize() throws ComponentInitializationExceptionPerforms 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
-
-