wt.services.ac
Class DefaultServices

java.lang.Object
  extended bywt.services.ac.DefaultServices

public final class DefaultServices
extends Object

Provides a convenience mechanism for working with delegation that supersedes the patterns of using factories or otherwise implementing ApplicationContextChild. The APIs of this class are all static (and do not require an instance of the ApplicationContextChild), making it unnecessary to even create a singleton.

Supported API: false

Extendable: false


Nested Class Summary
private static class DefaultServices.Singleton
           
 
Field Summary
private static String CLASSNAME
           
static BeanContextChildSupport DEFAULT_CONTEXT_CHILD
          

Supported API: false
private static String RESOURCE
           
 
Constructor Summary
DefaultServices()
           
 
Method Summary
static ACServices getDefaultServices()
          Gets the value of the attribute: defaultServices.
static Object getService(Object requestor, Class service_class, Object selector)
          Returns an instance of the requested service based on the requestor and optional selector.
static Object getService(Object requestor, String service_name, Object selector)
          Returns an instance of the requested service based on the requestor and optional selector.
static String getServiceImplementationName(Object requestor, String service_name, Object selector)
          Return the name of the requested service -- rather than an actual instance of it -- based on the requestor and optional selector.
static Map getServiceImplementationNameMap(ACRequestor requestor, String service_name, Object selector)
          Returns a map with the names the requested services -- rather than actual instances of them -- as keys and a set] of those requestors that use that service as values.
static Map getServiceImplementationNameMap(Object[] requestors, String service_name, Object selector)
          Returns a map with the names the requested services -- rather than actual instances of them -- as keys and an Object[] of those requestors that use that service as values.
static String[] getServiceImplementationNames(Object requestor, String service_name, Object selector)
          Return a String[] of names of the requested service -- rather than an actual instance of it -- based on the requestor and optional selector.
static Map getServiceImplementationNamesMap(ACRequestor requestor, String service_name, Object selector)
          Returns a map with a String[] of names of the requested services -- rather than actual instances of them -- as keys and a set of those requestors that use that service as values.
static Map getServiceImplementationNamesMap(Object[] requestors, String service_name, Object selector)
          Returns a map with a String[] of names of the requested services -- rather than actual instances of them -- as keys and an Object[] of those requestors that use that service as values.
static Map getServiceMap(ACRequestor requestor, Class service_class, Object selector)
          Returns a map with instances of the requested service as keys and a set of those requestors that use that service as values.
static Map getServiceMap(ACRequestor requestor, String service_name, Object selector)
          Returns a map with instances of the requested service as keys and a set of those requestors that use that service as values.
static Map getServiceMap(Object[] requestors, Class service_class, Object selector)
          Returns a map with instances of the requested service as keys and an Object[] of those requestors that use that service as values.
static Map getServiceMap(Object[] requestors, String service_name, Object selector)
          Returns a map with instances of the requested service as keys and an Object[] of those requestors that use that service as values.
static Object[] getServices(Object requestor, Class service_class, Object selector)
          Returns an Object[] of instances of the requested service based on the requestor and optional selector.
static Object[] getServices(Object requestor, String service_name, Object selector)
          Returns an Object[] of instances of the requested service based on the requestor and optional selector.
static Map getServicesMap(ACRequestor requestor, Class service_class, Object selector)
          Returns a map with an Object[] of instances of the requested service as keys and a set of those requestors that use that service as values.
static Map getServicesMap(ACRequestor requestor, String service_name, Object selector)
          Returns a map with an Object[] of instances of the requested service as keys and a set of those requestors that use that service as values.
static Map getServicesMap(Object[] requestors, Class service_class, Object selector)
          Returns a map with an Object[] of instances of the requested service as keys and an Object[] of those requestors that use that service as values.
static Map getServicesMap(Object[] requestors, String service_name, Object selector)
          Returns a map with an Object[] of instances of the requested service as keys and an Object[] of those requestors that use that service as values.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

RESOURCE

private static final String RESOURCE
See Also:
Constant Field Values

CLASSNAME

private static final String CLASSNAME

DEFAULT_CONTEXT_CHILD

public static final BeanContextChildSupport DEFAULT_CONTEXT_CHILD


