Package org.objectweb.joram.mom.dest
Class AliasQueue
- java.lang.Object
-
- fr.dyade.aaa.agent.Agent
-
- org.objectweb.joram.mom.dest.Destination
-
- org.objectweb.joram.mom.dest.Queue
-
- org.objectweb.joram.mom.dest.AliasQueue
-
- All Implemented Interfaces:
AgentMBean,Encodable,Serializable,DestinationMBean,QueueMBean
public class AliasQueue extends Queue
TheAliasQueueclass forwards messages to a destination in an other Joram server using the destination ID.- See Also:
- Serialized Form
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.objectweb.joram.mom.dest.Queue
Queue.QueueFactory
-
-
Field Summary
Fields Modifier and Type Field Description private static booleanDEBUGprivate longexpirationThe maximum time the notification can wait in the network before expiration.private static Loggerloggerstatic StringREMOTE_AGENT_OPTIONprivate AgentIdremoteDestinationIDThe queue to send the notification toprivate static longserialVersionUIDdefine serialVersionUID for interoperability-
Fields inherited from class org.objectweb.joram.mom.dest.Queue
ARRIVAL_STATE_PREFIX, arrivalState, cload, defaultDMQId, defaultRedeliveryDelay, defaultThreshold, delayed, DELIVERY_TABLE_PREFIX, DELIVERY_TIMEOUT, deliveryTable, hcons, hprod, LENIENT_REDELIVERY_DELAY, LENIENT_UNDELIVERABLE, logmsg, messages, msgTxPrefix, msgTxPrefixLength, nbExpirations, nbMaxMsg, nbMsgsDeniedSinceCreation, pload, receiving, requests
-
Fields inherited from class org.objectweb.joram.mom.dest.Destination
clients, dmqId, freeReading, freeWriting, nbMsgsDeliverSinceCreation, nbMsgsSentToDMQSinceCreation, READ, READWRITE, strbuf, strictCounters, task, temporary, WRITE
-
Fields inherited from class fr.dyade.aaa.agent.Agent
agentProfiling, emptyString, fixed, logmon
-
Fields inherited from interface fr.dyade.aaa.common.encoding.Encodable
BOOLEAN_ENCODED_SIZE, BYTE_ENCODED_SIZE, DOUBLE_ENCODED_SIZE, FLOAT_ENCODED_SIZE, INT_ENCODED_SIZE, LONG_ENCODED_SIZE, SHORT_ENCODED_SIZE
-
-
Constructor Summary
Constructors Constructor Description AliasQueue()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voiddoUnknownAgent(UnknownAgent uA)Method specifically processing anUnknownAgentinstance.intgetEncodableClassId()Enables the sub classes not to implement this method.protected voidhandleExpiredNot(AgentId from, ExpiredNot not)ClientMessagespreProcess(AgentId from, ClientMessages cm)This method is needed to add processing before the standard handling.protected voidprocessSetRight(AgentId user, int right)set user right.voidreact(AgentId from, Notification not)Distributes the received notifications to the appropriate reactions.voidsetProperties(Properties properties, boolean firstTime)Configures anAliasQueueinstance.StringtoString()Returns a string representation of this destination.-
Methods inherited from class org.objectweb.joram.mom.dest.Queue
abortReceiveRequest, acknowledgeRequest, addClientMessages, addDeliveryTimeMessage, addMessage, agentSave, browseRequest, checkDelivery, cleanPendingMessage, cleanPendingMessage, cleanWaitingRequest, cleanWaitingRequest, clear, decode, deliverMessages, denyRequest, doAdminSyncNotification, doClientMessages, doDeleteNot, doRightRequest, encode, exportMessages, finalize, getClientMessages, getConsumerLoad, getDefaultDMQId, getDefaultRedeliveryDelay, getDefaultThreshold, getDelayedMessage, getDelayedMessageCount, getDelayedMessages, getDeliveredMessageCount, getDeliveryDelay, getEncodedSize, getMessage, getMessages, getMessagesView, getMsgTxPrefix, getNbMaxMsg, getNbMsgsDeliverSinceCreation, getNbMsgsDeniedSinceCreation, getNbMsgsReceiveSinceCreation, getPendingMessageCount, getProducerLoad, getQueueMessage, getRedeliveryDelay, getStats, getThreshold, getType, getWaitingRequestCount, handleAdminRequestNot, initialize, isPause, isSyncExceptionOnFullDest, isUndeliverable, isValidJMXAttribute, messageDelivered, messageRemoved, processDeliveryTime, receiveRequest, setDefaultRedeliveryDelay, setDeliveryDelay, setMsgTxName, setNbMaxMsg, setPause, setRedeliveryDelay, setSyncExceptionOnFullDest, setThreshold, storeMessage, wakeUpNot
-
Methods inherited from class org.objectweb.joram.mom.dest.Destination
agentFinalize, agentInitialize, clientMessages, delete, deleteNot, forward, getCreationDate, getCreationTimeInMillis, getDestinationId, getDMQAgentId, getDMQId, getJMXStatistics, getNbMsgsSentToDMQSinceCreation, getPeriod, getRight, getRights, getRights, handleDeniedMessage, interceptorsAvailable, isAdministrator, isFreeReading, isFreeWriting, isLocal, isReader, isWriter, postProcess, processAdminCommand, processInterceptors, processPause, processStartHandler, processStopHandler, replyToTopic, requestGroupNot, setAdminId, setFreeReading, setFreeWriting, setPeriod, setRight, unknownAgent
-
Methods inherited from class fr.dyade.aaa.agent.Agent
delete, delete, deploy, deploy, getAgentId, getCommitTime, getId, getLogTopic, getName, getReactNb, getReactTime, hasName, incWorkInProgress, isAgentProfiling, isDeployed, isFixed, isUpdated, load, needToBeCommited, resetCommitTime, resetReactTime, resetTimer, save, sendTo, sendTo, sendTo, setAgentProfiling, setName, setNoSave, setSave
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface fr.dyade.aaa.agent.AgentMBean
getAgentId, getCommitTime, getReactNb, getReactTime, isAgentProfiling, isFixed, resetCommitTime, resetReactTime, resetTimer, setAgentProfiling
-
Methods inherited from interface org.objectweb.joram.mom.dest.DestinationMBean
delete, getCreationDate, getCreationTimeInMillis, getDestinationId, getDMQId, getName, getNbMsgsSentToDMQSinceCreation, getPeriod, getRight, getRights, isFreeReading, isFreeWriting, setFreeReading, setFreeWriting, setPeriod
-
-
-
-
Field Detail
-
serialVersionUID
private static final long serialVersionUID
define serialVersionUID for interoperability- See Also:
- Constant Field Values
-
logger
private static final Logger logger
-
DEBUG
private static final boolean DEBUG
-
REMOTE_AGENT_OPTION
public static final String REMOTE_AGENT_OPTION
- See Also:
- Constant Field Values
-
remoteDestinationID
private AgentId remoteDestinationID
The queue to send the notification to
-
expiration
private long expiration
The maximum time the notification can wait in the network before expiration.
-
-
Method Detail
-
setProperties
public void setProperties(Properties properties, boolean firstTime) throws Exception
Configures anAliasQueueinstance.- Overrides:
setPropertiesin classQueue- Parameters:
properties- The initial set of properties.- Throws:
Exception
-
preProcess
public ClientMessages preProcess(AgentId from, ClientMessages cm)
Description copied from class:DestinationThis method is needed to add processing before the standard handling. It is used in subclass ofQueueandTopic. The incoming messages can be modified or deleted during the processing.- Overrides:
preProcessin classDestination- Parameters:
from- The sender of the messagecm- The incoming messages.- Returns:
- The incoming messages after processing.
-
react
public void react(AgentId from, Notification not) throws Exception
Description copied from class:QueueDistributes the received notifications to the appropriate reactions.
-
handleExpiredNot
protected void handleExpiredNot(AgentId from, ExpiredNot not)
- Overrides:
handleExpiredNotin classQueue
-
doUnknownAgent
protected void doUnknownAgent(UnknownAgent uA)
Description copied from class:QueueMethod specifically processing anUnknownAgentinstance.The specific processing is done when a
QueueMsgReplywas sent to a requester which does not exist anymore. In that case, the messages sent to this requester and not yet acknowledged are marked as "denied" for delivery to an other requester, and a new delivery sequence is launched. Messages considered as undeliverable are removed and sent to the DMQ.- Overrides:
doUnknownAgentin classQueue
-
toString
public String toString()
Description copied from class:QueueReturns a string representation of this destination.- Specified by:
toStringin interfaceAgentMBean- Specified by:
toStringin interfaceDestinationMBean- Overrides:
toStringin classQueue- Returns:
- a string representation of this destination.
-
processSetRight
protected void processSetRight(AgentId user, int right) throws RequestException
Description copied from class:Destinationset user right.- Overrides:
processSetRightin classDestination- Throws:
RequestException
-
getEncodableClassId
public int getEncodableClassId()
Description copied from class:AgentEnables the sub classes not to implement this method.- Specified by:
getEncodableClassIdin interfaceEncodable- Overrides:
getEncodableClassIdin classQueue- Returns:
- -1
-
-