Search in sources :

Example 1 with Version

use of com.github.dockerjava.api.model.Version in project camel by apache.

the class DockerCustomCmdExecFactoryTestIT method createRouteBuilder.

@Override
protected RouteBuilder createRouteBuilder() throws Exception {
    FakeDockerCmdExecFactory.class.getDeclaredConstructors();
    return new RouteBuilder() {

        public void configure() {
            from("direct:in").to("docker://version?cmdExecFactory=" + FakeDockerCmdExecFactory.class.getName()).log("${body}").process(new Processor() {

                @Override
                public void process(Exchange exchange) throws Exception {
                    Version version = exchange.getIn().getBody(Version.class);
                    exchange.getOut().setBody(version.getVersion());
                }
            }).to("mock:result");
        }
    };
}
Also used : Exchange(org.apache.camel.Exchange) Processor(org.apache.camel.Processor) RouteBuilder(org.apache.camel.builder.RouteBuilder) Version(com.github.dockerjava.api.model.Version)

Aggregations

Version (com.github.dockerjava.api.model.Version)1 Exchange (org.apache.camel.Exchange)1 Processor (org.apache.camel.Processor)1 RouteBuilder (org.apache.camel.builder.RouteBuilder)1