CAPABILITY - The type of the capability that the reference requires.COMPONENT - The type of the component implementation.METADATA - The type of the metadata class that belongs to the reference.public abstract class ReferenceHelper<CAPABILITY,COMPONENT,METADATA extends org.everit.osgi.ecm.metadata.ReferenceMetadata> extends Object
| Modifier and Type | Class and Description |
|---|---|
protected class |
ReferenceHelper.ReferenceCapabilityConsumer
CapabilityConsumer implementation for references that call the necessary
ReferenceEventHandler of the component if a change happens. |
| Constructor and Description |
|---|
ReferenceHelper(METADATA referenceMetadata,
ComponentContextImpl<COMPONENT> componentContext,
ReferenceEventHandler eventHandler)
Constructor of
ReferenceHelper. |
| Modifier and Type | Method and Description |
|---|---|
void |
bind()
Calls the setter method with the current referenced object(s).
|
protected abstract void |
bindInternal() |
void |
close() |
protected abstract org.everit.osgi.capabilitycollector.AbstractCapabilityCollector<CAPABILITY> |
createCollector(ReferenceHelper.ReferenceCapabilityConsumer consumer,
org.everit.osgi.capabilitycollector.RequirementDefinition<CAPABILITY>[] items) |
abstract void |
free()
Called when the component failes and every attached resource should be unattached.
|
ComponentContextImpl<COMPONENT> |
getComponentContext() |
METADATA |
getReferenceMetadata() |
MethodHandle |
getSetterMethodHandle() |
org.everit.osgi.capabilitycollector.Suiting<CAPABILITY>[] |
getSuitings() |
boolean |
isArray() |
boolean |
isHolder() |
boolean |
isOpened() |
boolean |
isSatisfied() |
void |
open() |
void |
updateConfiguration()
Called when the configuration of the component is updated.
|
public ReferenceHelper(METADATA referenceMetadata, ComponentContextImpl<COMPONENT> componentContext, ReferenceEventHandler eventHandler) throws IllegalAccessException
ReferenceHelper.referenceMetadata - The metadata that describes the attributes of the reference.componentContext - The context of the component that the reference blongs to.eventHandler - The event handler that should be called if there is any change in the state of the
reference.IllegalAccessException - if there is an issue during resolving the setter method.public void bind()
protected abstract void bindInternal()
public void close()
protected abstract org.everit.osgi.capabilitycollector.AbstractCapabilityCollector<CAPABILITY> createCollector(ReferenceHelper.ReferenceCapabilityConsumer consumer, org.everit.osgi.capabilitycollector.RequirementDefinition<CAPABILITY>[] items)
public abstract void free()
public ComponentContextImpl<COMPONENT> getComponentContext()
public METADATA getReferenceMetadata()
public MethodHandle getSetterMethodHandle()
public org.everit.osgi.capabilitycollector.Suiting<CAPABILITY>[] getSuitings()
public boolean isArray()
public boolean isHolder()
public boolean isOpened()
public boolean isSatisfied()
public void open()
public void updateConfiguration()
Copyright © 2011–2015 Everit Kft.. All rights reserved.