Search in sources :

Example 1 with BrokerId

use of io.fabric8.gateway.handlers.detecting.protocol.openwire.command.BrokerId 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());
}
Also used : ConsumerInfo(io.fabric8.gateway.handlers.detecting.protocol.openwire.command.ConsumerInfo) BrokerId(io.fabric8.gateway.handlers.detecting.protocol.openwire.command.BrokerId)

Example 2 with BrokerId

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

the class DestinationInfoMarshaller 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);
    DestinationInfo info = (DestinationInfo) o;
    info.setConnectionId((ConnectionId) looseUnmarsalCachedObject(wireFormat, dataIn));
    info.setDestination((ActiveMQDestination) looseUnmarsalCachedObject(wireFormat, dataIn));
    info.setOperationType(dataIn.readByte());
    info.setTimeout(looseUnmarshalLong(wireFormat, dataIn));
    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);
    }
}
Also used : DestinationInfo(io.fabric8.gateway.handlers.detecting.protocol.openwire.command.DestinationInfo) BrokerId(io.fabric8.gateway.handlers.detecting.protocol.openwire.command.BrokerId)

Example 3 with BrokerId

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

the class DestinationInfoMarshaller 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);
    DestinationInfo info = (DestinationInfo) o;
    info.setConnectionId((ConnectionId) tightUnmarsalCachedObject(wireFormat, dataIn, bs));
    info.setDestination((ActiveMQDestination) tightUnmarsalCachedObject(wireFormat, dataIn, bs));
    info.setOperationType(dataIn.readByte());
    info.setTimeout(tightUnmarshalLong(wireFormat, dataIn, bs));
    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);
    }
}
Also used : DestinationInfo(io.fabric8.gateway.handlers.detecting.protocol.openwire.command.DestinationInfo) BrokerId(io.fabric8.gateway.handlers.detecting.protocol.openwire.command.BrokerId)

Example 4 with BrokerId

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

the class MessageMarshaller 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);
    Message info = (Message) o;
    info.beforeUnmarshall(wireFormat);
    info.setProducerId((ProducerId) looseUnmarsalCachedObject(wireFormat, dataIn));
    info.setDestination((ActiveMQDestination) looseUnmarsalCachedObject(wireFormat, dataIn));
    info.setTransactionId((TransactionId) looseUnmarsalCachedObject(wireFormat, dataIn));
    info.setOriginalDestination((ActiveMQDestination) looseUnmarsalCachedObject(wireFormat, dataIn));
    info.setMessageId((MessageId) looseUnmarsalNestedObject(wireFormat, dataIn));
    info.setOriginalTransactionId((TransactionId) looseUnmarsalCachedObject(wireFormat, dataIn));
    info.setGroupID(looseUnmarshalString(dataIn));
    info.setGroupSequence(dataIn.readInt());
    info.setCorrelationId(looseUnmarshalString(dataIn));
    info.setPersistent(dataIn.readBoolean());
    info.setExpiration(looseUnmarshalLong(wireFormat, dataIn));
    info.setPriority(dataIn.readByte());
    info.setReplyTo((ActiveMQDestination) looseUnmarsalNestedObject(wireFormat, dataIn));
    info.setTimestamp(looseUnmarshalLong(wireFormat, dataIn));
    info.setType(looseUnmarshalString(dataIn));
    info.setContent(looseUnmarshalBuffer(dataIn));
    info.setMarshalledProperties(looseUnmarshalBuffer(dataIn));
    info.setDataStructure((DataStructure) looseUnmarsalNestedObject(wireFormat, dataIn));
    info.setTargetConsumerId((ConsumerId) looseUnmarsalCachedObject(wireFormat, dataIn));
    info.setCompressed(dataIn.readBoolean());
    info.setRedeliveryCounter(dataIn.readInt());
    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.setArrival(looseUnmarshalLong(wireFormat, dataIn));
    info.setUserID(looseUnmarshalString(dataIn));
    info.setRecievedByDFBridge(dataIn.readBoolean());
    info.afterUnmarshall(wireFormat);
}
Also used : Message(io.fabric8.gateway.handlers.detecting.protocol.openwire.command.Message) BrokerId(io.fabric8.gateway.handlers.detecting.protocol.openwire.command.BrokerId)

