Package org.openrdf.http.client.connections

Examples of org.openrdf.http.client.connections.HTTPConnectionPool


    try {
      request.sendForm(getQueryParams(ql, query, baseURI));
      execute(request);
      String url = request.readLocation();
      String type = request.readQueryType();
      HTTPConnectionPool location = pool.location(url);
      if (Protocol.GRAPH_QUERY.equals(type)) {
        return new GraphQueryClient(location);
      }
      if (Protocol.BOOLEAN_QUERY.equals(type)) {
        return new BooleanQueryClient(location);
View Full Code Here


   * Constructors *
   *--------------*/

  public HTTPRepository(String serverURL, String repositoryID) {
    ValueFactory vf = new ValueFactoryImpl(new BNodeFactoryImpl(), uf, lf);
    pool = new HTTPConnectionPool(serverURL, vf);
    client = new SesameClient(pool).repositories().slash(repositoryID);
    cache = new RepositoryCache(client);
  }
View Full Code Here

  public HTTPRepository(String repositoryURL) {
    ValueFactory vf = new ValueFactoryImpl(new BNodeFactoryImpl(), uf, lf);
    String serverURL = Protocol.getServerLocation(repositoryURL);
    if (serverURL != null) {
      pool = new HTTPConnectionPool(serverURL, vf).location(repositoryURL);
    }
    else {
      pool = new HTTPConnectionPool(repositoryURL, vf);
    }
    client = new RepositoryClient(pool);
    cache = new RepositoryCache(client);
  }
View Full Code Here

  }

  private boolean connectRemote(String url) {
    try {
      // Ping server
      HTTPConnectionPool pool = new HTTPConnectionPool(url);
      try {
        new SesameClient(pool).protocol().get();
      }
      finally {
        pool.shutdown();
      }

      return installNewManager(new RemoteRepositoryManager(url), url);
    }
    catch (UnauthorizedException e) {
View Full Code Here

  /**
   * Initializes the repository manager.
   */
  @Override
  public void initialize() {
    pool = new HTTPConnectionPool(serverURL);
    pool.setUsernameAndPassword(username, password);
    client = new SesameClient(pool);
    setConfigTemplateManager(new RemoteTemplateManager(client));
    setRepositoryConfigManager(new RemoteConfigManager(client));
  }
View Full Code Here

TOP

Related Classes of org.openrdf.http.client.connections.HTTPConnectionPool

Copyright © 2018 www.massapicom. 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.