wt.services.applicationcontext
Interface ApplicationContextServiceProvider

All Known Implementing Classes:
TypeBasedWTServiceProvider, WildCardServiceProvider, WTServiceProvider

public interface ApplicationContextServiceProvider

Abstract service provider. Can return a list of available services.

Supported API: false

Extendable: false


Field Summary
static String SERVICE
          Label for the attribute.
static String WILD_CARD
          When an ApplicationContextServiceProvider indicates that is has service WILD_CARD this means that the provider will attempt to create any logical service name.
 
Method Summary
 Object getService(ApplicationContextChild contextChild, Object requestor, Class serviceClass, Object selector)
          Return a service based on context, requestor and logical service type.
 Object getService(ApplicationContextChild contextChild, Object requestor, String serviceName, Object selector)
          Return an instance of a service based on context, requestor and logical service name.
 String getServiceImplementationName(ApplicationContextChild contextChild, Object requestor, String serviceName, Object selector)
          Return the name of the service implementation.
 Map getServiceImplementationNameMap(ApplicationContextChild contextChild, ACRequestor requestor, String serviceName, Object selector)
          Return the name of the service implementation.
 Map getServiceImplementationNameMap(ApplicationContextChild contextChild, Object[] requestors, String serviceName, Object selector)
          Return the name of the service implementation.
 Map getServiceMap(ApplicationContextChild contextChild, ACRequestor requestor, Class serviceClass, Object selector)
          Return a service based on context, requestor and logical service type.
 Map getServiceMap(ApplicationContextChild contextChild, ACRequestor requestor, String serviceName, Object selector)
          Return an instance of a service based on context, requestor and logical service name.
 Map getServiceMap(ApplicationContextChild contextChild, Object[] requestors, Class serviceClass, Object selector)
          Return a service based on context, requestor and logical service type.
 Map getServiceMap(ApplicationContextChild contextChild, Object[] requestors, String serviceName, Object selector)
          Return an instance of a service based on context, requestor and logical service name.
 String[] getServiceNames()
          Return the list of service names which the provider can produce.
 Enumeration getServiceSelectors(ApplicationContextChild contextChild, String serviceName, Object requestor)
          A service selector is an optional qualifier which can be used to help identify which version of a service is desired.
 

Field Detail

WILD_CARD

public static final String WILD_CARD
When an ApplicationContextServiceProvider indicates that is has service WILD_CARD this means that the provider will attempt to create any logical service name.

Supported API: false

See Also:
Constant Field Values

SERVICE

public static final String SERVICE
Label for the attribute.

Supported API: false

See Also:
Constant Field Values
Method Detail

getServiceNames

public String[] getServiceNames()
Return the list of service names which the provider can produce.

Supported API: false

Returns:
String[]

getService

public Object getService(ApplicationContextChild contextChild,
                         Object requestor,
                         String serviceName,
                         Object selector)
                  throws UnableToCreateServiceException
Return an instance of a service based on context, requestor and logical service name.

Supported API: false

Parameters:
contextChild - The context in which the service is being requested.
requestor - The target of the service request.
serviceName - The name of the requested service.
selector - An optional selector to further identify the service.
Returns:
Object
Throws:
UnableToCreateServiceException

getService

public Object getService(ApplicationContextChild contextChild,
                         Object requestor,
                         Class serviceClass,
                         Object selector)
                  throws UnableToCreateServiceException
Return a service based on context, requestor and logical service type.

Supported API: false

Parameters:
contextChild - The service context in which the getService request was initiated.
requestor - The object on who's behalf the service request is being made.
serviceClass - The logical service class being requested.
selector - An optional selector to further identify the service.
Returns:
Object
Throws:
UnableToCreateServiceException

getServiceMap

public Map getServiceMap(ApplicationContextChild contextChild,
                         Object[] requestors,
                         String serviceName,
                         Object selector)
                  throws UnableToCreateServiceException