Example 5 with BrokerId

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

the class MessageMarshaller 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);
    Message info = (Message) o;
    info.beforeUnmarshall(wireFormat);
    info.setProducerId((ProducerId) tightUnmarsalCachedObject(wireFormat, dataIn, bs));
    info.setDestination((ActiveMQDestination) tightUnmarsalCachedObject(wireFormat, dataIn, bs));
    info.setTransactionId((TransactionId) tightUnmarsalCachedObject(wireFormat, dataIn, bs));
    info.setOriginalDestination((ActiveMQDestination) tightUnmarsalCachedObject(wireFormat, dataIn, bs));
    info.setMessageId((MessageId) tightUnmarsalNestedObject(wireFormat, dataIn, bs));
    info.setOriginalTransactionId((TransactionId) tightUnmarsalCachedObject(wireFormat, dataIn, bs));
    info.setGroupID(tightUnmarshalString(dataIn, bs));
    info.setGroupSequence(dataIn.readInt());
    info.setCorrelationId(tightUnmarshalString(dataIn, bs));
    info.setPersistent(bs.readBoolean());
    info.setExpiration(tightUnmarshalLong(wireFormat, dataIn, bs));
    info.setPriority(dataIn.readByte());
    info.setReplyTo((ActiveMQDestination) tightUnmarsalNestedObject(wireFormat, dataIn, bs));
    info.setTimestamp(tightUnmarshalLong(wireFormat, dataIn, bs));
    info.setType(tightUnmarshalString(dataIn, bs));
    info.setContent(tightUnmarshalBuffer(dataIn, bs));
    info.setMarshalledProperties(tightUnmarshalBuffer(dataIn, bs));
    info.setDataStructure((DataStructure) tightUnmarsalNestedObject(wireFormat, dataIn, bs));
    info.setTargetConsumerId((ConsumerId) tightUnmarsalCachedObject(wireFormat, dataIn, bs));
    info.setCompressed(bs.readBoolean());
    info.setRedeliveryCounter(dataIn.readInt());
    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.setArrival(tightUnmarshalLong(wireFormat, dataIn, bs));
    info.setUserID(tightUnmarshalString(dataIn, bs));
    info.setRecievedByDFBridge(bs.readBoolean());
    info.afterUnmarshall(wireFormat);
}
Also used : Message(io.fabric8.gateway.handlers.detecting.protocol.openwire.command.Message) BrokerId(io.fabric8.gateway.handlers.detecting.protocol.openwire.command.BrokerId)

Aggregations

BrokerId (io.fabric8.gateway.handlers.detecting.protocol.openwire.command.BrokerId)15 BrokerInfo (io.fabric8.gateway.handlers.detecting.protocol.openwire.command.BrokerInfo)2 ConnectionInfo (io.fabric8.gateway.handlers.detecting.protocol.openwire.command.ConnectionInfo)2 ConsumerInfo (io.fabric8.gateway.handlers.detecting.protocol.openwire.command.ConsumerInfo)2 DestinationInfo (io.fabric8.gateway.handlers.detecting.protocol.openwire.command.DestinationInfo)2 Message (io.fabric8.gateway.handlers.detecting.protocol.openwire.command.Message)2 NetworkBridgeFilter (io.fabric8.gateway.handlers.detecting.protocol.openwire.command.NetworkBridgeFilter)2 ProducerInfo (io.fabric8.gateway.handlers.detecting.protocol.openwire.command.ProducerInfo)2 DefaultKubernetesClient (io.fabric8.kubernetes.client.DefaultKubernetesClient)1 KubernetesClient (io.fabric8.kubernetes.client.KubernetesClient)1 KafkaCluster (io.strimzi.test.KafkaCluster)1 Test (org.junit.Test)1