org.sr.server
Class POJOServiceLocator

java.lang.Object
  extended by org.sr.server.AbstractServiceLocator
      extended by org.sr.server.POJOServiceLocator
All Implemented Interfaces:
IServiceLocator

public class POJOServiceLocator
extends AbstractServiceLocator
implements IServiceLocator

Service Locator implementation for Plain Java Objects.This implementation is used as default service locator of system. Service definitions that use this locator must put class names as service targets. Because of this locator defined as default locator, services that uses this locator doesn't have to put "locator" attribute in their definitions.An example service definition could be:
<Service name="echoBean" target="test.bean.EchoBean" instance="singleton">
  <Operation pattern=".*" />
</Service>

Author:
Serhat Dirik

Field Summary
 
Fields inherited from interface org.sr.server.IServiceLocator
SESSION_KEY_PREFIX
 
Constructor Summary
POJOServiceLocator()
           
 
Method Summary
 java.lang.Object getServiceByName(java.lang.String serviceName, ICallerContextInfo<?> context)
           
 
Methods inherited from class org.sr.server.AbstractServiceLocator
getLocatorName, getOperationDefinition, getServiceDefinition, getServiceDefinitions, registerService, setLocatorName, unRegisterService
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.sr.server.IServiceLocator
getLocatorName, getOperationDefinition, getServiceDefinition, getServiceDefinitions, registerService, setLocatorName, unRegisterService
 

Constructor Detail

POJOServiceLocator

public POJOServiceLocator()
Method Detail

getServiceByName

public java.lang.Object getServiceByName(java.lang.String serviceName,
                                         ICallerContextInfo<?> context)
                                  throws ServiceNotFoundException,
                                         SessionNotFoundException,
                                         ServicePreparationException
Specified by:
getServiceByName in interface IServiceLocator
Throws:
ServiceNotFoundException
SessionNotFoundException
ServicePreparationException