HATS 7.5.1 Web API Reference

Publicly accessible methods not documented here are for IBM internal use only and may change in a future release of the product.

com.ibm.hats.runtime.services
Interface IServiceManager


public interface IServiceManager

Class Name: IServiceManager
Class Type:
Interface
Base Class:
None
Intf Class:
None
Description:
Provides the service interface for the service manager.


Field Summary
static String CLASSNAME
          The fully-qualified name of this class.
static String COPYRIGHT
          The HATSCopyright.COPYRIGHT field will be updated each release, thereby "magically" updating this class file.
 
Method Summary
 void addServiceManagerListener(com.ibm.hats.runtime.events.ServiceManagerListener listener)
          Adds a service manager listener.
 IApplicationService getApplicationService(String applicationId)
          Factory method which returns the specified application service or creates one and returns it if none exists.
 IClientService getClientService(String clientId)
          Factory method which returns the specified client service or creates one and returns it if none exists.
 IRuntimeService getRuntimeService()
          Factory method which returns the current runtime service or creates one and returns it if none exists.
 int getServiceEntryCount(com.ibm.hats.runtime.services.ServiceType service)
          Retrieve the current number of services registered in the specified service Map.
 Set getServiceIDs(com.ibm.hats.runtime.services.ServiceType service)
          Retrieve the service IDs of the currently registered services in the specified service Map.
 ISessionService getSessionService(String clientId, String applicationId, String viewId)
          Factory method which returns the specified session service or creates one and returns it if none exists.
 boolean isApplicationServiceValid(String applicationId)
          Checks to determine if an application service has already been created for the specified ID.
 boolean isClientServiceValid(String clientId)
          Checks to determine if a client service has already been created for the specified ID.
 boolean isRuntimeServiceValid()
          Checks to determine if the runtime service has already been created.
 boolean isServiceMapEmpty(com.ibm.hats.runtime.services.ServiceType service)
          Check the specified service Map for entries.
 boolean isSessionServiceValid(String clientId, String applicationId, String viewId)
          Checks to determine if a session service has already been created for the specified ID.
 void removeApplicationService(String applicationId)
          Removes the application service specified by the application ID.
 void removeClientService(String clientId)
          Removes the client service specified by the client ID.
 void removeRuntimeService()
          Removes the runtime service.
 void removeServiceManagerListener(com.ibm.hats.runtime.events.ServiceManagerListener listener)
          Removes a service manager listener.
 void removeSessionService(String clientId, String applicationId, String viewId)
          Removes the session service specified by the view Instance ID for the application specified by the application ID.
 Collection retrieveServiceEntries(com.ibm.hats.runtime.services.ServiceType service)
          Retrieve the current registered services in the specified service Map.
 

Field Detail

CLASSNAME

static final String CLASSNAME
The fully-qualified name of this class. This is used for controlling and displaying traces.


COPYRIGHT

static final String COPYRIGHT
The HATSCopyright.COPYRIGHT field will be updated each release, thereby "magically" updating this class file.

See Also:
Constant Field Values
Method Detail

addServiceManagerListener

void addServiceManagerListener(com.ibm.hats.runtime.events.ServiceManagerListener listener)
Adds a service manager listener.

Parameters:
listener - The service manager listener to be added.

getApplicationService

IApplicationService getApplicationService(String applicationId)
Factory method which returns the specified application service or creates one and returns it if none exists.

Parameters:
applicationId - The application ID. This ID corresponds to the application name and identifies a unique application. If this parameter is null or invalid, an exception is logged and null is returned.
Returns:
The existing application service or a new application service if a current one for the specified application service ID doesn't yet exist. This value is null if the application service ID is null or invalid.

getClientService

IClientService getClientService(String clientId)
Factory method which returns the specified client service or creates one and returns it if none exists.

Parameters:
clientId - The client ID specifies a unique client service and therefore, a unique Client Specific Information object. If this parameter is null or invalid, an exception is logged and null is returned.
Returns:
The existing client service or a new client service if a current one for the specified client ID doesn't yet exist. This value is null if the client ID is null or invalid.

getRuntimeService

IRuntimeService getRuntimeService()
Factory method which returns the current runtime service or creates one and returns it if none exists.

Returns:
The runtime service.

getServiceEntryCount

int getServiceEntryCount(com.ibm.hats.runtime.services.ServiceType service)
Retrieve the current number of services registered in the specified service Map.

