Search in sources :

Example 71 with Build

use of io.fabric8.openshift.api.model.Build in project fabric8 by jboss-fuse.

the class MessageAckMarshaller 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);
    MessageAck info = (MessageAck) o;
    info.setDestination((ActiveMQDestination) tightUnmarsalCachedObject(wireFormat, dataIn, bs));
    info.setTransactionId((TransactionId) tightUnmarsalCachedObject(wireFormat, dataIn, bs));
    info.setConsumerId((ConsumerId) tightUnmarsalCachedObject(wireFormat, dataIn, bs));
    info.setAckType(dataIn.readByte());
    info.setFirstMessageId((MessageId) tightUnmarsalNestedObject(wireFormat, dataIn, bs));
    info.setLastMessageId((MessageId) tightUnmarsalNestedObject(wireFormat, dataIn, bs));
    info.setMessageCount(dataIn.readInt());
}
Also used : MessageAck(io.fabric8.gateway.handlers.detecting.protocol.openwire.command.MessageAck)

Example 72 with Build

use of io.fabric8.openshift.api.model.Build in project fabric8 by jboss-fuse.

the class MessageAckMarshaller 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);
    MessageAck info = (MessageAck) o;
    info.setDestination((ActiveMQDestination) looseUnmarsalCachedObject(wireFormat, dataIn));
    info.setTransactionId((TransactionId) looseUnmarsalCachedObject(wireFormat, dataIn));
    info.setConsumerId((ConsumerId) looseUnmarsalCachedObject(wireFormat, dataIn));
    info.setAckType(dataIn.readByte());
    info.setFirstMessageId((MessageId) looseUnmarsalNestedObject(wireFormat, dataIn));
    info.setLastMessageId((MessageId) looseUnmarsalNestedObject(wireFormat, dataIn));
    info.setMessageCount(dataIn.readInt());
}
Also used : MessageAck(io.fabric8.gateway.handlers.detecting.protocol.openwire.command.MessageAck)

Example 73 with Build

use of io.fabric8.openshift.api.model.Build in project fabric8 by jboss-fuse.

the class MessageDispatchMarshaller 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);
    MessageDispatch info = (MessageDispatch) o;
    info.setConsumerId((ConsumerId) looseUnmarsalCachedObject(wireFormat, dataIn));
    info.setDestination((ActiveMQDestination) looseUnmarsalCachedObject(wireFormat, dataIn));
    info.setMessage((Message) looseUnmarsalNestedObject(wireFormat, dataIn));
    info.setRedeliveryCounter(dataIn.readInt());
}
Also used : MessageDispatch(io.fabric8.gateway.handlers.detecting.protocol.openwire.command.MessageDispatch)

Example 74 with Build

use of io.fabric8.openshift.api.model.Build in project fabric8 by jboss-fuse.

the class MessageIdMarshaller 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);
    MessageId info = (MessageId) o;
    info.setProducerId((ProducerId) tightUnmarsalCachedObject(wireFormat, dataIn, bs));
    info.setProducerSequenceId(tightUnmarshalLong(wireFormat, dataIn, bs));
    info.setBrokerSequenceId(tightUnmarshalLong(wireFormat, dataIn, bs));
}
Also used : MessageId(io.fabric8.gateway.handlers.detecting.protocol.openwire.command.MessageId)

Example 75 with Build

use of io.fabric8.openshift.api.model.Build 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)

Aggregations

Test (org.junit.Test)255 ArrayList (java.util.ArrayList)74 BuildImageConfiguration (io.fabric8.maven.docker.config.BuildImageConfiguration)69 ImageConfiguration (io.fabric8.maven.docker.config.ImageConfiguration)68 HashMap (java.util.HashMap)66 File (java.io.File)53 ConfigMap (io.fabric8.kubernetes.api.model.ConfigMap)51 IOException (java.io.IOException)50 ConfigMapBuilder (io.fabric8.kubernetes.api.model.ConfigMapBuilder)45 Pod (io.fabric8.kubernetes.api.model.Pod)37 Map (java.util.Map)35 Service (io.fabric8.kubernetes.api.model.Service)34 FabricService (io.fabric8.api.FabricService)33 ResourceConfig (io.fabric8.maven.core.config.ResourceConfig)30 Container (io.fabric8.api.Container)29 RunImageConfiguration (io.fabric8.maven.docker.config.RunImageConfiguration)28 PodBuilder (io.fabric8.kubernetes.api.model.PodBuilder)27 List (java.util.List)26 ServicePortBuilder (io.fabric8.kubernetes.api.model.ServicePortBuilder)25 OpenShiftClient (io.fabric8.openshift.client.OpenShiftClient)25