Search in sources :

Example 11 with BrokerId

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

the class BrokerIdMarshaller method looseMarshal.

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

Example 12 with BrokerId

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

the class BrokerIdMarshaller 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);
    BrokerId info = (BrokerId) o;
    tightMarshalString2(info.getValue(), dataOut, bs);
}
Also used : BrokerId(io.fabric8.gateway.handlers.detecting.protocol.openwire.command.BrokerId)

Example 13 with BrokerId

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

the class ProducerInfoMarshaller 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);
    ProducerInfo info = (ProducerInfo) o;
    info.setProducerId((ProducerId) tightUnmarsalCachedObject(wireFormat, dataIn, bs));
    info.setDestination((ActiveMQDestination) tightUnmarsalCachedObject(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 : ProducerInfo(io.fabric8.gateway.handlers.detecting.protocol.openwire.command.ProducerInfo) BrokerId(io.fabric8.gateway.handlers.detecting.protocol.openwire.command.BrokerId)

Example 14 with BrokerId

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

Example 15 with BrokerId

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

the class BrokerIdMarshaller 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);
    BrokerId info = (BrokerId) o;
    info.setValue(tightUnmarshalString(dataIn, bs));
}
Also used : 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