Supported API: false

Constructor Detail

DefaultServices

public DefaultServices()
Method Detail

getDefaultServices

public static ACServices getDefaultServices()
Gets the value of the attribute: defaultServices.

Supported API: false

Returns:
ACServices

getService

public static Object getService(Object requestor,
                                String service_name,
                                Object selector)
Returns an instance of the requested service based on the requestor and optional selector.

Supported API: false

Parameters:
requestor - The object on whose behalf the service is requested
service_name - The logical service being requested
selector - An optional selector that further refines the selection of the service
Returns:
Object

getService

public static Object getService(Object requestor,
                                Class service_class,
                                Object selector)
Returns an instance of the requested service based on the requestor and optional selector.

Supported API: false

Parameters:
requestor - The object on whose behalf the service is requested
service_class - The logical service being requested
selector - An optional selector that further refines the selection of the service
Returns:
Object

getServices

public static Object[] getServices(Object requestor,
                                   String service_name,
                                   Object selector)
Returns an Object[] of instances of the requested service based on the requestor and optional selector. These are all the requestors that match instead of the unique requestor that matches.

Supported API: false

Parameters:
requestor - The object on whose behalf the service is requested
service_name - The logical service being requested
selector - An optional selector that further refines the selection of the service
Returns:
Object[]

getServices

public static Object[] getServices(Object requestor,
                                   Class service_class,
                                   Object selector)
Returns an Object[] of instances of the requested service based on the requestor and optional selector. These are all the requestors that match instead of the unique requestor that matches.

Supported API: false

Parameters:
requestor - The object on whose behalf the service is requested
service_class - The logical service being requested
selector - An optional selector that further refines the selection of the service
Returns:
Object[]

getServiceImplementationName

public static String getServiceImplementationName(Object requestor,
                                                  String service_name,
                                                  Object selector)
Return the name of the requested service -- rather than an actual instance of it -- based on the requestor and optional selector.

Supported API: false

Parameters:
requestor - The object on whose behalf the service is requested
service_name - The logical service being requested
selector - An optional selector that further refines the selection of the service
Returns:
String

getServiceImplementationNames

public static String[] getServiceImplementationNames(Object requestor,
                                                     String service_name,
                                                     Object selector)
Return a String[] of names of the requested service -- rather than an actual instance of it -- based on the requestor and optional selector. These are all the service names that match instead of the unique service name that matches.

Supported API: false

Parameters:
requestor - The object on whose behalf the service is requested
service_name - The logical service being requested
selector - An optional selector that further refines the selection of the service
Returns:
String[]

getServiceMap

public static Map getServiceMap(Object[] requestors,
                                String service_name,
                                Object selector)
Returns a map with instances of the requested service as keys and an Object[] of those requestors that use that service as values.

This is essentially a multi-object variant of getService.

Supported API: false

Parameters:
requestors - The objects on whose behalf the service is requested
service_name - The logical service being requested
selector - An optional selector that further refines the selection of the service
Returns:
Map

getServiceMap

public static Map getServiceMap(Object[] requestors,
                                Class service_class,
                                Object selector)
Returns a map with instances of the requested service as keys and an Object[] of those requestors that use that service as values.

This is essentially a multi-object variant of getService.

Supported API: false

Parameters:
requestors - The objects on whose behalf the service is requested
service_class - The logical service being requested
selector - An optional selector that further refines the selection of the service
Returns:
Map

getServicesMap

public static Map getServicesMap(Object[] requestors,
                                 String service_name,
                                 Object selector)
Returns a map with an Object[] of instances of the requested service as keys and an Object[] of those requestors that use that service as values.

This is essentially a multi-object variant of getServices.

Supported API: false

Parameters:
requestors - The objects on whose behalf the service is requested
service_name - The logical service being requested
selector - An optional selector that further refines the selection of the service
Returns:
Map

getServicesMap

public static Map getServicesMap(Object[] requestors,
                                 Class service_class,
                                 Object selector)
Returns a map with an Object[] of instances of the requested service as keys and an Object[] of those requestors that use that service as values.

This is essentially a multi-object variant of getServices.

Supported API: false

