Search in sources :

Example 1 with TcpGatewayHandler

use of io.fabric8.gateway.handlers.tcp.TcpGatewayHandler in project fabric8 by jboss-fuse.

the class FabricMQGateway method addGateway.

protected TcpGateway addGateway(List<TcpGateway> gateways, Vertx vertx, ServiceMap serviceMap, String protocolName, boolean enabled, int listenPort, LoadBalancer pathLoadBalancer, LoadBalancer serviceLoadBalancer) {
    if (enabled) {
        TcpGatewayHandler handler = new TcpGatewayHandler(vertx, serviceMap, protocolName, pathLoadBalancer, serviceLoadBalancer);
        TcpGateway gateway = new TcpGateway(vertx, serviceMap, listenPort, protocolName, handler);
        if (Strings.isNotBlank(host)) {
            gateway.setHost(host);
        }
        gateways.add(gateway);
        return gateway;
    } else {
        return null;
    }
}
Also used : TcpGateway(io.fabric8.gateway.handlers.tcp.TcpGateway) TcpGatewayHandler(io.fabric8.gateway.handlers.tcp.TcpGatewayHandler)

Aggregations

TcpGateway (io.fabric8.gateway.handlers.tcp.TcpGateway)1 TcpGatewayHandler (io.fabric8.gateway.handlers.tcp.TcpGatewayHandler)1