Examples of ConnectionConfig


Examples of org.apache.http.config.ConnectionConfig

        MessageConstraints messageConstraints = MessageConstraints.custom()
            .setMaxHeaderCount(200)
            .setMaxLineLength(2000)
            .build();
        // Create connection configuration
        ConnectionConfig connectionConfig = ConnectionConfig.custom()
            .setMalformedInputAction(CodingErrorAction.IGNORE)
            .setUnmappableInputAction(CodingErrorAction.IGNORE)
            .setCharset(Consts.UTF_8)
            .setMessageConstraints(messageConstraints)
            .build();
View Full Code Here

Examples of org.apache.http.config.ConnectionConfig

                ManagedNHttpClientConnectionFactory.INSTANCE;
        }

        public ManagedNHttpClientConnection create(
                final HttpRoute route, final IOSession iosession) throws IOException {
            ConnectionConfig config = null;
            if (route.getProxyHost() != null) {
                config = this.configData.getConnectionConfig(route.getProxyHost());
            }
            if (config == null) {
                config = this.configData.getConnectionConfig(route.getTargetHost());
View Full Code Here

Examples of org.apache.manifoldcf.crawler.connectors.meridio.ConnectionConfig

    this.connectionManager = new MultiThreadedHttpConnectionManager();
    this.connectionManager.getParams().setMaxTotalConnections(1);
    this.clientWorkstation = clientWorkstation;

    // Set up the configuration info object
    ConnectionConfig cc;
    int index = userName.indexOf("\\");
    String domainUser;
    String domain;
    if (index != -1)
    {
      domainUser = userName.substring(index+1);
      domain = userName.substring(0,index);
      if (oLog != null && oLog.isDebugEnabled())
        oLog.debug("Meridio: User is '"+domainUser+"', domain is '"+domain+"'");
    }
    else
    {
      domain = null;
      domainUser = userName;
      if (oLog != null && oLog.isDebugEnabled())
        oLog.debug("Meridio: User is '"+domainUser+"'; there is no domain specified");
    }

    if (oLog != null && oLog.isDebugEnabled())
    {
      if (password != null && password.length() > 0)
        oLog.debug("Meridio: Password exists");
      else
        oLog.debug("Meridio: Password is null");
    }

    // Set up the stub handles
    /*=================================================================
    * Get a handle to the DMWS
    *================================================================*/
    MeridioDMLocator meridioDMLocator = new MeridioDMLocator(engineConfiguration);
    MeridioDMSoapStub meridioDMWebService = new MeridioDMSoapStub(meridioDmwsUrl, meridioDMLocator);

    meridioDMWebService.setPortName(meridioDMLocator.getMeridioDMSoapWSDDServiceName());
    // I believe that setting the username and password this way is no longer needed...
    meridioDMWebService.setUsername(userName);
    meridioDMWebService.setPassword(password);
    // Here's the real way to send in user/password
    cc = new ConnectionConfig(protocolFactory,connectionManager,dmwsProxyHost,(dmwsProxyPort!=null&&dmwsProxyPort.length()>0)?new Integer(dmwsProxyPort):null,
      domain,domainUser,password);
    dmwsConfig = cc;
    meridioDMWebService._setProperty( CONFIGURATION_PROPERTY, cc);

    meridioDMWebService_ = meridioDMWebService;

    /*=================================================================
    * Get a handle to the RMWS
    *================================================================*/
    MeridioRMLocator meridioRMLocator = new MeridioRMLocator(engineConfiguration);
    MeridioRMSoapStub meridioRMWebService = new MeridioRMSoapStub(meridioRmwsUrl, meridioRMLocator);

    meridioRMWebService.setPortName(meridioRMLocator.getMeridioRMSoapWSDDServiceName());
    meridioRMWebService.setUsername(userName);
    meridioRMWebService.setPassword(password);
    cc = new ConnectionConfig(protocolFactory,connectionManager,rmwsProxyHost,(rmwsProxyPort!=null&&rmwsProxyPort.length()>0)?new Integer(rmwsProxyPort):null,
      domain,domainUser,password);
    rmwsConfig = cc;
    meridioRMWebService._setProperty( CONFIGURATION_PROPERTY, cc);

    meridioRMWebService_ = meridioRMWebService;
View Full Code Here

Examples of org.sonatype.nexus.component.source.api.http.ConnectionConfig

    clientConfig.withProxyConfig(proxyFromMap(config));
    return clientConfig;
  }

  private ConnectionConfig connectionFromMap(final Map<String, Object> configMap) {
    ConnectionConfig connectionConfig = null;
    if (configMap.containsKey("http.connection.timeout")) {
      connectionConfig = new ConnectionConfig();
      connectionConfig.withTimeout((Integer) configMap.get("http.connection.timeout"));
    }
    if (configMap.containsKey("http.connection.retries")) {
      connectionConfig = connectionConfig == null ? new ConnectionConfig() : connectionConfig;
      connectionConfig.withRetries((Integer) configMap.get("http.connection.retries"));
    }
    if (configMap.containsKey("http.connection.urlParameters")) {
      connectionConfig = connectionConfig == null ? new ConnectionConfig() : connectionConfig;
      connectionConfig.withUrlParameters((String) configMap.get("http.connection.urlParameters"));
    }
    if (configMap.containsKey("http.connection.userAgentCustomization")) {
      connectionConfig = connectionConfig == null ? new ConnectionConfig() : connectionConfig;
      connectionConfig.withUserAgentCustomisation((String) configMap.get("http.connection.userAgentCustomization"));
    }
    if (configMap.containsKey("http.connection.useTrustStore")) {
      connectionConfig = connectionConfig == null ? new ConnectionConfig() : connectionConfig;
      connectionConfig.withUseTrustStore((Boolean) configMap.get("http.connection.useTrustStore"));
    }
    return connectionConfig;
  }
View Full Code Here

Examples of weave.config.ConnectionConfig

    return getConnectionInfo(user, password).is_superuser;
  }
 
  private ConnectionInfo getConnectionInfo(String user, String password) throws RemoteException
  {
    ConnectionConfig connConfig = getConnectionConfig();
    ConnectionInfo info = connConfig.getConnectionInfo(user);
    if (info == null || password == null || !password.equals(info.pass))
    {
      System.out.println(String.format("authenticate failed, name=\"%s\" pass=\"%s\"", user, password));
      throw new RemoteException("Incorrect username or password.");
    }
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.