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());
}
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;
}
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));
}
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);
}
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());
}
Aggregations