Parameters:
service - The specified ServiceType ( APPLICATION, CLIENT, RUNTIME, SESSION ).
Returns:
The number of currently registered entries in the specified service Map.

getServiceIDs

Set getServiceIDs(com.ibm.hats.runtime.services.ServiceType service)
Retrieve the service IDs of the currently registered services in the specified service Map.

Parameters:
service - The specified ServiceType ( APPLICATION, CLIENT, RUNTIME, SESSION ).
Returns:
The complete Set of service IDs for all of the currently registered services for the specified ServiceType.

getSessionService

ISessionService getSessionService(String clientId,
                                  String applicationId,
                                  String viewId)
Factory method which returns the specified session service or creates one and returns it if none exists.

Parameters:
clientId - The client ID specifies a unique client service and therefore, a unique Client Specific Information object.
applicationId - The application ID of the application. This corresponds to the application name and identifies a unique application.
viewId - The view ID is used to uniquely identify a view and therefore represents an application instance.
Returns:
Returns a session service. The session service maps directly to an Application Specific Information object. This value is null if the application ID is null or invalid.

isApplicationServiceValid

boolean isApplicationServiceValid(String applicationId)
Checks to determine if an application service has already been created for the specified ID.

Parameters:
applicationId - The application ID. This ID corresponds to the application name and identifies a unique application. If this parameter is null or invalid, an exception is logged and false is returned.
Returns:
True if a corresponding application service has been previously created, false otherwise.

isClientServiceValid

boolean isClientServiceValid(String clientId)
Checks to determine if a client service has already been created for the specified ID.

Parameters:
clientId - The client ID specifies a unique client service and therefore, a unique Client Specific Information object. If this parameter is null or invalid, an exception is logged and false is returned.
Returns:
True if a corresponding client service has been previously created, false otherwise.

isRuntimeServiceValid

boolean isRuntimeServiceValid()
Checks to determine if the runtime service has already been created.

Returns:
True if the runtime service has been previously created, false otherwise.

isServiceMapEmpty

boolean isServiceMapEmpty(com.ibm.hats.runtime.services.ServiceType service)
Check the specified service Map for entries.

Parameters:
service - The specified ServiceType ( APPLICATION, CLIENT, RUNTIME, SESSION ).
Returns:
True if the specified service Map is empty, false otherwise.

isSessionServiceValid

boolean isSessionServiceValid(String clientId,
                              String applicationId,
                              String viewId)
Checks to determine if a session service has already been created for the specified ID.

Parameters:
clientId - The client ID specifies a unique client service and therefore, a unique Client Specific Information object.
applicationId - The application ID of the application. This corresponds to the application name and identifies a unique application.
viewId - The view ID is used to uniquely identify a view and therefore represents an application instance.
Returns:
True if a corresponding session service has been previously created, false otherwise.

removeApplicationService

void removeApplicationService(String applicationId)
Removes the application service specified by the application ID.

Parameters:
applicationId - The application ID. This ID corresponds to the application name and identifies a unique application. If this parameter is null or invalid, an exception is logged and false is returned.

removeClientService

void removeClientService(String clientId)
Removes the client service specified by the client ID.

Parameters:
clientId - The client ID specifies a unique client service and therefore, a unique Client Specific Information object. If this parameter is null or invalid, an exception is logged and false is returned.

removeRuntimeService

void removeRuntimeService()
Removes the runtime service.


removeServiceManagerListener

void removeServiceManagerListener(com.ibm.hats.runtime.events.ServiceManagerListener listener)
Removes a service manager listener.

Parameters:
listener - The service manager listener to be removed.

removeSessionService

void removeSessionService(String clientId,
                          String applicationId,
                          String viewId)
Removes the session service specified by the view Instance ID for the application specified by the application ID.

Parameters:
clientId - The client ID specifies a unique client service and therefore, a unique Client Specific Information object.
applicationId - The application ID of the application. This corresponds to the application name and identifies a unique application.
viewId - The view ID is used to uniquely identify a view and therefore represents an application instance.

retrieveServiceEntries

Collection retrieveServiceEntries(com.ibm.hats.runtime.services.ServiceType service)
Retrieve the current registered services in the specified service Map.

Parameters:
service - The specified ServiceType ( APPLICATION, CLIENT, RUNTIME, SESSION ).
Returns:
The Collection of currently registered entries in the specified service Map.

HATS 7.5.1 (201005110649)