Joram 5.3.0

org.objectweb.joram.mom.dest
Class MonitoringQueueImpl

java.lang.Object
  extended by org.objectweb.joram.mom.dest.DestinationImpl
      extended by org.objectweb.joram.mom.dest.QueueImpl
          extended by org.objectweb.joram.mom.dest.MonitoringQueueImpl
All Implemented Interfaces:
java.io.Serializable, DestinationImplMBean, MonitoringQueueImplMBean, QueueImplMBean

public class MonitoringQueueImpl
extends QueueImpl
implements MonitoringQueueImplMBean

The MonitoringQueueImpl class implements the monitoring behavior, it delivers monitoring messages when requested.

See Also:
Serialized Form

Field Summary
 
Fields inherited from class org.objectweb.joram.mom.dest.QueueImpl
arrivalsCounter, consumers, contexts, deliveredMsgs, logger, messages, nbMaxMsg, receiving, requests
 
Fields inherited from class org.objectweb.joram.mom.dest.DestinationImpl
_rights, agent, clients, creationDate, dmqId, freeReading, freeWriting, nbMsgsDeliverSinceCreation, nbMsgsReceiveSinceCreation, nbMsgsSentToDMQSinceCreation, READ, READWRITE, WAKEUP_PERIOD, WRITE
 
Constructor Summary
MonitoringQueueImpl(fr.dyade.aaa.agent.AgentId adminId, java.util.Properties properties)
          Constructs a MonitoringQueueImpl instance.
 
Method Summary
 void addMonitoredAttributes(java.lang.String MBeanName, java.lang.String attributes)
          Add the specified attributes to the list of monitored attributes.
 void delMonitoredAttributes(java.lang.String mbean)
          Removes all the attributes of the specified MBean in the list of monitored attributes.
 long getExpiration()
          Returns the expiration value for produced messages.
 java.lang.String[] getMonitoredAttributes()
          Returns the comma separated list of all monitored attributes.
 int getPriority()
          Returns the priority of produced messages.
 void initialize(boolean firstTime)
          Initializes the destination.
 boolean isMessagePersistent()
          Returns true if the messages produced are persistent.
 ClientMessages preProcess(fr.dyade.aaa.agent.AgentId from, ClientMessages cm)
           
 void setExpiration(long expiration)
          Sets the expiration value for produced messages.
 void setMessagePersistent(boolean isPersistent)
          Sets the DeliveryMode value for the produced messages.
 void setPriority(int priority)
          Sets the priority of produced messages.
 java.lang.String toString()
          Returns a string representation of this destination.
 void wakeUpNot(WakeUpNot not)
          When the queue is waken up, collect the monitoring information required and send it.
 
Methods inherited from class org.objectweb.joram.mom.dest.QueueImpl
abortReceiveRequest, acknowledgeRequest, addClientMessages, addMessage, browseRequest, checkDelivery, cleanPendingMessage, cleanPendingMessage, cleanWaitingRequest, cleanWaitingRequest, deliverMessages, denyRequest, destinationAdminRequestNot, doClientMessages, doDeleteNot, doRightRequest, doUnknownAgent, getClientMessages, getDefaultDMQId, getDefaultThreshold, getDeliveredMessageCount, getMessage, getMessages, getMsgTxPrefix, getNbMaxMsg, getNbMsgsReceiveSinceCreation, getPendingMessageCount, getQueueMessage, getThreshold, getWaitingRequestCount, handleExpiredNot, isUndeliverable, isValidJMXAttribute, messageDelivered, messageRemoved, monitGetDMQSettings, monitGetNbMaxMsg, monitGetPendingMessages, monitGetPendingRequests, readBag, receiveRequest, setMsgTxName, setNbMaxMsg, setNbMaxMsgRequest, setThreshold, setThreshRequest, storeMessage, storeMessageHeader, writeBag
 
Methods inherited from class org.objectweb.joram.mom.dest.DestinationImpl
canBeDeleted, clientMessages, deleteNot, forward, getCreationDate, getCreationTimeInMillis, getDestinationId, getDMQId, getId, getJMXStatistics, getNbMsgsDeliverSinceCreation, getNbMsgsSentToDMQSinceCreation, getPeriod, getRight, getRights, handleDeniedMessage, isAdministrator, isFreeReading, isFreeWriting, isLocal, isReader, isWriter, monitFreeAccess, monitGetReaders, monitGetStat, monitGetWriters, postProcess, postProcess, preProcess, processSetRight, replyToTopic, requestGroupNot, setAgent, setDMQRequest, setFreeReading, setFreeWriting, setPeriod, setRightRequest, specialAdminProcess, specialAdminRequest, unknownAgent
 
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.QueueImplMBean
cleanPendingMessage, cleanWaitingRequest, getDeliveredMessageCount, getMessage, getMessages, getNbMaxMsg, getPendingMessageCount, getThreshold, getWaitingRequestCount, setNbMaxMsg, setThreshold
 
