Package org.apache.http.impl.conn

Examples of org.apache.http.impl.conn.AbstractPooledConnAdapter


    assert client != null;
    try {
      //Ensure client is empty
      ApacheHttpClient4Handler clientHandler = ( ( ApacheHttpClient4 ) client ).getClientHandler();
      SingleClientConnManager connectionManager = ( SingleClientConnManager ) clientHandler.getHttpClient().getConnectionManager();
      @Nullable AbstractPooledConnAdapter managedConn = ( AbstractPooledConnAdapter ) Reflection.field( "managedConn" ).ofType( Class.forName( "org.apache.http.impl.conn.SingleClientConnManager$ConnAdapter" ) ).in( connectionManager ).get();
      if ( managedConn != null ) {
        throw new IllegalStateException( "Connection not closed properly: " + managedConn.getRoute() );
      }
    } catch ( ClassNotFoundException e ) {
      throw new RuntimeException( e );
    }
  }
View Full Code Here


    assert client != null;
    try {
      //Ensure client is empty
      ApacheHttpClient4Handler clientHandler = ( ( ApacheHttpClient4 ) client ).getClientHandler();
      SingleClientConnManager connectionManager = ( SingleClientConnManager ) clientHandler.getHttpClient().getConnectionManager();
      @Nullable AbstractPooledConnAdapter managedConn = ( AbstractPooledConnAdapter ) Reflection.field( "managedConn" ).ofType( Class.forName( "org.apache.http.impl.conn.SingleClientConnManager$ConnAdapter" ) ).in( connectionManager ).get();
      if ( managedConn != null ) {
        throw new IllegalStateException( "Connection not closed properly: " + managedConn.getRoute() );
      }
    } catch ( ClassNotFoundException e ) {
      throw new RuntimeException( e );
    }
  }
View Full Code Here

    assert client != null;
    try {
      //Ensure client is empty
      ApacheHttpClient4Handler clientHandler = ( ( ApacheHttpClient4 ) client ).getClientHandler();
      SingleClientConnManager connectionManager = ( SingleClientConnManager ) clientHandler.getHttpClient().getConnectionManager();
      @Nullable AbstractPooledConnAdapter managedConn = ( AbstractPooledConnAdapter ) Reflection.field( "managedConn" ).ofType( Class.forName( "org.apache.http.impl.conn.SingleClientConnManager$ConnAdapter" ) ).in( connectionManager ).get();
      if ( managedConn != null ) {
        throw new IllegalStateException( "Connection not closed properly: " + managedConn.getRoute() );
      }
    } catch ( ClassNotFoundException e ) {
      throw new RuntimeException( e );
    }
  }
View Full Code Here

    assert client != null;
    try {
      //Ensure client is empty
      ApacheHttpClient4Handler clientHandler = ( ( ApacheHttpClient4 ) client ).getClientHandler();
      SingleClientConnManager connectionManager = ( SingleClientConnManager ) clientHandler.getHttpClient().getConnectionManager();
      @Nullable AbstractPooledConnAdapter managedConn = ( AbstractPooledConnAdapter ) Reflection.field( "managedConn" ).ofType( Class.forName( "org.apache.http.impl.conn.SingleClientConnManager$ConnAdapter" ) ).in( connectionManager ).get();
      if ( managedConn != null ) {
        throw new IllegalStateException( "Connection not closed properly: " + managedConn.getRoute() );
      }
    } catch ( ClassNotFoundException e ) {
      throw new RuntimeException( e );
    }
  }
View Full Code Here

TOP

Related Classes of org.apache.http.impl.conn.AbstractPooledConnAdapter

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.