Examples of ClientConfiguration


Examples of net.openesb.sdk.ClientConfiguration

        init();
        this.httpClient = httpClientFactory.createHttpClient(openESBClientConfiguration);
    }

    public OpenESBClientImpl() {
        this(new ClientConfiguration());
    }
View Full Code Here

Examples of net.sf.jpluck.ClientConfiguration

  }

  public void run() {
    running = true;
    conversionActive = true;
    ClientConfiguration conf = ClientConfiguration.getDefault();
    if (conf.isUseProxy()) {
      System.setProperty("http.proxyHost", conf.getProxyHost());
      System.setProperty("http.proxyPort", String.valueOf(conf.getProxyPort()));
      if (conf.getProxyUser().length() > 0) {
        System.setProperty(HttpClient.PROXY_USER_KEY, conf.getProxyUser());
        System.setProperty(HttpClient.PROXY_PASSWORD_KEY, conf.getProxyPassword());
      }
    }
    LogUtil logUtil = new LogUtil(LogUtil.DEFAULT_LOGGER_NAMES);
    logUtil.setLevel(conf.getLogLevel());
    logUtil.setUseParentHandler(false);
    String logFile = conf.getLogFile();
    FileHandler fileHandler = null;
    if (conf.isLogEnabled() && logFile.length() > 0) {
      try {
        fileHandler = new FileHandler(logFile, conf.getMaxLogSize() * 1024, 1, true);
        fileHandler.setFormatter(new LogFormatter());
        logUtil.addHandler(fileHandler);
      } catch (IOException e) {
        logger.warning("Could not create log file " + e.getMessage());
      }
    }

    for (int i = 0; (i < jxlDocuments.length) && running; i++) {
      try {
        net.sf.jpluck.jxl.Document jxlDocument = jxlDocuments[i];
        if (jxlDocument.getUserAgent() != null) {
          System.setProperty("http.agent", jxlDocument.getUserAgent());
        } else {
          System.setProperty("http.agent", conf.getUserAgent());
        }
        String s = "Starting conversion: " + jxlDocument.getName();
        if (jxlDocument.getJXL() != null) {
          File f = jxlDocument.getJXL().getFile();
          if (f != null) {
View Full Code Here

Examples of net.sf.katta.util.ClientConfiguration

  @Override
  protected void afterClusterStart() throws Exception {
    IDeployClient deployClient = new DeployClient(_miniCluster.getProtocol());
    deployClient.addIndex(INDEX1, TestResources.MAP_FILE_A.getAbsolutePath(), 1).joinDeployment();
    _client = new SleepClient(new DefaultNodeSelectionPolicy(), _miniCluster.getZkConfiguration(),
            new ClientConfiguration());
  }
View Full Code Here

Examples of net.sf.katta.util.ClientConfiguration

  public Client(Class<? extends VersionedProtocol> serverClass, final ZkConfiguration config) {
    this(serverClass, new DefaultNodeSelectionPolicy(), config);
  }

  public Client(Class<? extends VersionedProtocol> serverClass, InteractionProtocol protocol) {
    this(serverClass, new DefaultNodeSelectionPolicy(), protocol, new ClientConfiguration());
  }
View Full Code Here

Examples of net.sf.katta.util.ClientConfiguration

    this(serverClass, nodeSelectionPolicy, new ZkConfiguration());
  }

  public Client(Class<? extends VersionedProtocol> serverClass, final INodeSelectionPolicy policy,
          final ZkConfiguration zkConfig) {
    this(serverClass, policy, zkConfig, new ClientConfiguration());
  }
View Full Code Here

Examples of net.sf.katta.util.ClientConfiguration

  @Test
  public void testAddRemoveIndexForSearching() throws Exception {
    InteractionProtocol protocol = mock(InteractionProtocol.class);
    Client client = new Client(ISleepServer.class, new DefaultNodeSelectionPolicy(), protocol,
            new ClientConfiguration());
    IndexMetaData indexMD = new IndexMetaData("index1", "path", 1);
    indexMD.getShards().add(new Shard("shard1", "path"));
    indexMD.getShards().add(new Shard("shard2", "path"));
    client.addIndexForSearching(indexMD);
    verify(protocol, times(2)).registerChildListener(eq(client), eq(PathDef.SHARD_TO_NODES), anyString(),
View Full Code Here

Examples of net.sf.katta.util.ClientConfiguration

  @Test
  public void testAddRemoveIndexForWatching() throws Exception {
    InteractionProtocol protocol = mock(InteractionProtocol.class);
    Client client = new Client(ISleepServer.class, new DefaultNodeSelectionPolicy(), protocol,
            new ClientConfiguration());
    IndexMetaData indexMD = new IndexMetaData("index1", "path", 1);
    indexMD.getShards().add(new Shard("shard1", "path"));
    indexMD.getShards().add(new Shard("shard2", "path"));
    client.addIndexForWatching(indexMD.getName());
    verify(protocol, times(1)).registerDataListener(eq(client), eq(PathDef.INDICES_METADATA), anyString(),
View Full Code Here

Examples of nextapp.echo2.webrender.ClientConfiguration

                }
                startGhostTask(ghostTask, 0);
            }
        }
       
        ClientConfiguration clientConfiguration = new ClientConfiguration();
        clientConfiguration.setProperty(ClientConfiguration.PROPERTY_SERVER_ERROR_MESSAGE,
                "KA-BOOM! (test non-default server error message)");
        cc.setClientConfiguration(clientConfiguration);
       
        return mainWindow;
    }
View Full Code Here

Examples of org.apache.accumulo.core.client.ClientConfiguration

    Connector conn = getConnector();
    String table = getUniqueNames(1)[0];
    conn.tableOperations().create(table);
    insertData(table, currentTimeMillis());

    ClientConfiguration clientConf = new ClientConfiguration().withInstance(conn.getInstance().getInstanceName()).withZkHosts(
        conn.getInstance().getZooKeepers());
    AccumuloConfiguration clusterClientConf = conn.getInstance().getConfiguration();

    // Pass SSL and CredentialProvider options into the ClientConfiguration given to AccumuloInputFormat
    boolean sslEnabled = Boolean.valueOf(clusterClientConf.get(Property.INSTANCE_RPC_SSL_ENABLED));
    if (sslEnabled) {
      ClientProperty[] sslProperties = new ClientProperty[] {ClientProperty.INSTANCE_RPC_SSL_ENABLED, ClientProperty.INSTANCE_RPC_SSL_CLIENT_AUTH,
          ClientProperty.RPC_SSL_KEYSTORE_PATH, ClientProperty.RPC_SSL_KEYSTORE_TYPE, ClientProperty.RPC_SSL_KEYSTORE_PASSWORD,
          ClientProperty.RPC_SSL_TRUSTSTORE_PATH, ClientProperty.RPC_SSL_TRUSTSTORE_TYPE, ClientProperty.RPC_SSL_TRUSTSTORE_PASSWORD,
          ClientProperty.RPC_USE_JSSE, ClientProperty.GENERAL_SECURITY_CREDENTIAL_PROVIDER_PATHS};

      for (ClientProperty prop : sslProperties) {
        // The default property is returned if it's not in the ClientConfiguration so we don't have to check if the value is actually defined
        clientConf.setProperty(prop, clusterClientConf.get(prop.getAccumuloProperty()));
      }
    }

    @SuppressWarnings("deprecation")
    Job job = new Job();
View Full Code Here

Examples of org.apache.accumulo.core.client.ClientConfiguration

    return instance.getConnector(user, new PasswordToken(passwd));
  }

  @Override
  public ClientConfiguration getClientConfig() {
    return new ClientConfiguration(Arrays.asList(new MapConfiguration(config.getSiteConfig()))).withInstance(this.getInstanceName()).withZkHosts(
        this.getZooKeepers());
  }
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.