Search in sources :

Example 1 with CloseSessionRequest

use of com.swiftmq.jms.smqp.v510.CloseSessionRequest in project swiftmq-client by iitsoftware.

the class ConnectionConsumerImpl method close.

public void close() throws JMSException {
    if (closed)
        return;
    Reply reply = null;
    try {
        reply = requestRegistry.request(new CloseSessionRequest(dispatchId));
    } catch (Exception e) {
        throw ExceptionConverter.convert(e);
    }
    deliveryQueue.stopQueue();
    deliveryQueue.close();
    myConnection.removeRequestService(myDispatchId);
    myConnection.removeConnectionConsumer(this);
    if (!reply.isOk()) {
        throw ExceptionConverter.convert(reply.getException());
    }
}
Also used : CloseSessionRequest(com.swiftmq.jms.smqp.v500.CloseSessionRequest) Reply(com.swiftmq.tools.requestreply.Reply) JMSException(javax.jms.JMSException)

Example 2 with CloseSessionRequest

use of com.swiftmq.jms.smqp.v510.CloseSessionRequest in project swiftmq-client by iitsoftware.

the class ConnectionConsumerImpl method close.

public void close() throws JMSException {
    if (closed)
        return;
    Reply reply = null;
    try {
        reply = requestRegistry.request(new CloseSessionRequest(dispatchId));
    } catch (Exception e) {
        throw ExceptionConverter.convert(e);
    }
    deliveryQueue.stopQueue();
    deliveryQueue.close();
    myConnection.removeRequestService(myDispatchId);
    myConnection.removeConnectionConsumer(this);
    if (!reply.isOk()) {
        throw ExceptionConverter.convert(reply.getException());
    }
}
Also used : CloseSessionRequest(com.swiftmq.jms.smqp.v400.CloseSessionRequest) Reply(com.swiftmq.tools.requestreply.Reply) JMSException(javax.jms.JMSException)

Example 3 with CloseSessionRequest

use of com.swiftmq.jms.smqp.v510.CloseSessionRequest in project swiftmq-client by iitsoftware.

the class ConnectionConsumerImpl method close.

public void close() throws JMSException {
    if (closed)
        return;
    Reply reply = null;
    try {
        reply = requestRegistry.request(new CloseSessionRequest(0, dispatchId));
    } catch (Exception e) {
        throw ExceptionConverter.convert(e);
    }
    deliveryQueue.stopQueue();
    deliveryQueue.close();
    myConnection.removeRequestService(myDispatchId);
    myConnection.removeConnectionConsumer(this);
    if (!reply.isOk()) {
        throw ExceptionConverter.convert(reply.getException());
    }
}
Also used : CloseSessionRequest(com.swiftmq.jms.smqp.v510.CloseSessionRequest) Reply(com.swiftmq.tools.requestreply.Reply) JMSException(javax.jms.JMSException)

Aggregations

Reply (com.swiftmq.tools.requestreply.Reply)3 JMSException (javax.jms.JMSException)3 CloseSessionRequest (com.swiftmq.jms.smqp.v400.CloseSessionRequest)1 CloseSessionRequest (com.swiftmq.jms.smqp.v500.CloseSessionRequest)1 CloseSessionRequest (com.swiftmq.jms.smqp.v510.CloseSessionRequest)1