Class JMSPollingConsumer
- java.lang.Object
-
- org.wso2.carbon.inbound.endpoint.protocol.jms.JMSPollingConsumer
-
public class JMSPollingConsumer extends Object
-
-
Constructor Summary
Constructors Constructor Description JMSPollingConsumer(Properties jmsProperties, long scanInterval, String name)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
destroy()
void
execute()
This will be called by the task scheduler.protected Properties
getInboundProperites()
javax.jms.Message
poll()
Create connection with broker and retrieve the messages.void
registerHandler(JMSInjectHandler injectHandler)
Register a handler to implement injection of the retrieved message
-
-
-
Constructor Detail
-
JMSPollingConsumer
public JMSPollingConsumer(Properties jmsProperties, long scanInterval, String name)
-
-
Method Detail
-
registerHandler
public void registerHandler(JMSInjectHandler injectHandler)
Register a handler to implement injection of the retrieved message- Parameters:
injectHandler
-
-
execute
public void execute()
This will be called by the task scheduler. If a cycle execution takes more than the schedule interval, tasks will call this method ignoring the interval. Timestamp based check is done to avoid that.
-
poll
public javax.jms.Message poll()
Create connection with broker and retrieve the messages. Then inject according to the registered handler
-
destroy
public void destroy()
-
getInboundProperites
protected Properties getInboundProperites()
-
-