com.scalagent.joram.mom.dest.scheduler
Class SchedulerQueue
java.lang.Object
fr.dyade.aaa.agent.Agent
org.objectweb.joram.mom.dest.Destination
org.objectweb.joram.mom.dest.Queue
com.scalagent.joram.mom.dest.scheduler.SchedulerQueue
- All Implemented Interfaces:
- AgentMBean, BagSerializer, java.io.Serializable, DestinationMBean, QueueMBean
public class SchedulerQueue
- extends Queue
This class overrides the default Queue behavior in order to allow timed
deliveries.
When such a queue receives a message with a property called 'scheduleDate'
then the message is not available for delivery before the specified date.
- See Also:
- Serialized Form
Fields inherited from class org.objectweb.joram.mom.dest.Destination |
_rights, clients, creationDate, dmqId, freeReading, freeWriting, nbMsgsDeliverSinceCreation, nbMsgsReceiveSinceCreation, nbMsgsSentToDMQSinceCreation, READ, READWRITE, task, WAKEUP_PERIOD, WRITE |
Method Summary |
protected boolean |
checkDelivery(Message msg)
Returns true if conditions are ok to deliver the message. |
void |
initialize(boolean firstTime)
Initializes the destination. |
void |
postProcess(ClientMessages not)
This method is needed to add processing after the standard handling. |
void |
react(AgentId from,
Notification not)
Distributes the received notifications to the appropriate reactions. |
Methods inherited from class org.objectweb.joram.mom.dest.Queue |
abortReceiveRequest, acknowledgeRequest, addClientMessages, addMessage, browseRequest, cleanPendingMessage, cleanPendingMessage, cleanWaitingRequest, cleanWaitingRequest, deliverMessages, denyRequest, doClientMessages, doDeleteNot, doRightRequest, doUnknownAgent, getClientMessages, getDefaultDMQId, getDefaultThreshold, getDeliveredMessageCount, getMessage, getMessages, getMessagesView, getMsgTxPrefix, getNbMaxMsg, getNbMsgsReceiveSinceCreation, getPendingMessageCount, getQueueMessage, getThreshold, getType, getWaitingRequestCount, handleAdminRequestNot, handleExpiredNot, isUndeliverable, isValidJMXAttribute, messageDelivered, messageRemoved, readBag, receiveRequest, setMsgTxName, setNbMaxMsg, setThreshold, storeMessage, storeMessageHeader, toString, wakeUpNot, writeBag |
Methods inherited from class org.objectweb.joram.mom.dest.Destination |
agentFinalize, agentInitialize, clientMessages, delete, deleteNot, forward, getCreationDate, getCreationTimeInMillis, getDestinationId, getDMQAgentId, getDMQId, getJMXStatistics, getMBeanName, getNbMsgsDeliverSinceCreation, getNbMsgsSentToDMQSinceCreation, getPeriod, getRight, getRights, getRights, handleDeniedMessage, interceptorsAvailable, isAdministrator, isFreeReading, isFreeWriting, isLocal, isReader, isWriter, preProcess, processAdminCommand, processInterceptors, processSetRight, processStartHandler, processStopHandler, replyToTopic, requestGroupNot, setAdminId, setFreeReading, setFreeWriting, setPeriod, setProperties, setRight, unknownAgent, updateProperties |
Methods inherited from class fr.dyade.aaa.agent.Agent |
delete, delete, deploy, deploy, getAgentId, getCommitTime, getId, getLogTopic, getName, getReactNb, getReactTime, isDeployed, isFixed, needToBeCommited, save, sendTo, sendTo, sendTo, setName, setNoSave, setSave |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface org.objectweb.joram.mom.dest.DestinationMBean |
delete, getCreationDate, getCreationTimeInMillis, getDestinationId, getDMQId, getName, getNbMsgsDeliverSinceCreation, getNbMsgsSentToDMQSinceCreation, getPeriod, getRight, getRights, isFreeReading, isFreeWriting, setFreeReading, setFreeWriting, setPeriod |
logger
public static org.objectweb.util.monolog.api.Logger logger
SCHEDULE_DATE
public static final java.lang.String SCHEDULE_DATE
- See Also:
- Constant Field Values
SCHEDULED
public static final java.lang.String SCHEDULED
- See Also:
- Constant Field Values
SchedulerQueue
public SchedulerQueue()
initialize
public void initialize(boolean firstTime)
- Initializes the destination.
- Overrides:
initialize
in class Queue
- Parameters:
firstTime
- true when first called by the factory
react
public void react(AgentId from,
Notification not)
throws java.lang.Exception
- Description copied from class:
Queue
- Distributes the received notifications to the appropriate reactions.
- Overrides:
react
in class Queue
- Parameters:
from
- agent sending notificationnot
- notification to react to
- Throws:
java.lang.Exception
- unspecialized exception
postProcess
public void postProcess(ClientMessages not)
- Description copied from class:
Destination
- This method is needed to add processing after the standard handling. It
is used in subclass of
Queue
and Topic
.
The incoming messages can be modified or deleted during the processing.
- Overrides:
postProcess
in class Destination
- Parameters:
not
- The incoming messages.
checkDelivery
protected boolean checkDelivery(Message msg)
- Description copied from class:
Queue
- Returns true if conditions are ok to deliver the message.
This method must be overloaded in subclasses.
Be careful only the message header is accessible.
- Overrides:
checkDelivery
in class Queue
Copyright © 2011 ScalAgent D.T.. All Rights Reserved.