WAM Services API Classes
This section provides information about the important classes and interfaces
in the WAM Service API. You can also reference the WAM
Figure 2 summarizes the relationships of various WAM Service API classes.
Figure 2 - WAM Service API class relationships
com.cafesoft.core.service.Service and com.cafesoft.core.service.LifecycleService
com.cafesoft.core.service.Service interface must be implemented either
directly or indirectly by any class that is to be registered as a WAM service.
If your service would benefit by being started and stopped when the WAM Policy Server
and its security domains are started and stopped, then it can implement interface
com.cafesoft.core.service.LifecycleService, which includes
com.cafesoft.core.service.AbstractService and com.cafesoft.core.service.AbstractLifecycleService
These classes provide default implementations for very basic
You’ll write less code in your service implementations if you just extend one of these classes.
com.cafesoft.core.service.ServiceConfig, com.cafesoft.core.service.ServiceContext, and com.cafesoft.core.service.ServiceFinder
When a Service implementation is initialized, it is given a class that implements
com.cafesoft.core.service.ServiceConfig. Your Service implementation can configure
itself with parameters provided through this interface.
ServiceConfig also provides
access to an implementation of
class provides access to a ServiceFinder, which enables your services to look up
and use other registered services.
ServiceContext also provides access to the Logger used by the enclosing security domain. Your service can use this Logger to report DEBUG, INFO, WARNING, ERROR, and FATAL messages that get logged to the security domain’s trace logger.