Search in sources :

Example 66 with DataStructure

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

the class MessageDispatchNotificationMarshaller method looseMarshal.

/**
 * Write the booleans that this object uses to a BooleanStream
 */
public void looseMarshal(OpenWireFormat wireFormat, Object o, DataByteArrayOutputStream dataOut) throws IOException {
    MessageDispatchNotification info = (MessageDispatchNotification) o;
    super.looseMarshal(wireFormat, o, dataOut);
    looseMarshalCachedObject(wireFormat, (DataStructure) info.getConsumerId(), dataOut);
    looseMarshalCachedObject(wireFormat, (DataStructure) info.getDestination(), dataOut);
    looseMarshalLong(wireFormat, info.getDeliverySequenceId(), dataOut);
    looseMarshalNestedObject(wireFormat, (DataStructure) info.getMessageId(), dataOut);
}
Also used : MessageDispatchNotification(io.fabric8.gateway.handlers.detecting.protocol.openwire.command.MessageDispatchNotification)

Example 67 with DataStructure

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

the class MessageIdMarshaller method looseMarshal.

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

Example 68 with DataStructure

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

the class MessageIdMarshaller method tightMarshal1.

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

Example 69 with DataStructure

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

the class MessageMarshaller method tightMarshal1.

/**
 * Write the booleans that this object uses to a BooleanStream
 */
public int tightMarshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) throws IOException {
    Message info = (Message) o;
    info.beforeMarshall(wireFormat);
    int rc = super.tightMarshal1(wireFormat, o, bs);
    rc += tightMarshalCachedObject1(wireFormat, (DataStructure) info.getProducerId(), bs);
    rc += tightMarshalCachedObject1(wireFormat, (DataStructure) info.getDestination(), bs);
    rc += tightMarshalCachedObject1(wireFormat, (DataStructure) info.getTransactionId(), bs);
    rc += tightMarshalCachedObject1(wireFormat, (DataStructure) info.getOriginalDestination(), bs);
    rc += tightMarshalNestedObject1(wireFormat, (DataStructure) info.getMessageId(), bs);
    rc += tightMarshalCachedObject1(wireFormat, (DataStructure) info.getOriginalTransactionId(), bs);
    rc += tightMarshalString1(info.getGroupID(), bs);
    rc += tightMarshalString1(info.getCorrelationId(), bs);
    bs.writeBoolean(info.isPersistent());
    rc += tightMarshalLong1(wireFormat, info.getExpiration(), bs);
    rc += tightMarshalNestedObject1(wireFormat, (DataStructure) info.getReplyTo(), bs);
    rc += tightMarshalLong1(wireFormat, info.getTimestamp(), bs);
    rc += tightMarshalString1(info.getType(), bs);
    rc += tightMarshalBuffer1(info.getContent(), bs);
    rc += tightMarshalBuffer1(info.getMarshalledProperties(), bs);
    rc += tightMarshalNestedObject1(wireFormat, (DataStructure) info.getDataStructure(), bs);
    rc += tightMarshalCachedObject1(wireFormat, (DataStructure) info.getTargetConsumerId(), bs);
    bs.writeBoolean(info.isCompressed());
    rc += tightMarshalObjectArray1(wireFormat, info.getBrokerPath(), bs);
    rc += tightMarshalLong1(wireFormat, info.getArrival(), bs);
    rc += tightMarshalString1(info.getUserID(), bs);
    bs.writeBoolean(info.isRecievedByDFBridge());
    return rc + 9;
}
Also used : Message(io.fabric8.gateway.handlers.detecting.protocol.openwire.command.Message) DataStructure(io.fabric8.gateway.handlers.detecting.protocol.openwire.command.DataStructure)

Example 70 with DataStructure

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

