|
|||||||||
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
.
Nested Class Summary | |
---|---|
(package private) class |
AcquisitionModule.AcquisitionTask
|
Field Summary | |
---|---|
protected java.lang.Object |
acquisitionHandler
The acquisition logic. |
private AcquisitionModule.AcquisitionTask |
acquisitionTask
The task used to launch a new acquisition. |
static java.lang.String |
CLASS_NAME
The property name for the acquisition handler class name. |
private DestinationImpl |
destination
The acquisition queue or topic using this module. |
private byte |
destType
The destination type set in acquired messages/ |
private long |
expiration
The duration of produced messages. |
static java.lang.String |
EXPIRATION_PROPERTY
Expiration property name: tells the life expectancy of produced messages. |
private boolean |
isDaemon
Tells if acquisition is done on-demand using the acquisition task or with a daemon. |
private boolean |
isPersistent
Tells if the messages produced are persistent. |
static org.objectweb.util.monolog.api.Logger |
logger
|
private long |
period
The period before subsequent acquisition if positive. |
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. |
private int |
priority
The priority of produced messages, default is 4. |
static java.lang.String |
PRIORITY_PROPERTY
Priority property name: tells the JMS priority of produced messages. |
Constructor Summary | |
---|---|
AcquisitionModule(DestinationImpl destination,
java.lang.String className,
java.util.Properties properties,
byte destType)
|
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. |
java.util.Properties |
processMessages(ClientMessages cm)
In periodic mode (period > 0), a message with non-null properties will be treated as a new configuration for the destination, and ignored otherwise. |
void |
setExpiration(long expiration)
Sets the expiration value for produced messages. |
void |
setMessagePersistent(boolean isPersistent)
Sets the DeliveryMode value for the produced messages. |
private void |
setMessagesInfo(java.util.List messages,
long msgCount)
|
void |
setPriority(int priority)
Sets the priority of produced messages. |
private void |
setProperties(java.util.Properties properties)
Resets the acquisition properties. |
private static java.util.Properties |
transform(Properties properties)
|
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. |
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
private int priority
private boolean isPersistent
private long expiration
private final DestinationImpl destination
private final byte destType
private long period
private AcquisitionModule.AcquisitionTask acquisitionTask
private boolean isDaemon
Constructor Detail |
---|
public AcquisitionModule(DestinationImpl destination, java.lang.String className, java.util.Properties properties, byte destType)
Method Detail |
---|
public static void checkAcquisitionClass(java.lang.String className) throws java.lang.Exception
java.lang.Exception
private static java.util.Properties transform(Properties properties)
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.private void setProperties(java.util.Properties properties)
public java.util.Properties processMessages(ClientMessages cm)
public ClientMessages acquisitionNot(AcquisitionNot not, long msgCount)
private void setMessagesInfo(java.util.List messages, 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 |