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