com.jalios.jcms.db
Class TransactionalAlarmListener

java.lang.Object
  extended by com.jalios.jcms.db.TransactionalAlarmListener
All Implemented Interfaces:
AlarmListener
Direct Known Subclasses:
MonitoringManager, PstatusAlarmListener, StatAlarmListener, WFExpressAlarmListener, WFReminderAlarmListener

public abstract class TransactionalAlarmListener
extends Object
implements AlarmListener

Abstract class to use for Alarms that may perform Hibernate read or write access.

Example :

   AlarmListener myAlarmListener = new TransactionalAlarmListener() {
     public void handleTransactionalAlarm(AlarmEntry entry) {
       // Any task reading or writing in hibernate
     }
   };
   
   // Schedule alarm every 10 minutes
   Channel.getChannel().getCommonAlarmManager("MyAlarmManager").addAlarm(10, true, myAlarmListener);
 

Since:
jcms-6.0
Version:
$Revision: 34837 $

Field Summary
static String REVISION
           
 
Constructor Summary
TransactionalAlarmListener()
           
 
Method Summary
 void handleAlarm(AlarmEntry entry)
          Hibernate transactionnal implementation of AlarmListener.handleAlarm(AlarmEntry).
abstract  void handleTransactionalAlarm(AlarmEntry entry)
          Method to be implemented by subclass.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

REVISION

public static final String REVISION
See Also:
Constant Field Values
Constructor Detail

TransactionalAlarmListener

public TransactionalAlarmListener()
Method Detail

handleTransactionalAlarm

public abstract void handleTransactionalAlarm(AlarmEntry entry)
Method to be implemented by subclass.

Invoked when an alarm is triggered.

Parameters:
entry - the AlarmEntry which has been triggered.

handleAlarm

public final void handleAlarm(AlarmEntry entry)
Hibernate transactionnal implementation of AlarmListener.handleAlarm(AlarmEntry).

Specified by:
handleAlarm in interface AlarmListener
Parameters:
entry - the AlarmEntry which has been triggered.


Copyright © 2001-2010 Jalios SA. All Rights Reserved.