|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectfr.dyade.aaa.agent.Agent
org.objectweb.joram.mom.dest.Destination
org.objectweb.joram.mom.dest.Topic
org.objectweb.joram.mom.dest.AcquisitionTopic
public class AcquisitionTopic
The AcquisitionTopic
class implements the MOM acquisition topic
behavior, basically acquiring messages periodically or on client request,
using an AcquisitionModule
.
Field Summary | |
---|---|
static org.objectweb.util.monolog.api.Logger |
logger
|
Fields inherited from class org.objectweb.joram.mom.dest.Topic |
---|
alreadySentLocally, fatherId, friends, selectors, subscribers |
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 |
Fields inherited from class fr.dyade.aaa.agent.Agent |
---|
emptyString, fixed, logmon |
Constructor Summary | |
---|---|
AcquisitionTopic()
|
Method Summary | |
---|---|
void |
agentFinalize(boolean lastTime)
Finalizes the agent before it is garbaged. |
java.lang.String |
getAcquisitionClassName()
Returns the acquisition handler class name. |
long |
getAcquisitionPeriod()
Returns the acquisition period. |
long |
getExpiration()
Returns the expiration value for produced messages. |
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(AgentId from,
ClientMessages cm)
Incoming JMS messages are processed by the acquisition module and a null ClientMessages is always returned to the base implementation. |
void |
react(AgentId from,
Notification not)
Distributes the received notifications to the appropriate reactions. |
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. |
void |
setProperties(java.util.Properties properties)
Configures an AcquisitionTopic instance. |
protected java.util.Properties |
startHandler(java.util.Properties prop)
Start the handler. |
protected java.util.Properties |
stopHandler(java.util.Properties prop)
Stop the handler. |
java.lang.String |
toString()
Returns a string representation of this destination. |
void |
updateProperties(java.util.Properties prop)
Update properties configuration, they are processed by the distribution module |
Methods inherited from class org.objectweb.joram.mom.dest.Topic |
---|
clusterJoin, clusterJoinAck, doClientMessages, doDeleteNot, doRightRequest, doUnknownAgent, forwardMessages, getClusterElements, getNbMsgsReceiveSinceCreation, getNumberOfSubscribers, getSubscriberIds, getType, handleAdminRequestNot, postSubscribe, postUnsubscribe, preSubscribe, preUnsubscribe, processMessages, sendToCluster, setAlreadySentLocally, subscribeRequest, topicForwardNot, unsubscribeRequest, wakeUpNot |
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.TopicMBean |
---|
getNumberOfSubscribers, getSubscriberIds |
Methods inherited from interface org.objectweb.joram.mom.dest.DestinationMBean |
---|
delete, getCreationDate, getCreationTimeInMillis, getDestinationId, getDMQId, getName, getNbMsgsDeliverSinceCreation, getNbMsgsReceiveSinceCreation, getNbMsgsSentToDMQSinceCreation, getPeriod, getRight, getRights, isFreeReading, isFreeWriting, setFreeReading, setFreeWriting, setPeriod |
Methods inherited from interface fr.dyade.aaa.agent.AgentMBean |
---|
getAgentId, getCommitTime, getReactNb, getReactTime, isFixed |
Methods inherited from interface org.objectweb.joram.mom.dest.ClusterDestinationMBean |
---|
getClusterElements |
Field Detail |
---|
public static org.objectweb.util.monolog.api.Logger logger
Constructor Detail |
---|
public AcquisitionTopic()
Method Detail |
---|
public java.lang.String getAcquisitionClassName()
AcquisitionMBean
getAcquisitionClassName
in interface AcquisitionMBean
public void setProperties(java.util.Properties properties) throws RequestException
AcquisitionTopic
instance.
setProperties
in class Destination
properties
- The initial set of properties.
RequestException
public void initialize(boolean firstTime)
Topic
initialize
in class Topic
firstTime
- true when first called by the factorypublic void react(AgentId from, Notification not) throws java.lang.Exception
Topic
react
in class Topic
from
- agent sending notificationnot
- notification to react to
java.lang.Exception
- unspecialized exceptionpublic void agentFinalize(boolean lastTime)
Destination
agentFinalize
in class Destination
lastTime
- true when last called by the factory on agent deletion.public ClientMessages preProcess(AgentId from, ClientMessages cm)
preProcess
in class Destination
from
- The sender of the messagecm
- The incoming messages.
AcquisitionModule.processMessages(ClientMessages)
,
Destination.preProcess(AgentId, ClientMessages)
public void updateProperties(java.util.Properties prop) throws java.lang.Exception
updateProperties
in class Destination
prop
- the new properties.
java.lang.Exception
protected java.util.Properties startHandler(java.util.Properties prop) throws java.lang.Exception
prop
- properties for start if needed
java.lang.Exception
protected java.util.Properties stopHandler(java.util.Properties prop) throws java.lang.Exception
prop
- properties for stop if needed
java.lang.Exception
public java.lang.String toString()
Topic
toString
in interface AgentMBean
toString
in interface DestinationMBean
toString
in class Topic
public long getExpiration()
AcquisitionMBean
getExpiration
in interface AcquisitionMBean
public int getPriority()
AcquisitionMBean
getPriority
in interface AcquisitionMBean
public boolean isMessagePersistent()
AcquisitionMBean
isMessagePersistent
in interface AcquisitionMBean
public void setExpiration(long expiration)
AcquisitionMBean
setExpiration
in interface AcquisitionMBean
expiration
- the expiration to set.public void setMessagePersistent(boolean isPersistent)
AcquisitionMBean
setMessagePersistent
in interface AcquisitionMBean
isPersistent
- if true the messages produced are persistent.public void setPriority(int priority)
AcquisitionMBean
setPriority
in interface AcquisitionMBean
priority
- the priority to set.public long getAcquisitionPeriod()
AcquisitionMBean
getAcquisitionPeriod
in interface AcquisitionMBean
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |