public interface JMSClientConnector
| Modifier and Type | Method and Description |
|---|---|
SessionWrapper |
acquireSession()
Get a
SessionWrapper instance on this particular connection factory. |
void |
closeConnectionFactory()
Close the Client Connection factory resources.
|
javax.jms.Destination |
createDestination(String destinationName)
Create a
Destination instance using a Session. |
javax.jms.Message |
createMessage(String messageType)
Create a
Message instance using a Session. |
javax.jms.Message |
poll(String destinationName,
int timeout)
Deprecated.
|
javax.jms.Message |
poll(String destinationName,
int timeout,
String messageSelector)
Method to use to poll messages from a destination with the provided timeout.
|
javax.jms.Message |
pollTransacted(String destinationName,
int timeout,
SessionWrapper sessionWrapper)
Deprecated.
|
javax.jms.Message |
pollTransacted(String destinationName,
int timeout,
SessionWrapper sessionWrapper,
String messageSelector)
Poll method for a transacted session.
|
void |
releaseSession(SessionWrapper sessionWrapper)
Release a SessionWrapper instance to the pool after completing the task.
|
boolean |
send(javax.jms.Message message,
String destinationName)
Message sending logic to send message to a backend endpoint.
|
boolean |
sendTransactedMessage(javax.jms.Message jmsMessage,
String destinationName,
SessionWrapper sessionWrapper)
Send a message using provided transacted session.
|
boolean send(javax.jms.Message message,
String destinationName)
throws JMSConnectorException
message - the carbon message used with sending the a message to backend.destinationName - name of the queue/topic message should be sentJMSConnectorException - on error while trying to send message to backend.@Deprecated javax.jms.Message poll(String destinationName, int timeout) throws JMSConnectorException
destinationName - Name of the destination.timeout - timeout value that will blocked for a message.JMSConnectorException - errors when acquiring session, polling or closing resources.javax.jms.Message poll(String destinationName, int timeout, String messageSelector) throws JMSConnectorException
destinationName - Name of the destination.timeout - timeout value that will blocked for a message.messageSelector - message selector filter, set null if no message selector is used.JMSConnectorException - errors when acquiring session, polling or closing resources.javax.jms.Destination createDestination(String destinationName) throws JMSConnectorException
Destination instance using a Session.destinationName - Name of the destination.JMSConnectorException - Error when creating a Destination.javax.jms.Message createMessage(String messageType) throws JMSConnectorException
Message instance using a Session.messageType - Type of the JMS Message.JMSConnectorException - Error when creating a Message.SessionWrapper acquireSession() throws JMSConnectorException
SessionWrapper instance on this particular connection factory.JMSConnectorException - Error when acquiring a session wrapper instance.boolean sendTransactedMessage(javax.jms.Message jmsMessage,
String destinationName,
SessionWrapper sessionWrapper)
throws JMSConnectorException
jmsMessage - JMS Message instance.destinationName - Name of the outbound queue/topic.sessionWrapper - SessionWrapper instance.JMSConnectorException - error when sending the transacted message.@Deprecated javax.jms.Message pollTransacted(String destinationName, int timeout, SessionWrapper sessionWrapper) throws JMSConnectorException
SessionWrapper instance as an argument. Polling will be done on that.destinationName - Name of the destination.timeout - timeout value that will blocked for a message.sessionWrapper - already acquired SessionWrapper instance.JMSConnectorException - errors when polling or closing resources.javax.jms.Message pollTransacted(String destinationName, int timeout, SessionWrapper sessionWrapper, String messageSelector) throws JMSConnectorException
SessionWrapper instance as an argument. Polling will be done on that.destinationName - Name of the destination.timeout - timeout value that will blocked for a message.sessionWrapper - already acquired SessionWrapper instance.messageSelector - message selector filter, set null if no message selector is used.JMSConnectorException - errors when polling or closing resources.void releaseSession(SessionWrapper sessionWrapper) throws JMSConnectorException
sessionWrapper - SessionWrapper to be released.JMSConnectorException - error when releasing the session wrapper instance.void closeConnectionFactory()
throws JMSConnectorException
JMSConnectorException - error when closing the connection factory resources.Copyright © 2019 WSO2. All rights reserved.