org.apache.jmeter.protocol.http.sampler

## Class LazySchemeSocketFactory

- java.lang.Object
- - org.apache.jmeter.protocol.http.sampler.LazySchemeSocketFactory

- All Implemented Interfaces:
    org.apache.http.conn.scheme.SchemeLayeredSocketFactory, org.apache.http.conn.scheme.SchemeSocketFactory

      public final class LazySchemeSocketFactory
      extends java.lang.Object
      implements org.apache.http.conn.scheme.SchemeLayeredSocketFactory

  Lazy SchemeSocketFactory that lazily initializes HTTPS Socket Factory
  Since:
    3.0

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `LazySchemeSocketFactory()`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `java.net.Socket` | `connectSocket(java.net.Socket sock, java.net.InetSocketAddress remoteAddress, java.net.InetSocketAddress localAddress, org.apache.http.params.HttpParams params)`
    `java.net.Socket` | `createLayeredSocket(java.net.Socket socket, java.lang.String target, int port, org.apache.http.params.HttpParams params)`
    `java.net.Socket` | `createSocket(org.apache.http.params.HttpParams params)`
    `boolean` | `isSecure(java.net.Socket sock)`

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

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

- - ### Constructor Detail

    - #### LazySchemeSocketFactory

          public LazySchemeSocketFactory()

  - ### Method Detail

    - #### createSocket

          public java.net.Socket createSocket(org.apache.http.params.HttpParams params)
                                       throws java.io.IOException

      Specified by:
        `createSocket` in interface `org.apache.http.conn.scheme.SchemeSocketFactory`
      Parameters:
        `params` - `HttpParams`
      Returns:
        the socket
      Throws:
        `java.io.IOException` - when the socket creation fails
      See Also:
        `SchemeSocketFactory.createSocket(org.apache.http.params.HttpParams)`

    - #### connectSocket

          public java.net.Socket connectSocket(java.net.Socket sock,
                                               java.net.InetSocketAddress remoteAddress,
                                               java.net.InetSocketAddress localAddress,
                                               org.apache.http.params.HttpParams params)
                                        throws java.io.IOException,
                                               java.net.UnknownHostException,
                                               org.apache.http.conn.ConnectTimeoutException

      Specified by:
        `connectSocket` in interface `org.apache.http.conn.scheme.SchemeSocketFactory`
      Parameters:
        `sock` - `Socket`
        `remoteAddress` - `InetSocketAddress`
        `localAddress` - `InetSocketAddress`
        `params` - `HttpParams`
      Returns:
        the socket
      Throws:
        `java.io.IOException` - when the socket creation fails
        `java.net.UnknownHostException` - when the remote or local addresses can't be resolved
        `org.apache.http.conn.ConnectTimeoutException` - when the connection times out
      See Also:
        `SchemeSocketFactory.connectSocket(java.net.Socket, java.net.InetSocketAddress, java.net.InetSocketAddress, org.apache.http.params.HttpParams)`

    - #### isSecure

          public boolean isSecure(java.net.Socket sock)
                           throws java.lang.IllegalArgumentException

      Specified by:
        `isSecure` in interface `org.apache.http.conn.scheme.SchemeSocketFactory`
      Parameters:
        `sock` - `Socket`
      Returns:
        true if the socket is secure
      Throws:
        `java.lang.IllegalArgumentException` - when the socket is not valid
      See Also:
        `SchemeSocketFactory.isSecure(java.net.Socket)`

    - #### createLayeredSocket

          public java.net.Socket createLayeredSocket(java.net.Socket socket,
                                                     java.lang.String target,
                                                     int port,
                                                     org.apache.http.params.HttpParams params)
                                              throws java.io.IOException,
                                                     java.net.UnknownHostException

      Specified by:
        `createLayeredSocket` in interface `org.apache.http.conn.scheme.SchemeLayeredSocketFactory`
      Parameters:
        `socket` - `Socket`
        `target` - `String`
        `port` - int port of socket
        `params` - `HttpParams`
      Returns:
        the socket
      Throws:
        `java.io.IOException`
        `java.net.UnknownHostException`

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