org.objectweb.telosys.service
Class StandardServiceRegistry

java.lang.Object
  extended byorg.objectweb.telosys.common.TelosysObject
      extended byorg.objectweb.telosys.service.StandardServiceRegistry
All Implemented Interfaces:
IServiceProvider

public class StandardServiceRegistry
extends TelosysObject
implements IServiceProvider


Constructor Summary
StandardServiceRegistry()
           
 
Method Summary
 ScreenService getService(java.lang.String sServiceName)
          Return an instance of the service identified by its name
 java.lang.String getSessionKey(java.lang.String sServiceName)
          Return the key used to store the service result in the ScreenSession
protected  void register(java.lang.String serviceName, java.lang.Class serviceClass, java.lang.String sRenderer, java.lang.String sSessionKey)
          Register the service for future use.
protected  void registerServicePackage(java.lang.String sPackage)
          Register the given package as a "service package"
( a package that can contain Telosys Service Classes )
 
Methods inherited from class org.objectweb.telosys.common.TelosysObject
error, error, error, getFlagTrace, info, setFlagTrace, trace, warn
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

StandardServiceRegistry

public StandardServiceRegistry()
Method Detail

register

protected final void register(java.lang.String serviceName,
                              java.lang.Class serviceClass,
                              java.lang.String sRenderer,
                              java.lang.String sSessionKey)
Register the service for future use.

Parameters:
serviceName - the logical name of the service
serviceClass - the class where the service is implemented
sRenderer - the renderer used to build the "result view" (no view if null)
sSessionKey - the key used to store the result in session (not stored if null)

getService

public ScreenService getService(java.lang.String sServiceName)
                         throws TelosysException
Description copied from interface: IServiceProvider
Return an instance of the service identified by its name

Specified by:
getService in interface IServiceProvider
Parameters:
sServiceName -
Returns:
the service instance
Throws:
TelosysException

getSessionKey

public java.lang.String getSessionKey(java.lang.String sServiceName)
                               throws TelosysException
Description copied from interface: IServiceProvider
Return the key used to store the service result in the ScreenSession

Specified by:
getSessionKey in interface IServiceProvider
Parameters:
sServiceName -
Returns:
the key (can be null if no result storage)
Throws:
TelosysException

registerServicePackage

protected final void registerServicePackage(java.lang.String sPackage)
Register the given package as a "service package"
( a package that can contain Telosys Service Classes )

Parameters:
sPackage -