org.apache.jmeter.protocol.http.sampler.hc

## Class ManagedClientConnectionImpl

- java.lang.Object
- - org.apache.jmeter.protocol.http.sampler.hc.ManagedClientConnectionImpl

- All Implemented Interfaces:
    java.io.Closeable, java.lang.AutoCloseable, org.apache.http.conn.ConnectionReleaseTrigger, org.apache.http.conn.HttpRoutedConnection, org.apache.http.conn.ManagedClientConnection, org.apache.http.conn.ManagedHttpClientConnection, org.apache.http.HttpClientConnection, org.apache.http.HttpConnection, org.apache.http.HttpInetConnection

      public class ManagedClientConnectionImpl
      extends java.lang.Object
      implements org.apache.http.conn.ManagedClientConnection

  Implementation of `ManagedClientConnection`
  Since:
    3.2

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `ManagedClientConnectionImpl(org.apache.http.conn.ClientConnectionManager manager, org.apache.http.conn.ClientConnectionOperator operator, HttpPoolEntry entry)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `abortConnection()`
    `void` | `bind(java.net.Socket socket)`
    `void` | `close()`
    `HttpPoolEntry` | `detach()`
    `void` | `flush()`
    `java.lang.Object` | `getAttribute(java.lang.String id)`
    `java.lang.String` | `getId()`
    `java.net.InetAddress` | `getLocalAddress()`
    `int` | `getLocalPort()`
    `org.apache.http.conn.ClientConnectionManager` | `getManager()`
    `org.apache.http.HttpConnectionMetrics` | `getMetrics()`
    `java.net.InetAddress` | `getRemoteAddress()`
    `int` | `getRemotePort()`
    `org.apache.http.conn.routing.HttpRoute` | `getRoute()`
    `java.net.Socket` | `getSocket()`
    `int` | `getSocketTimeout()`
    `javax.net.ssl.SSLSession` | `getSSLSession()`
    `java.lang.Object` | `getState()`
    `boolean` | `isMarkedReusable()`
    `boolean` | `isOpen()`
    `boolean` | `isResponseAvailable(int timeout)`
    `boolean` | `isSecure()`
    `boolean` | `isStale()`
    `void` | `layerProtocol(org.apache.http.protocol.HttpContext context, org.apache.http.params.HttpParams params)`
    `void` | `markReusable()`
    `void` | `open(org.apache.http.conn.routing.HttpRoute route, org.apache.http.protocol.HttpContext context, org.apache.http.params.HttpParams params)`
    `void` | `receiveResponseEntity(org.apache.http.HttpResponse response)`
    `org.apache.http.HttpResponse` | `receiveResponseHeader()`
    `void` | `releaseConnection()`
    `java.lang.Object` | `removeAttribute(java.lang.String id)`
    `void` | `sendRequestEntity(org.apache.http.HttpEntityEnclosingRequest request)`
    `void` | `sendRequestHeader(org.apache.http.HttpRequest request)`
    `void` | `setAttribute(java.lang.String id, java.lang.Object obj)`
    `void` | `setIdleDuration(long duration, java.util.concurrent.TimeUnit unit)`
    `void` | `setSocketTimeout(int timeout)`
    `void` | `setState(java.lang.Object state)`
    `void` | `shutdown()`
    `void` | `tunnelProxy(org.apache.http.HttpHost next, boolean secure, org.apache.http.params.HttpParams params)`
    `void` | `tunnelTarget(boolean secure, org.apache.http.params.HttpParams params)`
    `void` | `unmarkReusable()`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### ManagedClientConnectionImpl

          public ManagedClientConnectionImpl(org.apache.http.conn.ClientConnectionManager manager,
                                             org.apache.http.conn.ClientConnectionOperator operator,
                                             HttpPoolEntry entry)

  - ### Method Detail

    - #### getId

          public java.lang.String getId()

      Specified by:
        `getId` in interface `org.apache.http.conn.ManagedHttpClientConnection`

    - #### detach

          public HttpPoolEntry detach()

    - #### getManager

          public org.apache.http.conn.ClientConnectionManager getManager()

    - #### close

          public void close()
                     throws java.io.IOException

      Specified by:
        `close` in interface `java.io.Closeable`
      Specified by:
        `close` in interface `java.lang.AutoCloseable`
      Specified by:
        `close` in interface `org.apache.http.HttpConnection`
      Throws:
        `java.io.IOException`

    - #### shutdown

          public void shutdown()
                        throws java.io.IOException

      Specified by:
        `shutdown` in interface `org.apache.http.HttpConnection`
      Throws:
        `java.io.IOException`

    - #### isOpen

          public boolean isOpen()

      Specified by:
        `isOpen` in interface `org.apache.http.HttpConnection`

    - #### isStale

          public boolean isStale()

      Specified by:
        `isStale` in interface `org.apache.http.HttpConnection`

    - #### setSocketTimeout

          public void setSocketTimeout(int timeout)

      Specified by:
        `setSocketTimeout` in interface `org.apache.http.HttpConnection`

    - #### getSocketTimeout

          public int getSocketTimeout()

      Specified by:
        `getSocketTimeout` in interface `org.apache.http.HttpConnection`

    - #### getMetrics

          public org.apache.http.HttpConnectionMetrics getMetrics()

      Specified by:
        `getMetrics` in interface `org.apache.http.HttpConnection`

    - #### flush

          public void flush()
                     throws java.io.IOException

      Specified by:
        `flush` in interface `org.apache.http.HttpClientConnection`
      Throws:
        `java.io.IOException`

    - #### isResponseAvailable

          public boolean isResponseAvailable(int timeout)
                                      throws java.io.IOException

      Specified by:
        `isResponseAvailable` in interface `org.apache.http.HttpClientConnection`
      Throws:
        `java.io.IOException`

    - #### receiveResponseEntity

          public void receiveResponseEntity(org.apache.http.HttpResponse response)
                                     throws org.apache.http.HttpException,
                                            java.io.IOException

      Specified by:
        `receiveResponseEntity` in interface `org.apache.http.HttpClientConnection`
      Throws:
        `org.apache.http.HttpException`
        `java.io.IOException`

    - #### receiveResponseHeader

          public org.apache.http.HttpResponse receiveResponseHeader()
                                                             throws org.apache.http.HttpException,
                                                                    java.io.IOException

      Specified by:
        `receiveResponseHeader` in interface `org.apache.http.HttpClientConnection`
      Throws:
        `org.apache.http.HttpException`
        `java.io.IOException`

    - #### sendRequestEntity

          public void sendRequestEntity(org.apache.http.HttpEntityEnclosingRequest request)
                                 throws org.apache.http.HttpException,
                                        java.io.IOException

      Specified by:
        `sendRequestEntity` in interface `org.apache.http.HttpClientConnection`
      Throws:
        `org.apache.http.HttpException`
        `java.io.IOException`

    - #### sendRequestHeader

          public void sendRequestHeader(org.apache.http.HttpRequest request)
                                 throws org.apache.http.HttpException,
                                        java.io.IOException

      Specified by:
        `sendRequestHeader` in interface `org.apache.http.HttpClientConnection`
      Throws:
        `org.apache.http.HttpException`
        `java.io.IOException`

    - #### getLocalAddress

          public java.net.InetAddress getLocalAddress()

      Specified by:
        `getLocalAddress` in interface `org.apache.http.HttpInetConnection`

    - #### getLocalPort

          public int getLocalPort()

      Specified by:
        `getLocalPort` in interface `org.apache.http.HttpInetConnection`

    - #### getRemoteAddress

          public java.net.InetAddress getRemoteAddress()

      Specified by:
        `getRemoteAddress` in interface `org.apache.http.HttpInetConnection`

    - #### getRemotePort

          public int getRemotePort()

      Specified by:
        `getRemotePort` in interface `org.apache.http.HttpInetConnection`

    - #### isSecure

          public boolean isSecure()

      Specified by:
        `isSecure` in interface `org.apache.http.conn.HttpRoutedConnection`
      Specified by:
        `isSecure` in interface `org.apache.http.conn.ManagedClientConnection`

    - #### bind

          public void bind(java.net.Socket socket)
                    throws java.io.IOException

      Specified by:
        `bind` in interface `org.apache.http.conn.ManagedHttpClientConnection`
      Throws:
        `java.io.IOException`

    - #### getSocket

          public java.net.Socket getSocket()

      Specified by:
        `getSocket` in interface `org.apache.http.conn.ManagedHttpClientConnection`

    - #### getSSLSession

          public javax.net.ssl.SSLSession getSSLSession()

      Specified by:
        `getSSLSession` in interface `org.apache.http.conn.HttpRoutedConnection`
      Specified by:
        `getSSLSession` in interface `org.apache.http.conn.ManagedClientConnection`
      Specified by:
        `getSSLSession` in interface `org.apache.http.conn.ManagedHttpClientConnection`

    - #### getAttribute

          public java.lang.Object getAttribute(java.lang.String id)

    - #### removeAttribute

          public java.lang.Object removeAttribute(java.lang.String id)

    - #### setAttribute

          public void setAttribute(java.lang.String id,
                                   java.lang.Object obj)

    - #### getRoute

          public org.apache.http.conn.routing.HttpRoute getRoute()

      Specified by:
        `getRoute` in interface `org.apache.http.conn.HttpRoutedConnection`
      Specified by:
        `getRoute` in interface `org.apache.http.conn.ManagedClientConnection`

    - #### open

          public void open(org.apache.http.conn.routing.HttpRoute route,
                           org.apache.http.protocol.HttpContext context,
                           org.apache.http.params.HttpParams params)
                    throws java.io.IOException

      Specified by:
        `open` in interface `org.apache.http.conn.ManagedClientConnection`
      Throws:
        `java.io.IOException`

    - #### tunnelTarget

          public void tunnelTarget(boolean secure,
                                   org.apache.http.params.HttpParams params)
                            throws java.io.IOException

      Specified by:
        `tunnelTarget` in interface `org.apache.http.conn.ManagedClientConnection`
      Throws:
        `java.io.IOException`

    - #### tunnelProxy

          public void tunnelProxy(org.apache.http.HttpHost next,
                                  boolean secure,
                                  org.apache.http.params.HttpParams params)
                           throws java.io.IOException

      Specified by:
        `tunnelProxy` in interface `org.apache.http.conn.ManagedClientConnection`
      Throws:
        `java.io.IOException`

    - #### layerProtocol

          public void layerProtocol(org.apache.http.protocol.HttpContext context,
                                    org.apache.http.params.HttpParams params)
                             throws java.io.IOException

      Specified by:
        `layerProtocol` in interface `org.apache.http.conn.ManagedClientConnection`
      Throws:
        `java.io.IOException`

    - #### getState

          public java.lang.Object getState()

      Specified by:
        `getState` in interface `org.apache.http.conn.ManagedClientConnection`

    - #### setState

          public void setState(java.lang.Object state)

      Specified by:
        `setState` in interface `org.apache.http.conn.ManagedClientConnection`

    - #### markReusable

          public void markReusable()

      Specified by:
        `markReusable` in interface `org.apache.http.conn.ManagedClientConnection`

    - #### unmarkReusable

          public void unmarkReusable()

      Specified by:
        `unmarkReusable` in interface `org.apache.http.conn.ManagedClientConnection`

    - #### isMarkedReusable

          public boolean isMarkedReusable()

      Specified by:
        `isMarkedReusable` in interface `org.apache.http.conn.ManagedClientConnection`

    - #### setIdleDuration

          public void setIdleDuration(long duration,
                                      java.util.concurrent.TimeUnit unit)

      Specified by:
        `setIdleDuration` in interface `org.apache.http.conn.ManagedClientConnection`

    - #### releaseConnection

          public void releaseConnection()

      Specified by:
        `releaseConnection` in interface `org.apache.http.conn.ConnectionReleaseTrigger`

    - #### abortConnection

          public void abortConnection()

      Specified by:
        `abortConnection` in interface `org.apache.http.conn.ConnectionReleaseTrigger`

Copyright © 1998-2018 Apache Software Foundation. All Rights Reserved.