Class StatelessServiceWrapper

java.lang.Object
com.adaptris.core.ServiceImp
com.adaptris.core.services.StatelessServiceWrapper
All Implemented Interfaces:
AdaptrisComponent, ComponentLifecycle, ComponentLifecycleExtension, EventHandlerAware, MessageEventGenerator, Service, ServiceWrapper, StateManagedComponent

@ComponentProfile(summary="Wraps another service, with a strategy for restarting the service periodically", tag="service") public class StatelessServiceWrapper extends ServiceImp implements EventHandlerAware, ServiceWrapper

Stateless service wrapper, wraps any configured service and allows you to set a strategy on when to restart the service before allowing it to execute.

Consider using this wrapper on a service where you will periodically want to stop and re-start a service. Check RestartStrategy for the available restarting strategies. Note that some nested configuration will be ignored, particularly ServiceImp.setContinueOnFail(Boolean) in the nested service. If you want that behaviour, then you should explicitly configure it in this service.

In the adapter configuration file this class is aliased as stateless-service-wrapper which is the preferred alternative to the fully qualified classname when building your configuration.