org.eclipse.actf.accservice
Class AccessibilityServiceManager

java.lang.Object
  extended by org.eclipse.actf.accservice.AccessibilityServiceManager

public final class AccessibilityServiceManager
extends Object

a manager for coordinating IAccessibilityService objects. IAccessibilityService objects are used to access native accessibility infrastructures in a variety of runtime platforms and environments.

Author:
Mike Squillace
See Also:
IAccessibilityService

Constructor Summary
protected AccessibilityServiceManager()
           
 
Method Summary
 IAccessibilityService getAccessibilityService(String name)
          return the service with the given name.
static AccessibilityServiceManager getInstance()
          get the single instance of this manager
 IAccessibilityService[] getRegisteredAccessibilityServices()
          get all registered services
 Map getRegisteredAccessibilityServicesMap()
          get all registered services
 void registerAccessibilityService(String name, String accServiceClassName)
          register the accessibility service with the given name.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AccessibilityServiceManager

protected AccessibilityServiceManager()
                               throws AccessibilityServiceException
Throws:
AccessibilityServiceException
Method Detail

getInstance

public static AccessibilityServiceManager getInstance()
                                               throws AccessibilityServiceException
get the single instance of this manager

Returns:
singleton copy of this manager
Throws:
AccessibilityServiceException - if there is a problem instantiating the manager

registerAccessibilityService

public void registerAccessibilityService(String name,
                                         String accServiceClassName)
register the accessibility service with the given name. Note that only one service can be registered for a given name.

The manager uses lazy instantiation for creating IAccessibilityService objects. If a service with the given name is requested, the no-argument constructor of the given class name will be invoked and the initialize method will be called on the service.

Parameters:
name - - name of service
accServiceClassName - - class name of accessibility service to register
See Also:
getAccessibilityService(String)

getAccessibilityService

public IAccessibilityService getAccessibilityService(String name)
                                              throws AccessibilityServiceException
return the service with the given name. The service with the given name must have been registered using the registerAccessibilityService method.

The manager uses lazy instantiation for creating IAccessibilityService objects. If a service with the given name is requested, the no-argument constructor of the given class name will be invoked and the initialize method will be called on the service.

Parameters:
name - name of desired service
Returns:
accessibility service with the given name or null if no service with the given name exists
Throws:
AccessibilityServiceException - if the service cannot be instantiated or initialized
See Also:
registerAccessibilityService(String, String), IAccessibilityService.initialize()

getRegisteredAccessibilityServices

public IAccessibilityService[] getRegisteredAccessibilityServices()
get all registered services

Returns:
array of all registered services of this manager

getRegisteredAccessibilityServicesMap

public Map getRegisteredAccessibilityServicesMap()
get all registered services

Returns:
array of all registered services of this manager