net.sf.mmm.util.component.base
Class AbstractComponent

java.lang.Object
  extended by net.sf.mmm.util.component.base.AbstractComponent
Direct Known Subclasses:
AbstractLoggableComponent, DefaultPojoPathFunctionManager, NlsDependenciesImpl, NlsMessageFormatterFactoryImpl, PojoDescriptorDependenciesImpl, XmlUtilImpl

public abstract class AbstractComponent
extends Object

This is the abstract base class for a component that needs initialization.

Since:
1.0.1
Author:
Joerg Hohwiller (hohwille at users.sourceforge.net)

Field Summary
private  InitializationState initializationState
           
 
Constructor Summary
AbstractComponent()
          The constructor.
 
Method Summary
protected  void doInitialize()
          This method performs the actual initialization.
protected  void doInitialized()
          This method is invoked at the end of the actual initialization.
protected  InitializationState getInitializationState()
          This method gets the InitializationState of this component.
 void initialize()
          This method initializes this class.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

initializationState

private final InitializationState initializationState
See Also:
getInitializationState()
Constructor Detail

AbstractComponent

public AbstractComponent()
The constructor.

Method Detail

initialize

@PostConstruct
public final void initialize()
This method initializes this class. It has to be called after construction and injection is completed.


doInitialize

protected void doInitialize()
This method performs the actual initialization. It is called when initialize() is invoked for the first time.
ATTENTION:
When you override this method from a sub-class you need to do a super.doInitialize().


doInitialized

protected void doInitialized()
This method is invoked at the end of the actual initialization. It is called when initialize() is invoked for the first time after doInitialize() is completed and initialization-state has changed to initialized.
ATTENTION:
When you override this method from a sub-class you need to do a super.doInitialized().


getInitializationState

protected final InitializationState getInitializationState()
This method gets the InitializationState of this component.

Returns:
the initializationState
See Also:
initialize(), InitializationState.requireInitilized(), InitializationState.requireNotInitilized()


Copyright © 2001-2010 mmm-Team. All Rights Reserved.