Package org.objectweb.joram.mom.dest
Interface AcquisitionHandler
-
- All Known Implementing Classes:
MailAcquisition,MonitoringAcquisition,RESTAcquisition,URLAcquisition,VoidAcquisitionHandler
public interface AcquisitionHandlerAcquisitionHandlerinterface is made to work with an acquisition queue or topic via anAcquisitionModule. Its purpose is to retrieve messages from non-JMS sources (e-mail, ftp, JMX, ...) in order to inject them into the JMS world. Theretrieve(ReliableTransmitter)method is called regularly depending on how theAcquisitionModuleis configured.This interface is made for explicit acquisition. For implicit acquisition such as message listeners, you need to extend
AcquisitionDaemoninstead.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidclose()Closes this handler and releases any system resources associated to it.voidretrieve(ReliableTransmitter transmitter)Retrieves one or more message from an external source (e-mail, ftp, ...).voidsetProperties(Properties properties)Configures the handler with the given properties.
-
-
-
Method Detail
-
retrieve
void retrieve(ReliableTransmitter transmitter) throws Exception
Retrieves one or more message from an external source (e-mail, ftp, ...). Message properties such as priority, expiration or persistence will be set afterwards by theAcquisitionModule.
If the external source is reliable, acknowledgment can be done safely after transmitting the message using the transmitter.- Parameters:
transmitter- a transmitter used to transmit retrieved messages to the MOM reliably.- Throws:
Exception
-
setProperties
void setProperties(Properties properties)
Configures the handler with the given properties. This method is called one time before the first call to retrieve and then when the acquisition destination receives a configuration message.- Parameters:
properties- The new set of properties.
-
close
void close()
Closes this handler and releases any system resources associated to it. There will be no subsequent call to this handler after it has been closed.
-
-