Class JMSPollingConsumer
java.lang.Object
org.wso2.carbon.inbound.endpoint.protocol.jms.JMSPollingConsumer
-
Constructor Summary
ConstructorsConstructorDescriptionJMSPollingConsumer(Properties jmsProperties, long scanInterval, String name) -
Method Summary
Modifier and TypeMethodDescriptionvoiddestroy()voidexecute()This will be called by the task scheduler.protected Propertiesjavax.jms.Messagepoll()Create connection with broker and retrieve the messages.voidregisterHandler(JMSInjectHandler injectHandler) Register a handler to implement injection of the retrieved message
-
Constructor Details
-
JMSPollingConsumer
-
-
Method Details
-
registerHandler
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
-