diff options
Diffstat (limited to 'java/client/src/main/java/org/apache/qpid/client/AMQConnectionDelegate.java')
-rw-r--r-- | java/client/src/main/java/org/apache/qpid/client/AMQConnectionDelegate.java | 32 |
1 files changed, 26 insertions, 6 deletions
diff --git a/java/client/src/main/java/org/apache/qpid/client/AMQConnectionDelegate.java b/java/client/src/main/java/org/apache/qpid/client/AMQConnectionDelegate.java index 7f36ec6e99..23dc244dee 100644 --- a/java/client/src/main/java/org/apache/qpid/client/AMQConnectionDelegate.java +++ b/java/client/src/main/java/org/apache/qpid/client/AMQConnectionDelegate.java @@ -27,20 +27,40 @@ import javax.jms.XASession; import org.apache.qpid.AMQException; import org.apache.qpid.client.failover.FailoverException; +import org.apache.qpid.client.failover.FailoverProtectedOperation; import org.apache.qpid.framing.ProtocolVersion; import org.apache.qpid.jms.BrokerDetails; import org.apache.qpid.jms.Session; public interface AMQConnectionDelegate { - public ProtocolVersion makeBrokerConnection(BrokerDetails brokerDetail) throws IOException, AMQException; + ProtocolVersion makeBrokerConnection(BrokerDetails brokerDetail) throws IOException, AMQException; - public Session createSession(final boolean transacted, final int acknowledgeMode, - final int prefetchHigh, final int prefetchLow) throws JMSException; + Session createSession(final boolean transacted, final int acknowledgeMode, + final int prefetchHigh, final int prefetchLow) throws JMSException; - public XASession createXASession(int prefetchHigh, int prefetchLow) throws JMSException; + /** + * Create an XASession with default prefetch values of: + * High = MaxPrefetch + * Low = MaxPrefetch / 2 + * @return XASession + * @throws JMSException thrown if there is a problem creating the session. + */ + XASession createXASession() throws JMSException; - public void resubscribeSessions() throws JMSException, AMQException, FailoverException; + XASession createXASession(int prefetchHigh, int prefetchLow) throws JMSException; - public void closeConneciton(long timeout) throws JMSException, AMQException; + void failoverPrep(); + + void resubscribeSessions() throws JMSException, AMQException, FailoverException; + + void closeConnection(long timeout) throws JMSException, AMQException; + + <T, E extends Exception> T executeRetrySupport(FailoverProtectedOperation<T,E> operation) throws E; + + void setIdleTimeout(long l); + + int getMaxChannelID(); + + ProtocolVersion getProtocolVersion(); } |