|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.sr.server.ServicesRegistry
public class ServicesRegistry
Service Registery keeps records of all service & interceptor definitions and locators within the system.
The preferenced way of registiration is usage of configuration files, but users may need to register
their components programatically. This class offers methods for both ways. We need to remind that a certain order of registration
need to be followed, for those who prefers to register entities programatically. Locators and interceptors registration need to be
done before services registration.
Field Summary | |
---|---|
static java.lang.String |
DEFAULT_SERVICE_LOCATOR
|
Constructor Summary | |
---|---|
ServicesRegistry()
|
Method Summary | |
---|---|
static IServiceLocator |
getDefaultServiceLocator()
Registery keeps one locator ( POJOServiceLocator ) as default one to access service instances
which are not specified their locator in their definitions. |
static java.lang.String |
getRegistryQueryService()
|
static org.sr.common.entitydef.ServiceDefinition |
getServiceDefinition(java.lang.String serviceName)
Gives a registered service definition |
static java.util.Map<java.lang.String,org.sr.common.entitydef.ServiceDefinition> |
getServiceDefinitions()
Gives the map of the registered service definitions. |
static IServiceLocator |
getServiceLocator(java.lang.String locatorName)
Gives a defined locator instance by it's name |
static java.util.Map<java.lang.String,IServiceLocator> |
getServiceLocators()
Gives the map of the registered locator instances. |
static void |
processRegisteredXMLConfig()
Processes registered config files, resolves them and registers services, locators and interceptors within those files |
static void |
registerInterceptor(org.sr.common.entitydef.InterceptorDefinition idef)
Registers an interceptor definition |
static void |
registerLocator(IServiceLocator locator)
Registers a Service Locator |
static void |
registerService(org.sr.common.entitydef.ServiceDefinition serviceDef)
Registers a service definition |
static void |
registerXMLConfig(java.io.InputStream configXml)
Registers an XML config file to process later on with "processRegisteredXMLConfig" method. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String DEFAULT_SERVICE_LOCATOR
Constructor Detail |
---|
public ServicesRegistry()
Method Detail |
---|
public static java.lang.String getRegistryQueryService()
public static org.sr.common.entitydef.ServiceDefinition getServiceDefinition(java.lang.String serviceName)
serviceName
- name of the service
public static IServiceLocator getDefaultServiceLocator()
POJOServiceLocator
) as default one to access service instances
which are not specified their locator in their definitions.
public static IServiceLocator getServiceLocator(java.lang.String locatorName)
locatorName
- name of the locator
public static java.util.Map<java.lang.String,IServiceLocator> getServiceLocators()
public static java.util.Map<java.lang.String,org.sr.common.entitydef.ServiceDefinition> getServiceDefinitions()
public static void registerService(org.sr.common.entitydef.ServiceDefinition serviceDef) throws ServiceRegistrationException
serviceDef
-
ServiceRegistrationException
public static void registerXMLConfig(java.io.InputStream configXml)
configXml
- public static void processRegisteredXMLConfig()
public static void registerLocator(IServiceLocator locator) throws ServiceRegistrationException
locator
- locator instance
ServiceRegistrationException
public static void registerInterceptor(org.sr.common.entitydef.InterceptorDefinition idef) throws ServiceRegistrationException
idef
- an interceptor definition
ServiceRegistrationException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |