Search in sources :

Example 11 with ConsumerId

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

the class ConsumerControlMarshaller 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);
    ConsumerControl info = (ConsumerControl) o;
    info.setClose(bs.readBoolean());
    info.setConsumerId((ConsumerId) tightUnmarsalNestedObject(wireFormat, dataIn, bs));
    info.setPrefetch(dataIn.readInt());
}
Also used : ConsumerControl(io.fabric8.gateway.handlers.detecting.protocol.openwire.command.ConsumerControl)

Example 12 with ConsumerId

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

the class ConsumerIdMarshaller method tightMarshal2.

/**
 * Write a object instance to data output stream
 *
 * @param o the instance to be marshaled
 * @param dataOut the output stream
 * @throws IOException thrown if an error occurs
 */
public void tightMarshal2(OpenWireFormat wireFormat, Object o, DataByteArrayOutputStream dataOut, BooleanStream bs) throws IOException {
    super.tightMarshal2(wireFormat, o, dataOut, bs);
    ConsumerId info = (ConsumerId) o;
    tightMarshalString2(info.getConnectionId(), dataOut, bs);
    tightMarshalLong2(wireFormat, info.getSessionId(), dataOut, bs);
    tightMarshalLong2(wireFormat, info.getValue(), dataOut, bs);
}
Also used : ConsumerId(io.fabric8.gateway.handlers.detecting.protocol.openwire.command.ConsumerId)

Example 13 with ConsumerId

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

the class ConsumerIdMarshaller 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);
    ConsumerId info = (ConsumerId) o;
    info.setConnectionId(tightUnmarshalString(dataIn, bs));
    info.setSessionId(tightUnmarshalLong(wireFormat, dataIn, bs));
    info.setValue(tightUnmarshalLong(wireFormat, dataIn, bs));
}
Also used : ConsumerId(io.fabric8.gateway.handlers.detecting.protocol.openwire.command.ConsumerId)

Example 14 with ConsumerId

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

the class ConsumerInfoMarshaller 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);
    ConsumerInfo info = (ConsumerInfo) o;
    info.setConsumerId((ConsumerId) looseUnmarsalCachedObject(wireFormat, dataIn));
    info.setBrowser(dataIn.readBoolean());
    info.setDestination((ActiveMQDestination) looseUnmarsalCachedObject(wireFormat, dataIn));
    info.setPrefetchSize(dataIn.readInt());
    info.setMaximumPendingMessageLimit(dataIn.readInt());
    info.setDispatchAsync(dataIn.readBoolean());
    info.setSelector(looseUnmarshalString(dataIn));
    info.setSubscriptionName(looseUnmarshalString(dataIn));
    info.setNoLocal(dataIn.readBoolean());
    info.setExclusive(dataIn.readBoolean());
    info.setRetroactive(dataIn.readBoolean());
    info.setPriority(dataIn.readByte());
    if (dataIn.readBoolean()) {
        short size = dataIn.readShort();
        BrokerId[] value = new BrokerId[size];
        for (int i = 0; i < size; i++) {
            value[i] = (BrokerId) looseUnmarsalNestedObject(wireFormat, dataIn);
        }
        info.setBrokerPath(value);
    } else {
        info.setBrokerPath(null);
    }
    info.setAdditionalPredicate((BooleanExpression) looseUnmarsalNestedObject(wireFormat, dataIn));
    info.setNetworkSubscription(dataIn.readBoolean());
    info.setOptimizedAcknowledge(dataIn.readBoolean());
    info.setNoRangeAcks(dataIn.readBoolean());
}
Also used : ConsumerInfo(io.fabric8.gateway.handlers.detecting.protocol.openwire.command.ConsumerInfo) BrokerId(io.fabric8.gateway.handlers.detecting.protocol.openwire.command.BrokerId)

Example 15 with ConsumerId

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

the class MessageDispatchMarshaller 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);
    MessageDispatch info = (MessageDispatch) o;
    info.setConsumerId((ConsumerId) tightUnmarsalCachedObject(wireFormat, dataIn, bs));
    info.setDestination((ActiveMQDestination) tightUnmarsalCachedObject(wireFormat, dataIn, bs));
    info.setMessage((Message) tightUnmarsalNestedObject(wireFormat, dataIn, bs));
    info.setRedeliveryCounter(dataIn.readInt());
}
Also used : MessageDispatch(io.fabric8.gateway.handlers.detecting.protocol.openwire.command.MessageDispatch)

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