Methods inherited from interface org.objectweb.joram.mom.dest.DestinationImplMBean
getCreationDate, getCreationTimeInMillis, getDestinationId, getDMQId, getNbMsgsDeliverSinceCreation, getNbMsgsReceiveSinceCreation, getNbMsgsSentToDMQSinceCreation, getPeriod, getRight, getRights, isFreeReading, isFreeWriting, setFreeReading, setFreeWriting, setPeriod
 

Constructor Detail

MonitoringQueueImpl

public MonitoringQueueImpl(fr.dyade.aaa.agent.AgentId adminId,
                           java.util.Properties properties)
Constructs a MonitoringQueueImpl instance.

Parameters:
adminId - Identifier of the administrator of the queue.
properties - The initial set of properties.
Method Detail

isMessagePersistent

public boolean isMessagePersistent()
Returns true if the messages produced are persistent.

Specified by:
isMessagePersistent in interface MonitoringQueueImplMBean
Returns:
true if the messages produced are persistent.

setMessagePersistent

public void setMessagePersistent(boolean isPersistent)
Sets the DeliveryMode value for the produced messages. if the parameter is true the messages produced are persistent.

Specified by:
setMessagePersistent in interface MonitoringQueueImplMBean
Parameters:
isPersistent - if true the messages produced are persistent.

getPriority

public int getPriority()
Returns the priority of produced messages.

Specified by:
getPriority in interface MonitoringQueueImplMBean
Returns:
the priority of produced messages.

setPriority

public void setPriority(int priority)
Sets the priority of produced messages.

Specified by:
setPriority in interface MonitoringQueueImplMBean
Parameters:
priority - the priority to set.

getExpiration

public long getExpiration()
Returns the expiration value for produced messages.

Specified by:
getExpiration in interface MonitoringQueueImplMBean
Returns:
the expiration value for produced messages.

setExpiration

public void setExpiration(long expiration)
Sets the expiration value for produced messages.

Specified by:
setExpiration in interface MonitoringQueueImplMBean
Parameters:
expiration - the expiration to set.

initialize

public void initialize(boolean firstTime)
Initializes the destination.

Overrides:
initialize in class QueueImpl
Parameters:
firstTime - true when first called by the factory

preProcess

public ClientMessages preProcess(fr.dyade.aaa.agent.AgentId from,
                                 ClientMessages cm)
Overrides:
preProcess in class DestinationImpl

wakeUpNot

public void wakeUpNot(WakeUpNot not)
When the queue is waken up, collect the monitoring information required and send it.

Overrides:
wakeUpNot in class QueueImpl

getMonitoredAttributes

public java.lang.String[] getMonitoredAttributes()
Returns the comma separated list of all monitored attributes.

Specified by:
getMonitoredAttributes in interface MonitoringQueueImplMBean
Returns:
the comma separated list of all monitored attributes.

addMonitoredAttributes

public void addMonitoredAttributes(java.lang.String MBeanName,
                                   java.lang.String attributes)
Add the specified attributes to the list of monitored attributes. If the Mbean is already monitored, the specified list of attributes overrides the existing one.

Specified by:
addMonitoredAttributes in interface MonitoringQueueImplMBean
Parameters:
MBeanName - the name of the MBean.
attributes - the comma separated list of attributes to monitor.

delMonitoredAttributes

public void delMonitoredAttributes(java.lang.String mbean)
Removes all the attributes of the specified MBean in the list of monitored attributes.

Specified by:
delMonitoredAttributes in interface MonitoringQueueImplMBean
Parameters:
mbean - the name of the MBean.

toString

public java.lang.String toString()
Description copied from class: QueueImpl
Returns a string representation of this destination.

Specified by:
toString in interface DestinationImplMBean
Overrides:
toString in class QueueImpl

Joram 5.3.0

Copyright © 2000 - 2009 Scalagent D.T. - All rights reserved