Skip to main content

Services

Bean​

When you create a service and declare @Route annotation, the service becomes a Bean, it won't be reusable

Lifecycle​

The service will be created based on webda.config definition

Generic Parameters​

A Service is a generic class that has at least 2 Parameters:

Service<T extends ServiceParameters,E extends Events>

T: Define the class that define and load the parameters from the configuration
E: Define the events and their types that the service emits

Dependencies​

@Inject​

You can use @Inject to retrieve another Service

Predefined Services​

Webda have some predefined services that are created by default:

NameDescriptionDefault Type
ConfigurationLoad the configuration from the configuration fileN/A
RegistryThe default storage for objects in WebdaWebda/MemoryStore
CryptoServiceThe service that provide the encryption and decryption of dataWebda/CryptoService
RouterThe service that manage the routing of the applicationN/A or Dummy (TBD)
SessionManagerThe service that manage the session of the userWebda/CookieSessionManager

See also​