com.ibm.websphere.sca

Class ServiceManager

  1. java.lang.Object
  2. extended bycom.ibm.websphere.sca.ServiceManager

  1. public class ServiceManager
  2. extends java.lang.Object
Represents a lookup scope for locating SCA services. ServiceManager provides methods to locate a service given an SCA service reference. It also provides methods to bind an SCA reference to an endpoint. From inside a service component, ServiceManager allows you to get a handle to the current service component metadata and create an endpoint reference for this component.

Field Summary

Modifier and Type Field and Description
  1. static
  2. java.lang.String
COPYRIGHT
  1. static
  2. ServiceManager
INSTANCE
The default ServiceManager instance.

Constructor Summary

Constructor and Description
ServiceManager()
Constructs a new ServiceManager.
ServiceManager(java.io.InputStream inputStream)
Constructs a new ServiceManager from an InputStream.

Method Summary

Modifier and Type Method and Description
  1. EndpointReference
createEndpointReference(InterfaceType interfaceType)
Creates an endpoint reference for one of interfaces exposed by the current service component.
  1. Component
getComponent()
Returns the Component object representing the current SCDL component.
  1. commonj.sdo.Sequence
getEndpointReferenceParameters()
Returns the endpoint reference parameters associated with the current invocation.
  1. commonj.sdo.Sequence
getEndpointReferenceProperties()
Returns the endpoint reference properties associated with the current invocation.
  1. java.lang.Object
getService(Reference reference,EndpointReference endpointReference)
Locates the given service reference, binds the service reference to the given endpoint, and returns a proxy to the target service.
  1. java.lang.Object
getService(java.lang.String referenceName,EndpointReference endpointReference)
Locates the named service reference, binds the service reference to the given endpoint, and returns a proxy to the target service.
  1. java.lang.Object
locateService(Reference reference)
Locates the service wired to the given reference and returns a proxy to the service.
  1. java.lang.Object
locateService(java.lang.String referenceName)
Locates the service wired to the named reference and returns a proxy to the service.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

  1. public static final java.lang.String COPYRIGHT
See Also:

INSTANCE

  1. public static final ServiceManager INSTANCE
The default ServiceManager instance.

Constructor Detail

ServiceManager

  1. public ServiceManager()
Constructs a new ServiceManager.

ServiceManager

  1. public ServiceManager(java.io.InputStream inputStream)
Constructs a new ServiceManager from an InputStream.
Parameters:
inputStream - An inputStream for an SCDL references document containing a set of SCA service references to use.

Method Detail

locateService

  1. public java.lang.Object locateService( java.lang.String referenceName)
Locates the service wired to the named reference and returns a proxy to the service. If the reference is typed using a Java interface, then the proxy implements this interface and the com.ibm.websphere.sca.Service dynamic invocation interface. If the reference is typed using a WSDL portType, then the proxy only implements the com.ibm.websphere.sca.Service dynamic invocation interface. In case of a Cardinality 0..n Standalone SCA Reference, a java.util.List is returned instead of a Service object.
Parameters:
referenceName - The name of the reference.
Returns:
A proxy to the target service.

locateService

  1. public java.lang.Object locateService( Reference reference)
Locates the service wired to the given reference and returns a proxy to the service. If the reference is typed using a Java interface, then the proxy implements this interface and the com.ibm.websphere.sca.Service dynamic invocation interface. If the reference is typed using a WSDL portType, then the proxy only implements the com.ibm.websphere.sca.Service dynamic invocation interface. In case of a Cardinality 0..n Standalone SCA Reference, a java.util.List is returned instead of a Service object.
Parameters:
reference - An SCDL Reference object.
Returns:
A proxy to the target service.

createEndpointReference

  1. public EndpointReference createEndpointReference( InterfaceType interfaceType)
Creates an endpoint reference for one of interfaces exposed by the current service component.
Parameters:
interfaceType - An InterfaceType object representing the interface provided by the endpoint.
Returns:
An endpoint reference.

getService

  1. public java.lang.Object getService( java.lang.String referenceName,
  2. EndpointReference endpointReference)
Locates the named service reference, binds the service reference to the given endpoint, and returns a proxy to the target service. If the reference is typed using a Java interface, then the proxy implements this interface and the com.ibm.websphere.sca.Service dynamic invocation interface. If the reference is typed using a WSDL portType, then the proxy only implements the com.ibm.websphere.sca.Service dynamic invocation interface.
Parameters:
referenceName - The name of the reference.
endpointReference - The endpoint of the target service.
Returns:
A proxy to the target service.

getService

  1. public java.lang.Object getService( Reference reference,
  2. EndpointReference endpointReference)
Locates the given service reference, binds the service reference to the given endpoint, and returns a proxy to the target service. If the reference is typed using a Java interface, then the proxy implements this interface and the com.ibm.websphere.sca.Service dynamic invocation interface. If the reference is typed using a WSDL portType, then the proxy only implements the com.ibm.websphere.sca.Service dynamic invocation interface.
Parameters:
reference - A Reference object representing the SCDL reference.
endpointReference - The endpoint of the target service.
Returns:
A proxy to the target service.

getEndpointReferenceProperties

  1. public commonj.sdo.Sequence getEndpointReferenceProperties( )
Returns the endpoint reference properties associated with the current invocation.
Returns:
The current endpoint reference properties.

getEndpointReferenceParameters

  1. public commonj.sdo.Sequence getEndpointReferenceParameters( )
Returns the endpoint reference parameters associated with the current invocation.
Returns:
The current endpoint reference parameters.

getComponent

  1. public Component getComponent()
Returns the Component object representing the current SCDL component.
Returns:
The current component.