public class ServiceMetadataImpl extends ComponentMetadataImpl implements MutableServiceMetadata
activation, dependsOn, id
AUTO_EXPORT_ALL_CLASSES, AUTO_EXPORT_CLASS_HIERARCHY, AUTO_EXPORT_DISABLED, AUTO_EXPORT_INTERFACES
ACTIVATION_EAGER, ACTIVATION_LAZY
Constructor and Description |
---|
ServiceMetadataImpl() |
ServiceMetadataImpl(ServiceMetadata source) |
Modifier and Type | Method and Description |
---|---|
void |
addInterface(String interfaceName) |
void |
addRegistrationListener(RegistrationListener registrationListenerMetadata) |
RegistrationListener |
addRegistrationListener(Target listenerComponent,
String registrationMethodName,
String unregistrationMethodName) |
void |
addServiceProperty(MapEntry serviceProperty) |
MapEntry |
addServiceProperty(NonNullMetadata key,
Metadata value) |
int |
getAutoExport()
Return the auto-export mode for the service.
|
List<String> |
getInterfaces()
Return the type names of the interfaces that the service should be
advertised as supporting.
|
int |
getRanking()
Return the ranking value to use when advertising the service.
|
Collection<RegistrationListener> |
getRegistrationListeners()
Return the registration listeners to be notified when the service is
registered and unregistered with the framework.
|
Target |
getServiceComponent()
Return the Metadata for the component to be exported as a service.
|
List<MapEntry> |
getServiceProperties()
Return the user declared properties to be advertised with the service.
|
void |
removeInterface(String interfaceName) |
void |
removeRegistrationListener(RegistrationListener listener) |
void |
removeServiceProperty(MapEntry serviceProperty) |
void |
setAutoExport(int autoExport) |
void |
setInterfaceNames(List<String> interfaceNames) |
void |
setRanking(int ranking) |
void |
setRegistrationListeners(Collection<RegistrationListener> registrationListeners) |
void |
setServiceComponent(Target exportedComponent) |
void |
setServiceProperties(List<MapEntry> serviceProperties) |
String |
toString() |
addDependsOn, getActivation, getDependsOn, getId, removeDependsOn, setActivation, setDependsOn, setId
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
addDependsOn, removeDependsOn, setActivation, setDependsOn, setId
getActivation, getDependsOn, getId
public ServiceMetadataImpl()
public ServiceMetadataImpl(ServiceMetadata source)
public Target getServiceComponent()
ServiceMetadata
ref
attribute of the
service.getServiceComponent
in interface ServiceMetadata
public void setServiceComponent(Target exportedComponent)
setServiceComponent
in interface MutableServiceMetadata
public List<String> getInterfaces()
ServiceMetadata
interface
attribute or child
interfaces
element of the service.getInterfaces
in interface ServiceMetadata
String
for the type names of
the interfaces that the service should be advertised as
supporting. The List is empty if using auto-export
or no interface names are specified for the service.public void addInterface(String interfaceName)
addInterface
in interface MutableServiceMetadata
public void removeInterface(String interfaceName)
removeInterface
in interface MutableServiceMetadata
public int getAutoExport()
ServiceMetadata
auto-export
attribute of the
service.getAutoExport
in interface ServiceMetadata
ServiceMetadata.AUTO_EXPORT_DISABLED
,
ServiceMetadata.AUTO_EXPORT_INTERFACES
,
ServiceMetadata.AUTO_EXPORT_CLASS_HIERARCHY
,
ServiceMetadata.AUTO_EXPORT_ALL_CLASSES
public void setAutoExport(int autoExport)
setAutoExport
in interface MutableServiceMetadata
public List<MapEntry> getServiceProperties()
ServiceMetadata
service-properties
element of the
service.getServiceProperties
in interface ServiceMetadata
MapEntry
objects for the user
declared properties to be advertised with the service. The List
is empty if no service properties are specified for the service.public void addServiceProperty(MapEntry serviceProperty)
addServiceProperty
in interface MutableServiceMetadata
public MapEntry addServiceProperty(NonNullMetadata key, Metadata value)
addServiceProperty
in interface MutableServiceMetadata
public void removeServiceProperty(MapEntry serviceProperty)
removeServiceProperty
in interface MutableServiceMetadata
public int getRanking()
ServiceMetadata
service.ranking
service property.
This is specified by the ranking
attribute of the service.getRanking
in interface ServiceMetadata
public void setRanking(int ranking)
setRanking
in interface MutableServiceMetadata
public Collection<RegistrationListener> getRegistrationListeners()
ServiceMetadata
registration-listener
elements of
the service.getRegistrationListeners
in interface ServiceMetadata
RegistrationListener
objects
to be notified when the service is registered and unregistered
with the framework. The Collection is empty if no registration
listeners are specified for the service.public void setRegistrationListeners(Collection<RegistrationListener> registrationListeners)
public void addRegistrationListener(RegistrationListener registrationListenerMetadata)
addRegistrationListener
in interface MutableServiceMetadata
public RegistrationListener addRegistrationListener(Target listenerComponent, String registrationMethodName, String unregistrationMethodName)
addRegistrationListener
in interface MutableServiceMetadata
public void removeRegistrationListener(RegistrationListener listener)
removeRegistrationListener
in interface MutableServiceMetadata
Copyright © 2014. All rights reserved.