org.apache.aries.blueprint.reflect
Class ServiceReferenceMetadataImpl
java.lang.Object
org.apache.aries.blueprint.reflect.ComponentMetadataImpl
org.apache.aries.blueprint.reflect.ServiceReferenceMetadataImpl
- All Implemented Interfaces:
- ExtendedServiceReferenceMetadata, MutableComponentMetadata, MutableServiceReferenceMetadata, ComponentMetadata, Metadata, NonNullMetadata, ServiceReferenceMetadata
- Direct Known Subclasses:
- ReferenceListMetadataImpl, ReferenceMetadataImpl
public abstract class ServiceReferenceMetadataImpl
- extends ComponentMetadataImpl
- implements MutableServiceReferenceMetadata
Implementation of ServiceReferenceMetadata
- Version:
- $Rev: 950985 $, $Date: 2010-06-03 14:19:22 +0100 (Thu, 03 Jun 2010) $
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
availability
protected int availability
interfaceName
protected java.lang.String interfaceName
componentName
protected java.lang.String componentName
filter
protected java.lang.String filter
referenceListeners
protected java.util.Collection<ReferenceListener> referenceListeners
proxyMethod
protected int proxyMethod
runtimeInterface
protected java.lang.Class runtimeInterface
ServiceReferenceMetadataImpl
public ServiceReferenceMetadataImpl()
ServiceReferenceMetadataImpl
public ServiceReferenceMetadataImpl(ServiceReferenceMetadata source)
getAvailability
public int getAvailability()
- Description copied from interface:
ServiceReferenceMetadata
- Return whether or not a matching service is required at all times.
This is specified in the
availability
attribute of the
service reference.
- Specified by:
getAvailability
in interface ServiceReferenceMetadata
- Returns:
- Whether or not a matching service is required at all times.
- See Also:
ServiceReferenceMetadata.AVAILABILITY_MANDATORY
,
ServiceReferenceMetadata.AVAILABILITY_OPTIONAL
setAvailability
public void setAvailability(int availability)
- Specified by:
setAvailability
in interface MutableServiceReferenceMetadata
getInterface
public java.lang.String getInterface()
- Description copied from interface:
ServiceReferenceMetadata
- Return the name of the interface type that a matching service must
support.
This is specified in the
interface
attribute of the service
reference.
- Specified by:
getInterface
in interface ServiceReferenceMetadata
- Returns:
- The name of the interface type that a matching service must
support or
null
when no interface name is specified.
setInterface
public void setInterface(java.lang.String interfaceName)
- Specified by:
setInterface
in interface MutableServiceReferenceMetadata
getComponentName
public java.lang.String getComponentName()
- Description copied from interface:
ServiceReferenceMetadata
- Return the value of the
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.
- Specified by:
getComponentName
in interface ServiceReferenceMetadata
- Returns:
- The value of the
component-name
attribute of the
service reference or null
if the attribute is not
specified.
setComponentName
public void setComponentName(java.lang.String componentName)
- Specified by:
setComponentName
in interface MutableServiceReferenceMetadata
getFilter
public java.lang.String getFilter()
- Description copied from interface:
ServiceReferenceMetadata
- Return the filter expression that a matching service must match.
This is specified by the
filter
attribute of the service
reference.
- Specified by:
getFilter
in interface ServiceReferenceMetadata
- Returns:
- The filter expression that a matching service must match or
null
if a filter is not specified.
setFilter
public void setFilter(java.lang.String filter)
- Specified by:
setFilter
in interface MutableServiceReferenceMetadata
getReferenceListeners
public java.util.Collection<ReferenceListener> getReferenceListeners()
- Description copied from interface:
ServiceReferenceMetadata
- Return the reference listeners to receive bind and unbind events.
This is specified by the
reference-listener
elements of the
service reference.
- Specified by:
getReferenceListeners
in interface ServiceReferenceMetadata
- Returns:
- An immutable Collection of
ReferenceListener
objects to
receive bind and unbind events. The Collection is empty if no
reference listeners are specified for the service reference.
setReferenceListeners
public void setReferenceListeners(java.util.Collection<ReferenceListener> listeners)
addServiceListener
public void addServiceListener(ReferenceListener bindingListenerMetadata)
- Specified by:
addServiceListener
in interface MutableServiceReferenceMetadata
addServiceListener
public ReferenceListener addServiceListener(Target listenerComponent,
java.lang.String bindMethodName,
java.lang.String unbindMethodName)
- Specified by:
addServiceListener
in interface MutableServiceReferenceMetadata
removeReferenceListener
public void removeReferenceListener(ReferenceListener listener)
- Specified by:
removeReferenceListener
in interface MutableServiceReferenceMetadata
getProxyMethod
public int getProxyMethod()
- Specified by:
getProxyMethod
in interface ExtendedServiceReferenceMetadata
setProxyMethod
public void setProxyMethod(int proxyMethod)
- Specified by:
setProxyMethod
in interface MutableServiceReferenceMetadata
getRuntimeInterface
public java.lang.Class getRuntimeInterface()
- Specified by:
getRuntimeInterface
in interface ExtendedServiceReferenceMetadata
setRuntimeInterface
public void setRuntimeInterface(java.lang.Class runtimeInterface)
- Specified by:
setRuntimeInterface
in interface MutableServiceReferenceMetadata
Copyright © 2009-2011 The Apache Software Foundation. All Rights Reserved.