Parameters:
requestors - The objects on whose behalf the service is requested
service_class - The logical service being requested
selector - An optional selector that further refines the selection of the service
Returns:
Map

getServiceImplementationNameMap

public static Map getServiceImplementationNameMap(Object[] requestors,
                                                  String service_name,
                                                  Object selector)
Returns a map with the names the requested services -- rather than actual instances of them -- as keys and an Object[] of those requestors that use that service as values.

This is essentially a multi-object variant of getServiceImplementationName.

Supported API: false

Parameters:
requestors - The objects on whose behalf the service is requested
service_name - The logical service being requested
selector - An optional selector that further refines the selection of the service
Returns:
Map

getServiceImplementationNamesMap

public static Map getServiceImplementationNamesMap(Object[] requestors,
                                                   String service_name,
                                                   Object selector)
Returns a map with a String[] of names of the requested services -- rather than actual instances of them -- as keys and an Object[] of those requestors that use that service as values.

This is essentially a multi-object variant of getServiceImplementationNames.

Supported API: false

Parameters:
requestors - The objects on whose behalf the service is requested
service_name - The logical service being requested
selector - An optional selector that further refines the selection of the service
Returns:
Map

getServiceMap

public static Map getServiceMap(ACRequestor requestor,
                                String service_name,
                                Object selector)
Returns a map with instances of the requested service as keys and a set of those requestors that use that service as values.

This is essentially a multi-object variant of getService.

Supported API: false

Parameters:
requestor - An implementation of the ACRequestor interface, which contains the objects on whose behalf the service is being requested.
service_name - The logical service being requested
selector - An optional selector that further refines the selection of the service
Returns:
Map

getServiceMap

public static Map getServiceMap(ACRequestor requestor,
                                Class service_class,
                                Object selector)
Returns a map with instances of the requested service as keys and a set of those requestors that use that service as values.

This is essentially a multi-object variant of getService.

Supported API: false

Parameters:
requestor - An implementation of the ACRequestor interface, which contains the objects on whose behalf the service is being requested.
service_class - The logical service being requested
selector - An optional selector that further refines the selection of the service
Returns:
Map

getServicesMap

public static Map getServicesMap(ACRequestor requestor,
                                 String service_name,
                                 Object selector)
Returns a map with an Object[] of instances of the requested service as keys and a set of those requestors that use that service as values.

This is essentially a multi-object variant of getServices.

Supported API: false

Parameters:
requestor - An implementation of the ACRequestor interface, which contains the objects on whose behalf the service is being requested.
service_name - The logical service being requested
selector - An optional selector that further refines the selection of the service
Returns:
Map

getServicesMap

public static Map getServicesMap(ACRequestor requestor,
                                 Class service_class,
                                 Object selector)
Returns a map with an Object[] of instances of the requested service as keys and a set of those requestors that use that service as values.

This is essentially a multi-object variant of getServices.

Supported API: false

Parameters:
requestor - An implementation of the ACRequestor interface, which contains the objects on whose behalf the service is being requested.
service_class - The logical service being requested
selector - An optional selector that further refines the selection of the service
Returns:
Map

getServiceImplementationNameMap

public static Map getServiceImplementationNameMap(ACRequestor requestor,
                                                  String service_name,
                                                  Object selector)
Returns a map with the names the requested services -- rather than actual instances of them -- as keys and a set] of those requestors that use that service as values.

This is essentially a multi-object variant of getServiceImplementationName.

Supported API: false

Parameters:
requestor - An implementation of the ACRequestor interface, which contains the objects on whose behalf the service is being requested.
service_name - The logical service being requested
selector - An optional selector that further refines the selection of the service
Returns:
Map

getServiceImplementationNamesMap

public static Map getServiceImplementationNamesMap(ACRequestor requestor,
                                                   String service_name,
                                                   Object selector)
Returns a map with a String[] of names of the requested services -- rather than actual instances of them -- as keys and a set of those requestors that use that service as values.

This is essentially a multi-object variant of getServiceImplementationNames.

Supported API: false

Parameters:
requestor - An implementation of the ACRequestor interface, which contains the objects on whose behalf the service is being requested.
service_name - The logical service being requested
selector - An optional selector that further refines the selection of the service
Returns:
Map