Search in sources :

Example 86 with Build

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

the class ReplayCommandMarshaller 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);
    ReplayCommand info = (ReplayCommand) o;
    info.setFirstNakNumber(dataIn.readInt());
    info.setLastNakNumber(dataIn.readInt());
}
Also used : ReplayCommand(io.fabric8.gateway.handlers.detecting.protocol.openwire.command.ReplayCommand)

Example 87 with Build

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

the class SessionIdMarshaller 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);
    SessionId info = (SessionId) o;
    info.setConnectionId(looseUnmarshalString(dataIn));
    info.setValue(looseUnmarshalLong(wireFormat, dataIn));
}
Also used : SessionId(io.fabric8.gateway.handlers.detecting.protocol.openwire.command.SessionId)

Example 88 with Build

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

the class SessionInfoMarshaller 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);
    SessionInfo info = (SessionInfo) o;
    info.setSessionId((SessionId) tightUnmarsalCachedObject(wireFormat, dataIn, bs));
}
Also used : SessionInfo(io.fabric8.gateway.handlers.detecting.protocol.openwire.command.SessionInfo)

Example 89 with Build

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

the class SubscriptionInfoMarshaller 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);
    SubscriptionInfo info = (SubscriptionInfo) o;
    info.setClientId(tightUnmarshalString(dataIn, bs));
    info.setDestination((ActiveMQDestination) tightUnmarsalCachedObject(wireFormat, dataIn, bs));
    info.setSelector(tightUnmarshalString(dataIn, bs));
    info.setSubscriptionName(tightUnmarshalString(dataIn, bs));
}
Also used : SubscriptionInfo(io.fabric8.gateway.handlers.detecting.protocol.openwire.command.SubscriptionInfo)

Example 90 with Build

use of io.fabric8.openshift.api.model.Build in project jointware by isdream.

the class KubernetesClient method create.

@Override
public Object create(Map<String, Object> map) {
    String prefix = null;
    if (map == null || map.get(MASTER_TYPE) == null) {
        return null;
    } else if (map.get(MASTER_TYPE).equals(PROTOCOL_HTTP)) {
        prefix = PROTOCOL_HTTP + "://";
    } else {
        return null;
    }
    Config config = new ConfigBuilder().withMasterUrl(prefix + map.get(MASTER_IP) + ":" + map.get(MASTER_PORT)).build();
    return new DefaultKubernetesClient(config);
}
Also used : Config(io.fabric8.kubernetes.client.Config) ConfigBuilder(io.fabric8.kubernetes.client.ConfigBuilder) DefaultKubernetesClient(io.fabric8.kubernetes.client.DefaultKubernetesClient)

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