Search in sources :

Example 11 with SMQPBulkRequest

use of com.swiftmq.jms.smqp.v510.SMQPBulkRequest in project swiftmq-ce by iitsoftware.

the class InboundReader method dataAvailable.

public void dataAvailable(Connection connection, InputStream inputStream) throws IOException {
    dis.setInputStream(inputStream);
    Dumpable obj = Dumpalizer.construct(dis, dumpableFactory);
    if (traceSpace.enabled)
        traceSpace.trace("smqp", "read object: " + obj);
    if (obj.getDumpId() != SMQPFactory.DID_KEEPALIVE_REQ) {
        if (obj.getDumpId() == SMQPFactory.DID_BULK_REQ) {
            SMQPBulkRequest bulkRequest = (SMQPBulkRequest) obj;
            for (int i = 0; i < bulkRequest.len; i++) {
                Request req = (Request) bulkRequest.dumpables[i];
                if (req.getDumpId() != SMQPFactory.DID_KEEPALIVE_REQ)
                    dispatch(req);
                else
                    resetKeepaliveCount();
            }
        } else
            dispatch((Request) obj);
    } else
        resetKeepaliveCount();
}
Also used : SMQPBulkRequest(com.swiftmq.jms.smqp.v630.SMQPBulkRequest) SMQPBulkRequest(com.swiftmq.jms.smqp.v630.SMQPBulkRequest) Request(com.swiftmq.tools.requestreply.Request) Dumpable(com.swiftmq.tools.dump.Dumpable)

Aggregations

Dumpable (com.swiftmq.tools.dump.Dumpable)11 Request (com.swiftmq.tools.requestreply.Request)7 Reply (com.swiftmq.tools.requestreply.Reply)4 IOException (java.io.IOException)4 LengthCaptureDataInput (com.swiftmq.tools.util.LengthCaptureDataInput)3 DataInput (java.io.DataInput)3 JMSSecurityException (javax.jms.JMSSecurityException)3 InvalidVersionException (com.swiftmq.jms.InvalidVersionException)2 SMQPBulkRequest (com.swiftmq.jms.smqp.v600.SMQPBulkRequest)2 SMQPBulkRequest (com.swiftmq.jms.smqp.v610.SMQPBulkRequest)2 SMQPBulkRequest (com.swiftmq.jms.smqp.v630.SMQPBulkRequest)2 SMQPBulkRequest (com.swiftmq.jms.smqp.v750.SMQPBulkRequest)2 SMQPBulkRequest (com.swiftmq.jms.smqp.v400.SMQPBulkRequest)1 SMQPBulkRequest (com.swiftmq.jms.smqp.v500.SMQPBulkRequest)1 SMQPBulkRequest (com.swiftmq.jms.smqp.v510.SMQPBulkRequest)1