Class AbstractIdentifiedInitializableComponent
- java.lang.Object
-
- net.shibboleth.utilities.java.support.component.AbstractInitializableComponent
-
- net.shibboleth.utilities.java.support.component.AbstractIdentifiedInitializableComponent
-
- All Implemented Interfaces:
Component,DestructableComponent,IdentifiedComponent,InitializableComponent
- Direct Known Subclasses:
AbstractIdentifiableInitializableComponent
public abstract class AbstractIdentifiedInitializableComponent extends AbstractInitializableComponent implements IdentifiedComponent
Simple implementation ofInitializableComponentandIdentifiedComponent.
-
-
Constructor Summary
Constructors Constructor Description AbstractIdentifiedInitializableComponent()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voiddoInitialize()This method checks to ensure that the component ID is not null.StringgetId()Get the ID of this component.protected voidsetId(String componentId)Sets the ID of this component.-
Methods inherited from class net.shibboleth.utilities.java.support.component.AbstractInitializableComponent
destroy, doDestroy, initialize, isDestroyed, isInitialized
-
-
-
-
Field Detail
-
id
@Nullable @NonnullAfterInit private String id
The unique identifier for this component.
-
-
Method Detail
-
getId
@Nullable @NonnullAfterInit public String getId()
Get the ID of this component.- Specified by:
getIdin interfaceIdentifiedComponent- Returns:
- ID of this component or null
-
setId
protected void setId(@Nonnull @NotEmpty String componentId)
Sets the ID of this component. The component must not yet be initialized.- Parameters:
componentId- ID of the component
-
doInitialize
protected void doInitialize() throws ComponentInitializationExceptionThis method checks to ensure that the component ID is not null. 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.- Overrides:
doInitializein classAbstractInitializableComponent- Throws:
ComponentInitializationException- thrown if there is a problem initializing the component
-
-