Examples of ConnectionParameters


Examples of com.alu.e3.data.model.sub.ConnectionParameters

  }

  private static final ConnectionParameters toDataModel(com.alu.e3.prov.restapi.model.ConnectionParameters connectionParametersType) {
    if (connectionParametersType==null) throw new IllegalArgumentException("failOver must not be null");

    ConnectionParameters cp = new ConnectionParameters();
    cp.setConnectionTimeout  (connectionParametersType.getConnectionTimeout());
    cp.setSocketTimeout(connectionParametersType.getSocketTimeout());
    cp.setMaxConnections(connectionParametersType.getMaxConnections());

    return cp;
  }
View Full Code Here

Examples of com.alu.e3.data.model.sub.ConnectionParameters

        forwardProxy = targetHost.getForwardProxy();
      }
     
      Integer maxConnectionPerRoute = E3HttpClientConfigurer.DEFAULT_CONNECTIONS_PER_ROUTE;
     
      ConnectionParameters connectionParameters = targetHost.getConnectionParameters();
     
      if(connectionParameters != null) {
     
        // get first socket timeout settings find (they are all equals)
        if(socketTimeOut == null) {
          socketTimeOut = connectionParameters.getSocketTimeout();
        }
       
        // get first connection timeout settings find (they are all equals)
        if(connectionTimeOut == null) {
          connectionTimeOut = connectionParameters.getConnectionTimeout();
        }
     
        if(connectionParameters.getMaxConnections() != null) {
          maxConnectionPerRoute = connectionParameters.getMaxConnections();
          httpClientConfigurer.getConnectionsPerRoutes().put(targetHost, maxConnectionPerRoute);
        }
      }
     
      maxConnectionsPool = maxConnectionsPool + maxConnectionPerRoute;
View Full Code Here

Examples of com.alu.e3.data.model.sub.ConnectionParameters

      LoadBalancerDisplay.logDebug(LOGGER, name, "Send HTTP request to target reference '" +targetReference.getReference()+ "'");
    }
   
    try {
   
      ConnectionParameters connectionParameters = targetReference.getTargetHost().getConnectionParameters();
      if(connectionParameters != null) {
        Integer connectionTimeout = targetReference.getTargetHost().getConnectionParameters().getConnectionTimeout();
        if(connectionTimeout != null) {
          exchange.setProperty(ExchangeConstantKeys.E3_HTTP_CONNECTION_TIMEOUT.toString(), connectionTimeout);
        }
View Full Code Here

Examples of io.fabric8.gateway.handlers.loadbalancer.ConnectionParameters

                            if (target != null) {
                                try {
                                    URI url = new URI("http://" + target.getHostString() + ":" + target.getPort());
                                    LOG.info(String.format("Connecting '%s' to '%s:%d' using the http protocol",
                                            socket.remoteAddress(), url.getHost(), url.getPort()));
                                    ConnectionParameters params = new ConnectionParameters();
                                    params.protocol = "http";
                                    createClient(params, socket, url, received);
                                    return;
                                } catch (URISyntaxException e) {
                                    handleConnectFailure(socket, "Could not build valid connect URI: "+e);
View Full Code Here

Examples of io.fabric8.gateway.handlers.loadbalancer.ConnectionParameters

        h.codecHandler(new Handler<Command>() {
            @Override
            public void handle(Command event) {
                if( event instanceof WireFormatInfo){
                    WireFormatInfo info = (WireFormatInfo) event;
                    ConnectionParameters parameters = new ConnectionParameters();
                    try {
                        parameters.protocolVirtualHost = info.getHost();
                    } catch (IOException e) {
                        e.printStackTrace();
                    }
View Full Code Here

Examples of io.fabric8.gateway.handlers.loadbalancer.ConnectionParameters

            startsWith(header, 0, CONNECT.toBuffer());
    }

    @Override
    public void snoopConnectionParameters(final SocketWrapper socket, Buffer received, final Handler<ConnectionParameters> handler) {
        handler.handle(new ConnectionParameters());
    }
View Full Code Here

Examples of io.fabric8.gateway.handlers.loadbalancer.ConnectionParameters

        }
    }

    @Override
    public void snoopConnectionParameters(final SocketWrapper socket, Buffer received, final Handler<ConnectionParameters> handler) {
        handler.handle(new ConnectionParameters());
    }
View Full Code Here

Examples of io.fabric8.gateway.handlers.loadbalancer.ConnectionParameters

            @Override
            public void handle(MQTTFrame event) {
                try {
                    if (event.messageType() == org.fusesource.mqtt.codec.CONNECT.TYPE) {
                        CONNECT connect = new CONNECT().decode(event);
                        ConnectionParameters parameters = new ConnectionParameters();
                        if( connect.clientId()!=null ) {
                            parameters.protocolClientId = connect.clientId().toString();
                        }
                        if( connect.userName()!=null ) {
                            parameters.protocolUser = connect.userName().toString();
View Full Code Here

Examples of io.fabric8.gateway.handlers.loadbalancer.ConnectionParameters

        });
        h.codecHandler(new Handler<StompFrame>() {
            @Override
            public void handle(StompFrame event) {
                if( event.action().equals(CONNECT) || event.action().equals(STOMP)) {
                    ConnectionParameters parameters = new ConnectionParameters();
                    parameters.protocolVirtualHost = event.getHeaderAsString(HOST);
                    parameters.protocolUser = event.getHeaderAsString(USERID);
                    parameters.protocolClientId = event.getHeaderAsString(CLIENT_ID);
                    handler.handle(parameters);
                } else {
View Full Code Here

Examples of io.fabric8.gateway.handlers.loadbalancer.ConnectionParameters

    @Override
    public void snoopConnectionParameters(final SocketWrapper socket, final Buffer received, final Handler<ConnectionParameters> handler) {

        // We can't yet snoop the virtual host info from a AMQP connection..
        final AmqpProtocolDecoder h = new AmqpProtocolDecoder(this);
        handler.handle(new ConnectionParameters());

    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.