|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.objectweb.joram.mom.dest.DestinationImpl
org.objectweb.joram.mom.dest.TopicImpl
org.objectweb.joram.mom.dest.AcquisitionTopicImpl
public class AcquisitionTopicImpl
The AcquisitionTopicImpl
class implements the MOM acquisition topic
behavior, basically acquiring messages periodically or on client request,
using an AcquisitionModule
.
Field Summary | |
---|---|
private java.lang.String |
acquisitionClassName
The acquisition class name. |
private AcquisitionModule |
acquisitionModule
The acquisition module. |
private java.lang.String |
lastMessageId
Stores the id of the last message received to avoid duplicates. |
static org.objectweb.util.monolog.api.Logger |
logger
|
private long |
msgCount
The number of produced messages. |
private java.util.Properties |
properties
Stores the last set of properties defined. |
private static long |
serialVersionUID
define serialVersionUID for interoperability |
Fields inherited from class org.objectweb.joram.mom.dest.TopicImpl |
---|
alreadySentLocally, fatherId, friends, selectors, subscribers |
Fields inherited from class org.objectweb.joram.mom.dest.DestinationImpl |
---|
_rights, agent, clients, creationDate, dmqId, freeReading, freeWriting, nbMsgsDeliverSinceCreation, nbMsgsReceiveSinceCreation, nbMsgsSentToDMQSinceCreation, READ, READWRITE, strbuf, WAKEUP_PERIOD, WRITE |
Constructor Summary | |
---|---|
AcquisitionTopicImpl(AgentId adminId,
java.util.Properties properties)
Constructs an AcquisitionTopicImpl instance. |
Method Summary | |
---|---|
void |
acquisitionNot(AcquisitionNot not)
This method process messages from the acquisition module. |
void |
close()
|
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 used for configuration, they are processed by the acquisition module and a null ClientMessages is always returned to the base implementation. |
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. |
Methods inherited from class org.objectweb.joram.mom.dest.TopicImpl |
---|
clusterAck, clusterNot, clusterTest, doClientMessages, doDeleteNot, doRightRequest, doUnknownAgent, forwardMessages, getNbMsgsReceiveSinceCreation, getNumberOfSubscribers, getSubscriberIds, handleAdminRequestNot, postSubscribe, postUnsubscribe, preSubscribe, preUnsubscribe, processMessages, setAlreadySentLocally, subscribeRequest, topicForwardNot, unsubscribeRequest, wakeUpNot |
Methods inherited from class org.objectweb.joram.mom.dest.DestinationImpl |
---|
canBeDeleted, clientMessages, delete, deleteNot, forward, getCreationDate, getCreationTimeInMillis, getDestinationId, getDMQAgentId, getDMQId, getId, getJMXStatistics, getName, getNbMsgsDeliverSinceCreation, getNbMsgsSentToDMQSinceCreation, getPeriod, getRight, getRights, getRights, handleDeniedMessage, isAdministrator, isFreeReading, isFreeWriting, isLocal, isReader, isValidJMXAttribute, isWriter, postProcess, processSetRight, replyToTopic, requestGroupNot, setAgent, setFreeReading, setFreeWriting, setNoSave, setPeriod, setRight, setSave, 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.TopicImplMBean |
---|
getNumberOfSubscribers, getSubscriberIds |
Methods inherited from interface org.objectweb.joram.mom.dest.DestinationImplMBean |
---|
delete, getCreationDate, getCreationTimeInMillis, getDestinationId, getDMQId, getName, getNbMsgsDeliverSinceCreation, getNbMsgsReceiveSinceCreation, getNbMsgsSentToDMQSinceCreation, getPeriod, getRight, getRights, isFreeReading, isFreeWriting, setFreeReading, setFreeWriting, setPeriod |
Field Detail |
---|
private static final long serialVersionUID
public static org.objectweb.util.monolog.api.Logger logger
private transient AcquisitionModule acquisitionModule
private java.util.Properties properties
private java.lang.String lastMessageId
private long msgCount
private java.lang.String acquisitionClassName
Constructor Detail |
---|
public AcquisitionTopicImpl(AgentId adminId, java.util.Properties properties) throws RequestException
AcquisitionTopicImpl
instance.
adminId
- Identifier of the administrator of the topic.prop
- The initial set of properties.
RequestException
Method Detail |
---|
public java.lang.String getAcquisitionClassName()
AcquisitionMBean
getAcquisitionClassName
in interface AcquisitionMBean
public void initialize(boolean firstTime)
TopicImpl
initialize
in class TopicImpl
firstTime
- true when first called by the factorypublic ClientMessages preProcess(AgentId from, ClientMessages cm)
preProcess
in class DestinationImpl
from
- The sender of the messagecm
- The incoming messages.
AcquisitionModule.processMessages(ClientMessages)
,
DestinationImpl.preProcess(AgentId, ClientMessages)
public void acquisitionNot(AcquisitionNot not)
not
- public java.lang.String toString()
TopicImpl
toString
in interface DestinationImplMBean
toString
in class TopicImpl
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 void close()
public long getAcquisitionPeriod()
AcquisitionMBean
getAcquisitionPeriod
in interface AcquisitionMBean
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |