Search in sources :

Example 1 with ConsumerId

use of io.fabric8.gateway.handlers.detecting.protocol.openwire.command.ConsumerId in project fabric8 by jboss-fuse.

the class ConsumerControlMarshaller method looseUnmarshal.

/**
 * Un-marshal an object instance from the data input stream
 *
 * @param o the object to un-marshal
 * @param dataIn the data input stream to build the object from
 * @throws IOException
 */
public void looseUnmarshal(OpenWireFormat wireFormat, Object o, DataByteArrayInputStream dataIn) throws IOException {
    super.looseUnmarshal(wireFormat, o, dataIn);
    ConsumerControl info = (ConsumerControl) o;
    info.setClose(dataIn.readBoolean());
    info.setConsumerId((ConsumerId) looseUnmarsalNestedObject(wireFormat, dataIn));
    info.setPrefetch(dataIn.readInt());
}
Also used : ConsumerControl(io.fabric8.gateway.handlers.detecting.protocol.openwire.command.ConsumerControl)

Example 2 with ConsumerId

use of io.fabric8.gateway.handlers.detecting.protocol.openwire.command.ConsumerId in project fabric8 by jboss-fuse.

the class ConsumerIdMarshaller method tightMarshal1.

/**
 * Write the booleans that this object uses to a BooleanStream
 */
public int tightMarshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) throws IOException {
    ConsumerId info = (ConsumerId) o;
    int rc = super.tightMarshal1(wireFormat, o, bs);
    rc += tightMarshalString1(info.getConnectionId(), bs);
    rc += tightMarshalLong1(wireFormat, info.getSessionId(), bs);
    rc += tightMarshalLong1(wireFormat, info.getValue(), bs);
    return rc + 0;
}
Also used : ConsumerId(io.fabric8.gateway.handlers.detecting.protocol.openwire.command.ConsumerId)

Example 3 with ConsumerId

use of io.fabric8.gateway.handlers.detecting.protocol.openwire.command.ConsumerId in project fabric8 by jboss-fuse.

the class ConsumerIdMarshaller method looseUnmarshal.

/**
 * Un-marshal an object instance from the data input stream
 *
 * @param o the object to un-marshal
 * @param dataIn the data input stream to build the object from
 * @throws IOException
 */
public void looseUnmarshal(OpenWireFormat wireFormat, Object o, DataByteArrayInputStream dataIn) throws IOException {
    super.looseUnmarshal(wireFormat, o, dataIn);
    ConsumerId info = (ConsumerId) o;
    info.setConnectionId(looseUnmarshalString(dataIn));
    info.setSessionId(looseUnmarshalLong(wireFormat, dataIn));
    info.setValue(looseUnmarshalLong(wireFormat, dataIn));
}
Also used : ConsumerId(io.fabric8.gateway.handlers.detecting.protocol.openwire.command.ConsumerId)

Example 4 with ConsumerId

use of io.fabric8.gateway.handlers.detecting.protocol.openwire.command.ConsumerId in project fabric8 by jboss-fuse.

the class ConsumerIdMarshaller method looseMarshal.

/**
 * Write the booleans that this object uses to a BooleanStream
 */
public void looseMarshal(OpenWireFormat wireFormat, Object o, DataByteArrayOutputStream dataOut) throws IOException {
    ConsumerId info = (ConsumerId) o;
    super.looseMarshal(wireFormat, o, dataOut);
    looseMarshalString(info.getConnectionId(), dataOut);
    looseMarshalLong(wireFormat, info.getSessionId(), dataOut);
    looseMarshalLong(wireFormat, info.getValue(), dataOut);
}
Also used : ConsumerId(io.fabric8.gateway.handlers.detecting.protocol.openwire.command.ConsumerId)

Example 5 with ConsumerId

use of io.fabric8.gateway.handlers.detecting.protocol.openwire.command.ConsumerId in project fabric8 by jboss-fuse.

the class ConsumerInfoMarshaller method tightUnmarshal.

/**
 * Un-marshal an object instance from the data input stream
 *
 * @param o the object to un-marshal
 * @param dataIn the data input stream to build the object from
 * @throws IOException
 */
public void tightUnmarshal(OpenWireFormat wireFormat, Object o, DataByteArrayInputStream dataIn, BooleanStream bs) throws IOException {
    super.tightUnmarshal(wireFormat, o, dataIn, bs);
    ConsumerInfo info = (ConsumerInfo) o;
    info.setConsumerId((ConsumerId) tightUnmarsalCachedObject(wireFormat, dataIn, bs));
    info.setBrowser(bs.readBoolean());
    info.setDestination((ActiveMQDestination) tightUnmarsalCachedObject(wireFormat, dataIn, bs));
    info.setPrefetchSize(dataIn.readInt());
    info.setMaximumPendingMessageLimit(dataIn.readInt());
    info.setDispatchAsync(bs.readBoolean());
    info.setSelector(tightUnmarshalString(dataIn, bs));
    info.setSubscriptionName(tightUnmarshalString(dataIn, bs));
    info.setNoLocal(bs.readBoolean());
    info.setExclusive(bs.readBoolean());
    info.setRetroactive(bs.readBoolean());
    info.setPriority(dataIn.readByte());
    if (bs.readBoolean()) {
        short size = dataIn.readShort();
        BrokerId[] value = new BrokerId[size];
        for (int i = 0; i < size; i++) {
            value[i] = (BrokerId) tightUnmarsalNestedObject(wireFormat, dataIn, bs);
        }
        info.setBrokerPath(value);
    } else {
        info.setBrokerPath(null);
    }
    info.setAdditionalPredicate((BooleanExpression) tightUnmarsalNestedObject(wireFormat, dataIn, bs));
    info.setNetworkSubscription(bs.readBoolean());
    info.setOptimizedAcknowledge(bs.readBoolean());
    info.setNoRangeAcks(bs.readBoolean());
}
Also used : ConsumerInfo(io.fabric8.gateway.handlers.detecting.protocol.openwire.command.ConsumerInfo) BrokerId(io.fabric8.gateway.handlers.detecting.protocol.openwire.command.BrokerId)

Aggregations

ConsumerId (io.fabric8.gateway.handlers.detecting.protocol.openwire.command.ConsumerId)5 BrokerId (io.fabric8.gateway.handlers.detecting.protocol.openwire.command.BrokerId)4 ConsumerControl (io.fabric8.gateway.handlers.detecting.protocol.openwire.command.ConsumerControl)2 ConsumerInfo (io.fabric8.gateway.handlers.detecting.protocol.openwire.command.ConsumerInfo)2 Message (io.fabric8.gateway.handlers.detecting.protocol.openwire.command.Message)2 MessageAck (io.fabric8.gateway.handlers.detecting.protocol.openwire.command.MessageAck)2 MessageDispatch (io.fabric8.gateway.handlers.detecting.protocol.openwire.command.MessageDispatch)2 MessageDispatchNotification (io.fabric8.gateway.handlers.detecting.protocol.openwire.command.MessageDispatchNotification)2