cuba
Interface ComponentI

All Known Implementing Classes:
AbstractAnnotatedComponent, AbstractComponent

public interface ComponentI

Base interface for component initialization, declaring the lifecycle management methods which were called by a CUBA 1 container. This interface doesn't have to be implemented any more in CUBA 2. However, if a component does, the CUBA 2 container performs a CUBA 1 compatible lifecycle management. I.e. method init() is treated as a post-construct method, drop() as a pre-destroy method and setContext(ComponentContextI) as a setter injector for the component context. As in earlier versions, components may be derived from AbstractComponent providing default implementations for these methods.

Author:
Jan Lessner

Method Summary
 void drop()
          Called by the container as a pre-destroy method
 void init()
          Called by the container as a post-construct method
 void setContext(ComponentContextI context)
          Called by the container on component instantiation to inject the component's context.
 

Method Detail

init

void init()
Called by the container as a post-construct method


setContext

void setContext(ComponentContextI context)
                throws ComponentException
Called by the container on component instantiation to inject the component's context.

Throws:
ComponentException

drop

void drop()
Called by the container as a pre-destroy method