public class AlertScheduler extends TimerTask implements Initializable, LogEnabled, Serviceable, Disposable, Contextualizable, Configurable, Component
Modifier and Type | Field and Description |
---|---|
protected Configuration |
_configuration
The component configuration.
|
protected Context |
_context
The avalon context.
|
protected Logger |
_logger
The logger.
|
protected ServiceManager |
_manager
The service manager.
|
protected Timer |
_timer
The timer.
|
static String |
ROLE
The Avalon role
|
Constructor and Description |
---|
AlertScheduler() |
Modifier and Type | Method and Description |
---|---|
protected String |
_getRequestURI(Request request)
Get the request URI.
|
void |
configure(Configuration configuration) |
void |
contextualize(Context context) |
void |
dispose() |
void |
enableLogging(Logger logger) |
void |
initialize() |
void |
run() |
void |
sendInstantAlerts(List<String> contentIds,
String message)
Run the scheduler to send instant alerts on contents
|
void |
service(ServiceManager manager) |
cancel, scheduledExecutionTime
protected ServiceManager _manager
protected Configuration _configuration
public AlertScheduler()
public void service(ServiceManager manager) throws ServiceException
service
in interface Serviceable
ServiceException
public void contextualize(Context context) throws ContextException
contextualize
in interface Contextualizable
ContextException
public void configure(Configuration configuration) throws ConfigurationException
configure
in interface Configurable
ConfigurationException
public void enableLogging(Logger logger)
enableLogging
in interface LogEnabled
public void initialize() throws Exception
initialize
in interface Initializable
Exception
public void sendInstantAlerts(List<String> contentIds, String message)
contentIds
- The ids of concerned contentsmessage
- the message to send to authorized usersprotected String _getRequestURI(Request request)
request
- the request object.public void dispose()
dispose
in interface Disposable