public class AliasInQueue extends Queue
AliasInQueue
class forwards messages to a destination in an other
Joram server using the destination ID.Queue.QueueFactory
Modifier and Type | Field and Description |
---|---|
private int |
currentDestination |
private ArrayList<AgentId> |
destinations |
static org.objectweb.util.monolog.api.Logger |
logger |
private ArrayList<Long> |
metrics |
private long |
minMetrics |
private ArrayList<Long> |
newmetrics |
private ArrayList<Long> |
oldmetrics |
private static long |
pendingMessagesThreshold |
private int |
receivedMetrics |
static String |
REMOTE_AGENT_OPTION |
private static long |
serialVersionUID
define serialVersionUID for interoperability
|
private long |
weightLeft |
private ArrayList<Long> |
weights |
ARRIVAL_STATE_PREFIX, arrivalState, cload, defaultDMQId, defaultRedeliveryDelay, defaultThreshold, DELIVERY_TABLE_PREFIX, DELIVERY_TIME_TABLE_PREFIX, deliveryTable, deliveryTimeTable, hcons, hprod, logmsg, messages, msgTxPrefix, msgTxPrefixLength, nbMaxMsg, nbMsgsDeniedSinceCreation, pload, receiving, requests
_rights, clients, creationDate, dmqId, freeReading, freeWriting, nbMsgsDeliverSinceCreation, nbMsgsSentToDMQSinceCreation, READ, READWRITE, strbuf, task, WRITE
agentProfiling, emptyString, fixed, logmon
BOOLEAN_ENCODED_SIZE, BYTE_ENCODED_SIZE, DOUBLE_ENCODED_SIZE, FLOAT_ENCODED_SIZE, INT_ENCODED_SIZE, LONG_ENCODED_SIZE, SHORT_ENCODED_SIZE
Constructor and Description |
---|
AliasInQueue()
The maximum time the notification can wait in the network before expiration.
|
Modifier and Type | Method and Description |
---|---|
protected void |
doUnknownAgent(UnknownAgent uA)
Method specifically processing an
UnknownAgent instance. |
int |
getEncodableClassId()
Enables the sub classes not to implement this method.
|
void |
handleAdminRequestNot(AgentId from,
FwdAdminRequestNot not) |
protected void |
handleExpiredNot(AgentId from,
ExpiredNot not) |
protected void |
handlePongNot(AgentId from,
PongNot not) |
ClientMessages |
preProcess(AgentId from,
ClientMessages cm)
This method is needed to add processing before the standard handling.
|
protected void |
processSetRight(AgentId user,
int right)
set user right.
|
void |
react(AgentId from,
Notification not)
Distributes the received notifications to the appropriate reactions.
|
private void |
sendNot(Notification not) |
void |
setProperties(Properties properties,
boolean firstTime)
Configures an
AliasInQueue instance. |
String |
toString()
Returns a string representation of this destination.
|
void |
wakeUpNot(WakeUpNot not)
wake up, and cleans the queue.
|
abortReceiveRequest, acknowledgeRequest, addClientMessages, addDeliveryTimeMessage, addMessage, agentSave, browseRequest, checkDelivery, cleanPendingMessage, cleanPendingMessage, cleanWaitingRequest, cleanWaitingRequest, decode, deliverMessages, denyRequest, doClientMessages, doDeleteNot, doRightRequest, encode, finalize, getClientMessages, getConsumerLoad, getDefaultDMQId, getDefaultRedeliveryDelay, getDefaultThreshold, getDeliveredMessageCount, getDeliveryDelay, getDeliveryTimeMessageCount, getEncodedSize, getMessage, getMessages, getMessagesView, getMsgTxPrefix, getNbMaxMsg, getNbMsgsDeliverSinceCreation, getNbMsgsDeniedSinceCreation, getNbMsgsReceiveSinceCreation, getPendingMessageCount, getProducerLoad, getQueueMessage, getRedeliveryDelay, getStats, getThreshold, getType, getWaitingRequestCount, initialize, isPause, isSyncExceptionOnFullDest, isUndeliverable, isValidJMXAttribute, messageDelivered, messageRemoved, processDeliveryTime, receiveRequest, removeMessages, setDefaultRedeliveryDelay, setDeliveryDelay, setMsgTxName, setNbMaxMsg, setPause, setRedeliveryDelay, setSyncExceptionOnFullDest, setThreshold, storeMessage, storeMessageHeader
agentFinalize, agentInitialize, clientMessages, delete, deleteNot, forward, getCreationDate, getCreationTimeInMillis, getDestinationId, getDMQAgentId, getDMQId, getJMXStatistics, getMBeanName, 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
delete, delete, deploy, deploy, getAgentId, getCommitTime, getId, getLogTopic, getName, getReactNb, getReactTime, hasName, isAgentProfiling, isDeployed, isFixed, isUpdated, needToBeCommited, resetCommitTime, resetReactTime, resetTimer, save, sendTo, sendTo, sendTo, setAgentProfiling, setName, setNoSave, setSave
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
delete, getCreationDate, getCreationTimeInMillis, getDestinationId, getDMQId, getName, getNbMsgsSentToDMQSinceCreation, getPeriod, getRight, getRights, isFreeReading, isFreeWriting, setFreeReading, setFreeWriting, setPeriod
getAgentId, getCommitTime, getReactNb, getReactTime, isAgentProfiling, isFixed, resetCommitTime, resetReactTime, resetTimer, setAgentProfiling
private static final long serialVersionUID
public static org.objectweb.util.monolog.api.Logger logger
public static final String REMOTE_AGENT_OPTION
private int currentDestination
private int receivedMetrics
private long minMetrics
private long weightLeft
private static long pendingMessagesThreshold
public AliasInQueue()
public void setProperties(Properties properties, boolean firstTime) throws Exception
AliasInQueue
instance.setProperties
in class Queue
properties
- The initial set of properties.Exception
public ClientMessages preProcess(AgentId from, ClientMessages cm)
Destination
Queue
and Topic
.
The incoming messages can be modified or deleted during the processing.preProcess
in class Destination
from
- The sender of the messagecm
- The incoming messages.public void react(AgentId from, Notification not) throws Exception
Queue
protected void handleExpiredNot(AgentId from, ExpiredNot not)
handleExpiredNot
in class Queue
protected void doUnknownAgent(UnknownAgent uA)
Queue
UnknownAgent
instance.
The specific processing is done when a QueueMsgReply
was
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.
doUnknownAgent
in class Queue
public String toString()
Queue
toString
in interface AgentMBean
toString
in interface DestinationMBean
toString
in class Queue
protected void processSetRight(AgentId user, int right) throws RequestException
Destination
processSetRight
in class Destination
RequestException
public void handleAdminRequestNot(AgentId from, FwdAdminRequestNot not)
private void sendNot(Notification not)
public void wakeUpNot(WakeUpNot not)
Queue
public int getEncodableClassId()
Agent
getEncodableClassId
in interface Encodable
getEncodableClassId
in class Queue
Copyright © 2018 ScalAgent D.T.. All Rights Reserved.