|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.ijsberg.iglu.configuration.module.StandardComponent
public class StandardComponent
Standard implementation of Component.
| Field Summary | |
|---|---|
static String |
PROPERTIES_PROPERTY_KEY
|
static String |
REGISTER_LISTENER_METHOD_NAME
|
static String |
UNREGISTER_LISTENER_METHOD_NAME
|
| Constructor Summary | |
|---|---|
StandardComponent(Object implementation)
|
|
| Method Summary | |
|---|---|
Set<Class<?>> |
getInjectedInterfaces(String componentId)
|
Class<?>[] |
getInterfaces()
|
Properties |
getProperties()
|
Object |
getProxy(Class<?> interfaceClass)
|
Properties |
getSetterInjectedProperties()
|
Object |
invoke(Object proxy,
Method method,
Object[] parameters)
|
Object |
invoke(String methodName,
Object... parameters)
|
static String |
makeFirstCharUpperCase(String varName)
|
void |
register(Component component)
Registers a component (as listener) in case the embedded object implements a method named 'register' with a suiting interface. |
void |
removeDependency(String componentId)
Removes previously injected proxies for a certain component. |
void |
setInvocationIntercepter(Class<?> interfaceClass,
InvocationHandler handler)
Sets intercepter for invocations of a particular interface to deal with cross-cutting concerns. |
void |
setProperties(Properties properties)
Injects properties into the embedded object. |
void |
setReference(Facade facade,
String componentId,
Class<?>... interfaces)
Sets a reference to a component if the embedded class contains an appropriate setter. |
void |
unregister(Component component)
Unregisters a previously registered component in case the embedded object implements a method named 'unregister' with a suitable interface. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final String PROPERTIES_PROPERTY_KEY
public static final String REGISTER_LISTENER_METHOD_NAME
public static final String UNREGISTER_LISTENER_METHOD_NAME
| Constructor Detail |
|---|
public StandardComponent(Object implementation)
| Method Detail |
|---|
public void setReference(Facade facade,
String componentId,
Class<?>... interfaces)
Component
setReference in interface Componentfacade - facade that must expose a component with id componentId and given interfacescomponentId - ID of the componentinterfaces - the interfaces the component exposes
NullPointerException - if the cluster does not expose a component with ID componentIdpublic void removeDependency(String componentId)
Component
removeDependency in interface ComponentcomponentId - public void register(Component component)
Component
register in interface Componentcomponent - public void unregister(Component component)
Component
unregister in interface Componentpublic Object getProxy(Class<?> interfaceClass)
getProxy in interface Componentpublic Class<?>[] getInterfaces()
getInterfaces in interface Componentpublic void setProperties(Properties properties)
Component
setProperties in interface Componentpublic Properties getProperties()
getProperties in interface Componentpublic Properties getSetterInjectedProperties()
public static String makeFirstCharUpperCase(String varName)
public void setInvocationIntercepter(Class<?> interfaceClass,
InvocationHandler handler)
Component
setInvocationIntercepter in interface ComponentinterfaceClass - interface of which invocations must be intercepted
public Object invoke(Object proxy,
Method method,
Object[] parameters)
throws Throwable
invoke in interface InvocationHandlerThrowable
public Object invoke(String methodName,
Object... parameters)
throws InvocationTargetException,
NoSuchMethodException,
IllegalArgumentException
invoke in interface ComponentmethodName - name of a method declared by a component's interface
InvocationTargetException - in case the invoked method throws
NoSuchMethodException - in case no suitable method is found
IllegalArgumentException - in case the arguments can not be convertedpublic Set<Class<?>> getInjectedInterfaces(String componentId)
getInjectedInterfaces in interface Component
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||