Return an instance of a service based on context, requestor and logical service name.

Supported API: false

Parameters:
contextChild - The context in which the service is being requested.
requestors - The target of the service request.
serviceName - The name of the requested service.
selector - An optional selector to further identify the service.
Returns:
Map
Throws:
UnableToCreateServiceException

getServiceMap

public Map getServiceMap(ApplicationContextChild contextChild,
                         Object[] requestors,
                         Class serviceClass,
                         Object selector)
                  throws UnableToCreateServiceException
Return a service based on context, requestor and logical service type.

Supported API: false

Parameters:
contextChild - The service context in which the getService request was initiated.
requestors - The object on who's behalf the service request is being made.
serviceClass - The logical service class being requested.
selector - An optional selector to further identify the service.
Returns:
Map
Throws:
UnableToCreateServiceException

getServiceMap

public Map getServiceMap(ApplicationContextChild contextChild,
                         ACRequestor requestor,
                         String serviceName,
                         Object selector)
                  throws UnableToCreateServiceException
Return an instance of a service based on context, requestor and logical service name.

Supported API: false

Parameters:
contextChild - The context in which the service is being requested.
requestor -
serviceName - The name of the requested service.
selector - An optional selector to further identify the service.
Returns:
Map
Throws:
UnableToCreateServiceException

getServiceMap

public Map getServiceMap(ApplicationContextChild contextChild,
                         ACRequestor requestor,
                         Class serviceClass,
                         Object selector)
                  throws UnableToCreateServiceException
Return a service based on context, requestor and logical service type.

Supported API: false

Parameters:
contextChild - The service context in which the getService request was initiated.
requestor -
serviceClass - The logical service class being requested.
selector - An optional selector to further identify the service.
Returns:
Map
Throws:
UnableToCreateServiceException

getServiceSelectors

public Enumeration getServiceSelectors(ApplicationContextChild contextChild,
                                       String serviceName,
                                       Object requestor)
A service selector is an optional qualifier which can be used to help identify which version of a service is desired. An application can determine which selectors are available for a service within a certain context.

Supported API: false

Parameters:
contextChild -
serviceName -
requestor -
Returns:
Enumeration

getServiceImplementationName

public String getServiceImplementationName(ApplicationContextChild contextChild,
                                           Object requestor,
                                           String serviceName,
                                           Object selector)
Return the name of the service implementation. Usuall this is the fully qualified class name, but it may be any string (implying that a service can't be instantiated.

Supported API: false

Parameters:
contextChild - The context in which the service request was initiated. May be used to determine which service implementation should be returned.
requestor - The requestor or target of the service. Used to determine which service implementation should be returned.
serviceName - The logical name of the desired service.
selector - An optional selector to further identify the service.
Returns:
String

getServiceImplementationNameMap

public Map getServiceImplementationNameMap(ApplicationContextChild contextChild,
                                           Object[] requestors,
                                           String serviceName,
                                           Object selector)
Return the name of the service implementation. Usuall this is the fully qualified class name, but it may be any string (implying that a service can't be instantiated.

Supported API: false

Parameters:
contextChild - The context in which the service request was initiated. May be used to determine which service implementation should be returned.
requestors - The requestor or target of the service. Used to determine which service implementation should be returned.
serviceName - The logical name of the desired service.
selector - An optional selector to further identify the service.
Returns:
Map

getServiceImplementationNameMap

public Map getServiceImplementationNameMap(ApplicationContextChild contextChild,
                                           ACRequestor requestor,
                                           String serviceName,
                                           Object selector)
Return the name of the service implementation. Usuall this is the fully qualified class name, but it may be any string (implying that a service can't be instantiated.

Supported API: false

Parameters:
contextChild - The context in which the service request was initiated. May be used to determine which service implementation should be returned.
requestor -
serviceName - The logical name of the desired service.
selector - An optional selector to further identify the service.
Returns:
Map