the class MessageMarshaller 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);
    Message info = (Message) o;
    tightMarshalCachedObject2(wireFormat, (DataStructure) info.getProducerId(), dataOut, bs);
    tightMarshalCachedObject2(wireFormat, (DataStructure) info.getDestination(), dataOut, bs);
    tightMarshalCachedObject2(wireFormat, (DataStructure) info.getTransactionId(), dataOut, bs);
    tightMarshalCachedObject2(wireFormat, (DataStructure) info.getOriginalDestination(), dataOut, bs);
    tightMarshalNestedObject2(wireFormat, (DataStructure) info.getMessageId(), dataOut, bs);
    tightMarshalCachedObject2(wireFormat, (DataStructure) info.getOriginalTransactionId(), dataOut, bs);
    tightMarshalString2(info.getGroupID(), dataOut, bs);
    dataOut.writeInt(info.getGroupSequence());
    tightMarshalString2(info.getCorrelationId(), dataOut, bs);
    bs.readBoolean();
    tightMarshalLong2(wireFormat, info.getExpiration(), dataOut, bs);
    dataOut.writeByte(info.getPriority());
    tightMarshalNestedObject2(wireFormat, (DataStructure) info.getReplyTo(), dataOut, bs);
    tightMarshalLong2(wireFormat, info.getTimestamp(), dataOut, bs);
    tightMarshalString2(info.getType(), dataOut, bs);
    tightMarshalBuffer2(info.getContent(), dataOut, bs);
    tightMarshalBuffer2(info.getMarshalledProperties(), dataOut, bs);
    tightMarshalNestedObject2(wireFormat, (DataStructure) info.getDataStructure(), dataOut, bs);
    tightMarshalCachedObject2(wireFormat, (DataStructure) info.getTargetConsumerId(), dataOut, bs);
    bs.readBoolean();
    dataOut.writeInt(info.getRedeliveryCounter());
    tightMarshalObjectArray2(wireFormat, info.getBrokerPath(), dataOut, bs);
    tightMarshalLong2(wireFormat, info.getArrival(), dataOut, bs);
    tightMarshalString2(info.getUserID(), dataOut, bs);
    bs.readBoolean();
    info.afterMarshall(wireFormat);
}
Also used : Message(io.fabric8.gateway.handlers.detecting.protocol.openwire.command.Message)

Aggregations

DataStructure (io.fabric8.gateway.handlers.detecting.protocol.openwire.command.DataStructure)30 IOException (java.io.IOException)7 Message (io.fabric8.gateway.handlers.detecting.protocol.openwire.command.Message)6 DataResponse (io.fabric8.gateway.handlers.detecting.protocol.openwire.command.DataResponse)5 RemoveInfo (io.fabric8.gateway.handlers.detecting.protocol.openwire.command.RemoveInfo)5 BrokerInfo (io.fabric8.gateway.handlers.detecting.protocol.openwire.command.BrokerInfo)3 ConnectionError (io.fabric8.gateway.handlers.detecting.protocol.openwire.command.ConnectionError)3 ConnectionInfo (io.fabric8.gateway.handlers.detecting.protocol.openwire.command.ConnectionInfo)3 ConsumerControl (io.fabric8.gateway.handlers.detecting.protocol.openwire.command.ConsumerControl)3 ConsumerInfo (io.fabric8.gateway.handlers.detecting.protocol.openwire.command.ConsumerInfo)3 DestinationInfo (io.fabric8.gateway.handlers.detecting.protocol.openwire.command.DestinationInfo)3 LocalTransactionId (io.fabric8.gateway.handlers.detecting.protocol.openwire.command.LocalTransactionId)3 MessageAck (io.fabric8.gateway.handlers.detecting.protocol.openwire.command.MessageAck)3 MessageDispatch (io.fabric8.gateway.handlers.detecting.protocol.openwire.command.MessageDispatch)3 MessageDispatchNotification (io.fabric8.gateway.handlers.detecting.protocol.openwire.command.MessageDispatchNotification)3 MessageId (io.fabric8.gateway.handlers.detecting.protocol.openwire.command.MessageId)3 NetworkBridgeFilter (io.fabric8.gateway.handlers.detecting.protocol.openwire.command.NetworkBridgeFilter)3 ProducerInfo (io.fabric8.gateway.handlers.detecting.protocol.openwire.command.ProducerInfo)3 RemoveSubscriptionInfo (io.fabric8.gateway.handlers.detecting.protocol.openwire.command.RemoveSubscriptionInfo)3 SessionInfo (io.fabric8.gateway.handlers.detecting.protocol.openwire.command.SessionInfo)3