public abstract class ServiceReferenceMetadataImpl extends ComponentMetadataImpl implements MutableServiceReferenceMetadata
Modifier and Type | Field and Description |
---|---|
protected int |
availability |
protected String |
componentName |
protected String |
filter |
protected String |
interfaceName |
protected int |
proxyMethod |
protected Collection<ReferenceListener> |
referenceListeners |
protected Class |
runtimeInterface |
activation, dependsOn, id
PROXY_METHOD_CLASSES, PROXY_METHOD_DEFAULT
AVAILABILITY_MANDATORY, AVAILABILITY_OPTIONAL
ACTIVATION_EAGER, ACTIVATION_LAZY
Constructor and Description |
---|
ServiceReferenceMetadataImpl() |
ServiceReferenceMetadataImpl(ServiceReferenceMetadata source) |
Modifier and Type | Method and Description |
---|---|
void |
addServiceListener(ReferenceListener bindingListenerMetadata) |
ReferenceListener |
addServiceListener(Target listenerComponent,
String bindMethodName,
String unbindMethodName) |
int |
getAvailability()
Return whether or not a matching service is required at all times.
|
String |
getComponentName()
Return the value of the
component-name attribute of the
service reference. |
String |
getFilter()
Return the filter expression that a matching service must match.
|
String |
getInterface()
Return the name of the interface type that a matching service must
support.
|
int |
getProxyMethod() |
Collection<ReferenceListener> |
getReferenceListeners()
Return the reference listeners to receive bind and unbind events.
|
Class |
getRuntimeInterface() |
void |
removeReferenceListener(ReferenceListener listener) |
void |
setAvailability(int availability) |
void |
setComponentName(String componentName) |
void |
setFilter(String filter) |
void |
setInterface(String interfaceName) |
void |
setProxyMethod(int proxyMethod) |
void |
setReferenceListeners(Collection<ReferenceListener> listeners) |
void |
setRuntimeInterface(Class runtimeInterface) |
addDependsOn, getActivation, getDependsOn, getId, removeDependsOn, setActivation, setDependsOn, setId
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getActivation, getDependsOn, getId
addDependsOn, removeDependsOn, setActivation, setDependsOn, setId
protected int availability
protected String interfaceName
protected String componentName
protected String filter
protected Collection<ReferenceListener> referenceListeners
protected int proxyMethod
protected Class runtimeInterface
public ServiceReferenceMetadataImpl()
public ServiceReferenceMetadataImpl(ServiceReferenceMetadata source)
public int getAvailability()
ServiceReferenceMetadata
availability
attribute of the
service reference.getAvailability
in interface ServiceReferenceMetadata
ServiceReferenceMetadata.AVAILABILITY_MANDATORY
,
ServiceReferenceMetadata.AVAILABILITY_OPTIONAL
public void setAvailability(int availability)
setAvailability
in interface MutableServiceReferenceMetadata
public String getInterface()
ServiceReferenceMetadata
interface
attribute of the service
reference.getInterface
in interface ServiceReferenceMetadata
null
when no interface name is specified.public void setInterface(String interfaceName)
setInterface
in interface MutableServiceReferenceMetadata
public String getComponentName()
ServiceReferenceMetadata
component-name
attribute of the
service reference. This specifies the id of a component that is
registered in the service registry. This will create an automatic filter,
appended with the filter if set, to select this component based on its
automatic id
attribute.getComponentName
in interface ServiceReferenceMetadata
component-name
attribute of the
service reference or null
if the attribute is not
specified.public void setComponentName(String componentName)
setComponentName
in interface MutableServiceReferenceMetadata
public String getFilter()
ServiceReferenceMetadata
filter
attribute of the service
reference.getFilter
in interface ServiceReferenceMetadata
null
if a filter is not specified.public void setFilter(String filter)
setFilter
in interface MutableServiceReferenceMetadata
public Collection<ReferenceListener> getReferenceListeners()
ServiceReferenceMetadata
reference-listener
elements of the
service reference.getReferenceListeners
in interface ServiceReferenceMetadata
ReferenceListener
objects to
receive bind and unbind events. The Collection is empty if no
reference listeners are specified for the service reference.public void setReferenceListeners(Collection<ReferenceListener> listeners)
public void addServiceListener(ReferenceListener bindingListenerMetadata)
addServiceListener
in interface MutableServiceReferenceMetadata
public ReferenceListener addServiceListener(Target listenerComponent, String bindMethodName, String unbindMethodName)
addServiceListener
in interface MutableServiceReferenceMetadata
public void removeReferenceListener(ReferenceListener listener)
removeReferenceListener
in interface MutableServiceReferenceMetadata
public int getProxyMethod()
getProxyMethod
in interface ExtendedServiceReferenceMetadata
public void setProxyMethod(int proxyMethod)
setProxyMethod
in interface MutableServiceReferenceMetadata
public Class getRuntimeInterface()
getRuntimeInterface
in interface ExtendedServiceReferenceMetadata
public void setRuntimeInterface(Class runtimeInterface)
setRuntimeInterface
in interface MutableServiceReferenceMetadata
Copyright © 2012. All Rights Reserved.