Package org.objectweb.joram.mom.dest
Class DistributionTopic
- java.lang.Object
-
- fr.dyade.aaa.agent.Agent
-
- org.objectweb.joram.mom.dest.Destination
-
- org.objectweb.joram.mom.dest.Topic
-
- org.objectweb.joram.mom.dest.DistributionTopic
-
- All Implemented Interfaces:
AgentMBean,Encodable,Serializable,ClusterDestinationMBean,DestinationMBean,DistributionTopicMBean,TopicMBean
public class DistributionTopic extends Topic implements DistributionTopicMBean
TheDistributionQueueclass implements the MOM distribution topic behavior, delivering messages via theDistributionModule.- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description private static booleanDEBUGprivate StringdistributionClassNameThe acquisition class name.private DistributionDaemondistributionDaemonprivate DistributionModuledistributionModuleprivate booleanisAsyncDistributionTells if daemon distribution is active.private static Loggerloggerprivate Propertiespropertiesprivate static longserialVersionUIDdefine serialVersionUID for interoperability-
Fields inherited from class org.objectweb.joram.mom.dest.Topic
fatherId, friends, nbMsgsReceiveSinceCreation, selectors, subscribers
-
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 DistributionTopic()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidagentFinalize(boolean lastTime)Finalizes the agent before it is garbaged.StringdumpProperties()voidinitialize(boolean firstTime)Initializes the destination.private booleanisAsyncDistribution(Properties properties)protected voidpostProcess(ClientMessages msgs)This method is needed to add processing after the standard handling.ClientMessagespreProcess(AgentId from, ClientMessages cm)Be careful, the message must be completely loaded (body).voidsetProperties(Properties properties, boolean firstTime)Configures aDistributionTopicinstance.StringtoString()Returns a string representation of this destination.voidwakeUpNot(WakeUpNot not)-
Methods inherited from class org.objectweb.joram.mom.dest.Topic
clusterJoin, clusterJoinAck, createTopicForward, doClientMessages, doDeleteNot, doRightRequest, doUnknownAgent, finalize, forwardMessages, forwardMessages, getClusterElements, getNbMsgsReceiveSinceCreation, getNumberOfSubscribers, getStats, getSubscriberIds, getType, handleAdminRequestNot, processMessages, react, sendToCluster, subscribeRequest, topicForwardNot, unsubscribeRequest
-
Methods inherited from class org.objectweb.joram.mom.dest.Destination
agentInitialize, clientMessages, decode, delete, deleteNot, encode, forward, getCreationDate, getCreationTimeInMillis, getDestinationId, getDMQAgentId, getDMQId, getEncodedSize, getJMXStatistics, getNbMsgsDeliverSinceCreation, getNbMsgsSentToDMQSinceCreation, getPeriod, getRight, getRights, getRights, handleDeniedMessage, interceptorsAvailable, isAdministrator, isFreeReading, isFreeWriting, isLocal, isReader, isValidJMXAttribute, isWriter, processAdminCommand, processInterceptors, processPause, processSetRight, processStartHandler, processStopHandler, replyToTopic, requestGroupNot, setAdminId, setFreeReading, setFreeWriting, setPeriod, setRight, unknownAgent
-
Methods inherited from class fr.dyade.aaa.agent.Agent
agentSave, delete, delete, deploy, deploy, doAdminSyncNotification, getAgentId, getCommitTime, getEncodableClassId, 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.ClusterDestinationMBean
getClusterElements
-
Methods inherited from interface org.objectweb.joram.mom.dest.DestinationMBean
delete, getCreationDate, getCreationTimeInMillis, getDestinationId, getDMQId, getName, getNbMsgsDeliverSinceCreation, getNbMsgsReceiveSinceCreation, getNbMsgsSentToDMQSinceCreation, getPeriod, getRight, getRights, getType, isFreeReading, isFreeWriting, setFreeReading, setFreeWriting, setPeriod
-
Methods inherited from interface org.objectweb.joram.mom.dest.TopicMBean
getNumberOfSubscribers, getSubscriberIds
-
-
-
-
Field Detail
-
logger
private static final Logger logger
-
DEBUG
private static final boolean DEBUG
-
serialVersionUID
private static final long serialVersionUID
define serialVersionUID for interoperability- See Also:
- Constant Field Values
-
distributionModule
private transient DistributionModule distributionModule
-
distributionClassName
private String distributionClassName
The acquisition class name.
-
properties
private Properties properties
-
distributionDaemon
private transient DistributionDaemon distributionDaemon
-
isAsyncDistribution
private boolean isAsyncDistribution
Tells if daemon distribution is active. On true, the batchDistribution is set.
-
-
Method Detail
-
dumpProperties
public String dumpProperties()
- Specified by:
dumpPropertiesin interfaceDistributionTopicMBean
-
setProperties
public void setProperties(Properties properties, boolean firstTime) throws Exception
Configures aDistributionTopicinstance.- Overrides:
setPropertiesin classDestination- Parameters:
properties- The initial set of properties.- Throws:
Exception
-
isAsyncDistribution
private boolean isAsyncDistribution(Properties properties)
-
initialize
public void initialize(boolean firstTime)
Description copied from class:TopicInitializes the destination.- Overrides:
initializein classTopic- Parameters:
firstTime- true when first called by the factory
-
agentFinalize
public void agentFinalize(boolean lastTime)
Description copied from class:DestinationFinalizes the agent before it is garbaged.- Overrides:
agentFinalizein classDestination- Parameters:
lastTime- true if the destination is deleted
-
preProcess
public ClientMessages preProcess(AgentId from, ClientMessages cm)
Be careful, the message must be completely loaded (body).- Overrides:
preProcessin classDestination- Parameters:
fullMessage-- Returns:
- The incoming messages after processing.
- Throws:
Exception
-
postProcess
protected void postProcess(ClientMessages msgs)
Description copied from class:DestinationThis method is needed to add processing after the standard handling. It is used in subclass ofQueueandTopic. The incoming messages can be modified or deleted during the processing.- Overrides:
postProcessin classDestination- Parameters:
msgs- The incoming messages.
-
toString
public String toString()
Description copied from class:TopicReturns a string representation of this destination.- Specified by:
toStringin interfaceAgentMBean- Specified by:
toStringin interfaceDestinationMBean- Overrides:
toStringin classTopic- Returns:
- A string representation of this agent.
-
-