Class
caplin.services

ServiceRegistryLoader

The class has been deprecated and may be removed in future releases.
The ServiceRegistryLoader class loads the core set of Services required by an Application. It also provides a mechanism for replacing any implementation of a core service by invoking #setService() before #loadServices() is called. Note that no services are constructed until loadServices() is invoked.

The core services include:

  • caplin.services.XmlResourceService
  • caplin.services.HtmlResourceService
  • caplin.services.AppService
  • caplin.services.security.PermissionService

Constructor Summary

Attributes Name and Description
caplin.services.ServiceRegistryLoader()

Constructs a ServiceRegistryLoader.

Method Summary

Attributes Name and Description
void addReadyCallback( fCallback)

Adds a callback that will be called after this ServiceRegistryLoader is ready.

void loadServices()

Loads the services and registers them with the ServiceRegistry

void setAppServiceProperties(Map mProperties)

Sets a set of application properties to be used for the caplin.services.AppService.

void setService(String sInterface, Object oImplementation)

Sets the specified service interface to use the specified implementation.

Constructor Detail

caplin.services.ServiceRegistryLoader()

Constructs a ServiceRegistryLoader.

Deprecated
Aliases remove the need to use service registry loaders.

Method Detail

void addReadyCallback( fCallback)

Adds a callback that will be called after this ServiceRegistryLoader is ready. If this ServiceRegistryLoader is already ready, the callback will be called immediately.

Parameters
fCallback the function that should be called when this ServiceRegistryLoader is ready.

void loadServices()

Loads the services and registers them with the ServiceRegistry

See
caplin.core.ServiceRegistry

void setAppServiceProperties(Map mProperties)

Sets a set of application properties to be used for the caplin.services.AppService. If there are any existing properties that have been set, they will be merged with the specified set, with any duplicated being overridden by those in the specified set.

Parameters
Map mProperties The properties to set.

void setService(String sInterface, Object oImplementation)

Sets the specified service interface to use the specified implementation. If there is already a service due to be registered with this interface name, it will be overridden, and only the service within this invocation will be constructed.

Parameters
String sInterface The service interface to set.
Object oImplementation The implementation to set.