org.apache.geronimo.blueprint.reflect
Class ServiceMetadataImpl
java.lang.Object
org.apache.geronimo.blueprint.reflect.ComponentMetadataImpl
org.apache.geronimo.blueprint.reflect.ServiceMetadataImpl
- All Implemented Interfaces:
- MutableComponentMetadata, MutableServiceMetadata, ComponentMetadata, Metadata, NonNullMetadata, ServiceMetadata
public class ServiceMetadataImpl
- extends ComponentMetadataImpl
- implements MutableServiceMetadata
Implementation of ServiceMetadata
- Version:
- $Rev: 760378 $, $Date: 2009-03-31 11:31:38 +0200 (Tue, 31 Mar 2009) $
- Author:
- Apache Geronimo Project
ServiceMetadataImpl
public ServiceMetadataImpl()
ServiceMetadataImpl
public ServiceMetadataImpl(ServiceMetadata source)
getServiceComponent
public Target getServiceComponent()
- Description copied from interface:
ServiceMetadata
- Return the Metadata for the component to be exported as a service.
This is specified inline or via the
ref attribute of the
service.
- Specified by:
getServiceComponent in interface ServiceMetadata
- Returns:
- The Metadata for the component to be exported as a service.
setServiceComponent
public void setServiceComponent(Target exportedComponent)
- Specified by:
setServiceComponent in interface MutableServiceMetadata
getInterfaces
public List<String> getInterfaces()
- Description copied from interface:
ServiceMetadata
- Return the type names of the interfaces that the service should be
advertised as supporting.
This is specified in the
interface attribute or child
interfaces element of the service.
- Specified by:
getInterfaces in interface ServiceMetadata
- Returns:
- An immutable List of
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.
setInterfaceNames
public void setInterfaceNames(List<String> interfaceNames)
addInterface
public void addInterface(String interfaceName)
- Specified by:
addInterface in interface MutableServiceMetadata
removeInterface
public void removeInterface(String interfaceName)
- Specified by:
removeInterface in interface MutableServiceMetadata
getAutoExport
public int getAutoExport()
- Description copied from interface:
ServiceMetadata
- Return the auto-export mode for the service.
This is specified by the
auto-export attribute of the
service.
- Specified by:
getAutoExport in interface ServiceMetadata
- Returns:
- The auto-export mode for the service.
- See Also:
ServiceMetadata.AUTO_EXPORT_DISABLED,
ServiceMetadata.AUTO_EXPORT_INTERFACES,
ServiceMetadata.AUTO_EXPORT_CLASS_HIERARCHY,
ServiceMetadata.AUTO_EXPORT_ALL_CLASSES
setAutoExport
public void setAutoExport(int autoExport)
- Specified by:
setAutoExport in interface MutableServiceMetadata
getServiceProperties
public List<MapEntry> getServiceProperties()
- Description copied from interface:
ServiceMetadata
- Return the user declared properties to be advertised with the service.
This is specified by the
service-properties element of the
service.
- Specified by:
getServiceProperties in interface ServiceMetadata
- Returns:
- An immutable List of
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.
setServiceProperties
public void setServiceProperties(List<MapEntry> serviceProperties)
addServiceProperty
public void addServiceProperty(MapEntry serviceProperty)
- Specified by:
addServiceProperty in interface MutableServiceMetadata
addServiceProperty
public MapEntry addServiceProperty(NonNullMetadata key,
Metadata value)
- Specified by:
addServiceProperty in interface MutableServiceMetadata
removeServiceProperty
public void removeServiceProperty(MapEntry serviceProperty)
- Specified by:
removeServiceProperty in interface MutableServiceMetadata
getRanking
public int getRanking()
- Description copied from interface:
ServiceMetadata
- Return the ranking value to use when advertising the service. If the
ranking value is zero, the service must be registered without a
service.ranking service property.
This is specified by the ranking attribute of the service.
- Specified by:
getRanking in interface ServiceMetadata
- Returns:
- The ranking value to use when advertising the service.
setRanking
public void setRanking(int ranking)
- Specified by:
setRanking in interface MutableServiceMetadata
getRegistrationListeners
public Collection<RegistrationListener> getRegistrationListeners()
- Description copied from interface:
ServiceMetadata
- Return the registration listeners to be notified when the service is
registered and unregistered with the framework.
This is specified by the
registration-listener elements of
the service.
- Specified by:
getRegistrationListeners in interface ServiceMetadata
- Returns:
- An immutable Collection of
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.
setRegistrationListeners
public void setRegistrationListeners(Collection<RegistrationListener> registrationListeners)
addRegistrationListener
public void addRegistrationListener(RegistrationListener registrationListenerMetadata)
- Specified by:
addRegistrationListener in interface MutableServiceMetadata
addRegistrationListener
public RegistrationListener addRegistrationListener(Target listenerComponent,
String registrationMethodName,
String unregistrationMethodName)
- Specified by:
addRegistrationListener in interface MutableServiceMetadata
removeRegistrationListener
public void removeRegistrationListener(RegistrationListener listener)
- Specified by:
removeRegistrationListener in interface MutableServiceMetadata
toString
public String toString()
- Overrides:
toString in class Object
Copyright © 2003-2009 The Apache Software Foundation. All Rights Reserved.