|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.felix.ipojo.Handler
public abstract class Handler
Handler Abstract Class.
| Field Summary | |
|---|---|
static java.lang.String |
HANDLER_LEVEL_PROPERTY
Handler priority. |
static java.lang.String |
HANDLER_NAME_PROPERTY
Handler name property. |
static java.lang.String |
HANDLER_NAMESPACE_PROPERTY
Handler namespace property. |
static java.lang.String |
HANDLER_TYPE_PROPERTY
Handler type property. |
protected HandlerManager |
m_instance
HandlerManager managing the current handler. |
protected boolean |
m_isValid
Handler validity. |
| Constructor Summary | |
|---|---|
Handler()
|
|
| Method Summary | |
|---|---|
protected abstract void |
attach(ComponentInstance instance)
Attach the current handler object to the given component instance. |
abstract void |
configure(org.apache.felix.ipojo.metadata.Element metadata,
java.util.Dictionary configuration)
Configure the handler. |
void |
error(java.lang.String message)
Log method (error). |
void |
error(java.lang.String message,
java.lang.Throwable exception)
Log method (error). |
HandlerDescription |
getDescription()
Return the current handler description. |
abstract Handler |
getHandler(java.lang.String name)
Get a plugged handler of the same container. |
HandlerManager |
getHandlerManager()
Get the component instance of the current handler. |
abstract Logger |
getLogger()
Get the logger to use in the handler. |
boolean |
getValidity()
|
void |
info(java.lang.String message)
Log method (info). |
void |
initializeComponentFactory(ComponentTypeDescription typeDesc,
org.apache.felix.ipojo.metadata.Element metadata)
Initialize component factory. |
boolean |
isValid()
Check if the current handler is valid. |
void |
reconfigure(java.util.Dictionary configuration)
The instance is reconfiguring. |
abstract void |
setFactory(Factory factory)
Set the factory attached to this handler object. |
void |
setValidity(boolean isValid)
Set the validity of the current handler. |
abstract void |
start()
Start the handler : start the management. |
void |
stateChanged(int state)
This method is called when the component state changed. |
abstract void |
stop()
Stop the handler : stop the management. |
void |
warn(java.lang.String message)
Log method (warning). |
void |
warn(java.lang.String message,
java.lang.Throwable exception)
Log method (warning). |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final java.lang.String HANDLER_NAMESPACE_PROPERTY
public static final java.lang.String HANDLER_NAME_PROPERTY
public static final java.lang.String HANDLER_TYPE_PROPERTY
public static final java.lang.String HANDLER_LEVEL_PROPERTY
protected boolean m_isValid
protected HandlerManager m_instance
| Constructor Detail |
|---|
public Handler()
| Method Detail |
|---|
public abstract void setFactory(Factory factory)
factory - : the factory.public abstract Logger getLogger()
public final void warn(java.lang.String message)
message - : message to logpublic final void error(java.lang.String message)
message - : message to logpublic final void info(java.lang.String message)
message - : message to log
public final void warn(java.lang.String message,
java.lang.Throwable exception)
message - : message to logexception - : exception to attach to the message
public final void error(java.lang.String message,
java.lang.Throwable exception)
message - : message to logexception - : exception to attach to the messagepublic abstract Handler getHandler(java.lang.String name)
name - : name of the handler to find (class name or qualified handler name (ns:name)).
protected abstract void attach(ComponentInstance instance)
instance - : the component instance on which the current handler will be attached.public final boolean isValid()
public final void setValidity(boolean isValid)
isValid - : if true the handler becomes valid, else it becomes invalid.public final boolean getValidity()
public final HandlerManager getHandlerManager()
public void initializeComponentFactory(ComponentTypeDescription typeDesc,
org.apache.felix.ipojo.metadata.Element metadata)
throws ConfigurationException
typeDesc - : component description.metadata - : component type metadata.
ConfigurationException - : if the metadata are not correct (early detection).
public abstract void configure(org.apache.felix.ipojo.metadata.Element metadata,
java.util.Dictionary configuration)
throws ConfigurationException
metadata - : the metadata of the componentconfiguration - : the instance configuration
ConfigurationException - : if the metadata are not correct.public abstract void stop()
public abstract void start()
public void stateChanged(int state)
state - : the new statepublic HandlerDescription getDescription()
public void reconfigure(java.util.Dictionary configuration)
configuration - : New instance configuration.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||