Liberty SPI utilities
The Liberty profile provides service programming interfaces (SPI) to complete various tasks.
Subtopics
- Resource location symbols
Liberty user configuration is made more portable through the use of variables that represent symbolic locations. Use of these variables helps to prevent the coding of absolute paths that would make the user configuration brittle and less portable. Feature code that receives configuration properties might have to deal with values containing such variables.
- Monitoring local files for changes
The Liberty profile has highly dynamic behavior, responding to changes in configuration, applications and other resources. Much of this dynamic behavior is based on monitoring of the local file system for changes. The service that performs this monitoring is available to all Liberty features through the FileMonitor SPI. The file monitor service is provided by the Liberty kernel, so we do not have to specify a feature in server.xml to make it available.
- Configure tracing and logging for features
We can use the tracing and logging mechanism of the Liberty profile for Liberty features. The logging service is part of the Liberty kernel so we do not have to specify a feature in server.xml to use it.
Add web services global handlers
Components that need to register web services handlers to all the web services end points must implement the Handler interface and register that implementation in the service registry.
Exposing REST endpoints with
We can use the REST Handler framework in the Liberty SPI to expose new REST endpoints.
Parent topic: Develop a Liberty feature