net.shibboleth.utilities.java.support.component
Class AbstractIdentifiableInitializableComponent
java.lang.Object
net.shibboleth.utilities.java.support.component.AbstractInitializableComponent
net.shibboleth.utilities.java.support.component.AbstractIdentifiableInitializableComponent
- All Implemented Interfaces:
- Component, IdentifiableComponent, InitializableComponent
public abstract class AbstractIdentifiableInitializableComponent
- extends AbstractInitializableComponent
- implements IdentifiableComponent
Simple implementation of InitializableComponent and IdentifiableComponent.
Note, this class synchronizes the setId(String) method and, if the component is already initialized this
method is treated as no-op.
|
Field Summary |
private String |
id
The unique identifier for this component. |
|
Method Summary |
protected void |
doInitialize()
This method checks to ensure that the component ID is not null. |
String |
getId()
Gets the ID of this component. |
protected void |
setId(String componentId)
Sets the ID of this component. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
id
private String id
- The unique identifier for this component.
AbstractIdentifiableInitializableComponent
public AbstractIdentifiableInitializableComponent()
getId
public String getId()
- Gets the ID of this component.
- Specified by:
getId in interface IdentifiableComponent
- Returns:
- ID of this component, never null
setId
protected void setId(@Nonnull@NotEmpty
String componentId)
- Sets the ID of this component.
- Parameters:
componentId - ID of the component
doInitialize
protected void doInitialize()
throws ComponentInitializationException
- This 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:
doInitialize in class AbstractInitializableComponent
- Throws:
ComponentInitializationException - thrown if there is a problem initializing the component
Copyright © 1999-2012. All Rights Reserved.