|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.objectweb.joram.mom.dest.AcquisitionModule
public class AcquisitionModule
The AcquisitionModule
interfaces between the acquisition destinations
and the specified AcquisitionHandler
.
Field Summary | |
---|---|
protected java.lang.Object |
acquisitionHandler
The acquisition logic. |
static java.lang.String |
CLASS_NAME
The property name for the acquisition handler class name. |
static java.lang.String |
EXPIRATION_PROPERTY
Expiration property name: tells the life expectancy of produced messages. |
static org.objectweb.util.monolog.api.Logger |
logger
|
static java.lang.String |
PERIOD
The property name for the acquisition period. |
static java.lang.String |
PERSISTENT_PROPERTY
Persistent property name: tells if produced messages will be persistent. |
static java.lang.String |
PRIORITY_PROPERTY
Priority property name: tells the JMS priority of produced messages. |
Constructor Summary | |
---|---|
AcquisitionModule(Destination destination,
java.lang.String className,
java.util.Properties properties)
|
Method Summary | |
---|---|
ClientMessages |
acquisitionNot(AcquisitionNot not,
long msgCount)
|
static void |
checkAcquisitionClass(java.lang.String className)
|
void |
close()
Closes the handler. |
long |
getExpiration()
Returns the expiration value for produced messages. |
long |
getPeriod()
|
int |
getPriority()
Returns the priority of produced messages. |
boolean |
isMessagePersistent()
Returns true if the messages produced are persistent. |
void |
processMessages(ClientMessages cm)
In periodic mode (period > 0), a message with non-null properties transmit properties to the handler. |
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.util.Properties |
startHandler(java.util.Properties prop)
Start the daemon. |
protected java.util.Properties |
stopHandler(java.util.Properties prop)
Stop the daemon. |
void |
transmit(java.util.List messages,
java.lang.String messagesId)
Transmits a list of messages to the MOM in a reliable way: messages have been persisted when the method returns and therefore can be safely acknowledged. |
void |
transmit(Message message,
java.lang.String messageId)
Transmits a message to the MOM in a reliable way: message has been persisted when the method returns and therefore can be safely acknowledged. |
void |
updateProperties(java.util.Properties properties)
Update the properties. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static org.objectweb.util.monolog.api.Logger logger
public static final java.lang.String PERIOD
public static final java.lang.String CLASS_NAME
public static final java.lang.String PERSISTENT_PROPERTY
public static final java.lang.String EXPIRATION_PROPERTY
public static final java.lang.String PRIORITY_PROPERTY
protected java.lang.Object acquisitionHandler
Constructor Detail |
---|
public AcquisitionModule(Destination destination, java.lang.String className, java.util.Properties properties)
Method Detail |
---|
public static void checkAcquisitionClass(java.lang.String className) throws java.lang.Exception
java.lang.Exception
public boolean isMessagePersistent()
public void setMessagePersistent(boolean isPersistent)
isPersistent
- if true the messages produced are persistent.public int getPriority()
public void setPriority(int priority)
priority
- the priority to set.public long getExpiration()
public void setExpiration(long expiration)
expiration
- the expiration to set.public void processMessages(ClientMessages cm)
public void updateProperties(java.util.Properties properties) throws java.lang.Exception
properties
- new properties
java.lang.Exception
public 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 ClientMessages acquisitionNot(AcquisitionNot not, long msgCount)
public void close()
public void transmit(Message message, java.lang.String messageId)
ReliableTransmitter
null
if such duplicates are tolerated.
transmit
in interface ReliableTransmitter
message
- the message to transmitmessageId
- the unique ID of the transmitted messagepublic void transmit(java.util.List messages, java.lang.String messagesId)
ReliableTransmitter
null
if such duplicates are tolerated.
transmit
in interface ReliableTransmitter
messages
- the messages to transmitmessagesId
- a unique ID for the list of transmitted messages.public long getPeriod()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |