use of io.fabric8.gateway.handlers.detecting.protocol.openwire.command.DataStructure in project fabric8 by jboss-fuse.
the class ConsumerControlMarshaller 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);
ConsumerControl info = (ConsumerControl) o;
bs.readBoolean();
tightMarshalNestedObject2(wireFormat, (DataStructure) info.getConsumerId(), dataOut, bs);
dataOut.writeInt(info.getPrefetch());
}
use of io.fabric8.gateway.handlers.detecting.protocol.openwire.command.DataStructure in project fabric8 by jboss-fuse.
the class ConsumerControlMarshaller method tightMarshal1.
/**
* Write the booleans that this object uses to a BooleanStream
*/
public int tightMarshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) throws IOException {
ConsumerControl info = (ConsumerControl) o;
int rc = super.tightMarshal1(wireFormat, o, bs);
bs.writeBoolean(info.isClose());
rc += tightMarshalNestedObject1(wireFormat, (DataStructure) info.getConsumerId(), bs);
return rc + 4;
}
use of io.fabric8.gateway.handlers.detecting.protocol.openwire.command.DataStructure in project fabric8 by jboss-fuse.
the class ConsumerInfoMarshaller method tightMarshal1.
/**
* Write the booleans that this object uses to a BooleanStream
*/
public int tightMarshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) throws IOException {
ConsumerInfo info = (ConsumerInfo) o;
int rc = super.tightMarshal1(wireFormat, o, bs);
rc += tightMarshalCachedObject1(wireFormat, (DataStructure) info.getConsumerId(), bs);
bs.writeBoolean(info.isBrowser());
rc += tightMarshalCachedObject1(wireFormat, (DataStructure) info.getDestination(), bs);
bs.writeBoolean(info.isDispatchAsync());
rc += tightMarshalString1(info.getSelector(), bs);
rc += tightMarshalString1(info.getSubscriptionName(), bs);
bs.writeBoolean(info.isNoLocal());
bs.writeBoolean(info.isExclusive());
bs.writeBoolean(info.isRetroactive());
rc += tightMarshalObjectArray1(wireFormat, info.getBrokerPath(), bs);
rc += tightMarshalNestedObject1(wireFormat, (DataStructure) info.getAdditionalPredicate(), bs);
bs.writeBoolean(info.isNetworkSubscription());
bs.writeBoolean(info.isOptimizedAcknowledge());
bs.writeBoolean(info.isNoRangeAcks());
return rc + 9;
}
use of io.fabric8.gateway.handlers.detecting.protocol.openwire.command.DataStructure in project fabric8 by jboss-fuse.
the class DataArrayResponseMarshaller 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);
DataArrayResponse info = (DataArrayResponse) o;
if (dataIn.readBoolean()) {
short size = dataIn.readShort();
DataStructure[] value = new DataStructure[size];
for (int i = 0; i < size; i++) {
value[i] = (DataStructure) looseUnmarsalNestedObject(wireFormat, dataIn);
}
info.setData(value);
} else {
info.setData(null);
}
}
use of io.fabric8.gateway.handlers.detecting.protocol.openwire.command.DataStructure in project fabric8 by jboss-fuse.
the class DataArrayResponseMarshaller 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);
DataArrayResponse info = (DataArrayResponse) o;
if (bs.readBoolean()) {
short size = dataIn.readShort();
DataStructure[] value = new DataStructure[size];
for (int i = 0; i < size; i++) {
value[i] = (DataStructure) tightUnmarsalNestedObject(wireFormat, dataIn, bs);
}
info.setData(value);
} else {
info.setData(null);
}
}
Aggregations