Search in sources :

Example 76 with Build

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

Example 77 with Build

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

the class NetworkBridgeFilterMarshaller 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);
    NetworkBridgeFilter info = (NetworkBridgeFilter) o;
    info.setNetworkTTL(dataIn.readInt());
    info.setNetworkBrokerId((BrokerId) tightUnmarsalCachedObject(wireFormat, dataIn, bs));
}
Also used : NetworkBridgeFilter(io.fabric8.gateway.handlers.detecting.protocol.openwire.command.NetworkBridgeFilter)

Example 78 with Build

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

the class NetworkBridgeFilterMarshaller 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);
    NetworkBridgeFilter info = (NetworkBridgeFilter) o;
    info.setNetworkTTL(dataIn.readInt());
    info.setNetworkBrokerId((BrokerId) looseUnmarsalCachedObject(wireFormat, dataIn));
}
Also used : NetworkBridgeFilter(io.fabric8.gateway.handlers.detecting.protocol.openwire.command.NetworkBridgeFilter)

Example 79 with Build

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

the class PartialCommandMarshaller 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);
    PartialCommand info = (PartialCommand) o;
    info.setCommandId(dataIn.readInt());
    info.setData(tightUnmarshalByteArray(dataIn, bs));
}
Also used : PartialCommand(io.fabric8.gateway.handlers.detecting.protocol.openwire.command.PartialCommand)

Example 80 with Build

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

the class PartialCommandMarshaller 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);
    PartialCommand info = (PartialCommand) o;
    info.setCommandId(dataIn.readInt());
    info.setData(looseUnmarshalByteArray(dataIn));
}
Also used : PartialCommand(io.fabric8.gateway.handlers.detecting.protocol.openwire.command.PartialCommand)

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