hc-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Gary Gregory (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (HTTPCORE-460) Add factory methods to DefaultHttpClientIODispatch to handle a null SSLContext
Date Thu, 04 May 2017 18:46:04 GMT

     [ https://issues.apache.org/jira/browse/HTTPCORE-460?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Gary Gregory updated HTTPCORE-460:
----------------------------------
    Description: 
Add factory methods to {{DefaultHttpClientIODispatch}} to handle a null {{SSLContext}}:

{code:java}
    /**
     * Creates a new instance of this class to be used for dispatching I/O event
     * notifications to the given protocol handler.
     *
     * @param handler the client protocol handler.
     * @param sslContext an SSLContext or null (for a plain text connection.)
     * @param config a connection configuration
     * @return a new instance
     * @since 4.4.7
     */
    public static DefaultHttpClientIODispatch create(final NHttpClientEventHandler handler,
            final SSLContext sslContext,
            final ConnectionConfig config) {
        return sslContext == null ? new DefaultHttpClientIODispatch(handler, config)
                : new DefaultHttpClientIODispatch(handler, sslContext, config);
    }
    
    /**
     * Creates a new instance of this class to be used for dispatching I/O event
     * notifications to the given protocol handler.
     *
     * @param handler the client protocol handler.
     * @param sslContext an SSLContext or null (for a plain text connection.)
     * @param sslHandler customizes various aspects of the TLS/SSL protocol.
     * @param config a connection configuration
     * @return a new instance
     * @since 4.4.7
     */
    public static DefaultHttpClientIODispatch create(final NHttpClientEventHandler handler,
            final SSLContext sslContext,
            final SSLSetupHandler sslHandler,
            final ConnectionConfig config) {
        return sslContext == null ? new DefaultHttpClientIODispatch(handler, config)
                : new DefaultHttpClientIODispatch(handler, sslContext, sslHandler, config);
    }
{code}

  was:
Add factory methods to {{DefaultHttpClientIODispatch}} to handle a null {{SSLContext}}:

{code:java}
    /**
     * Creates a new instance of this class to be used for dispatching I/O event
     * notifications to the given protocol handler.
     *
     * @param handler the client protocol handler.
     * @param sslContext an SSLContext or null for a plain text connection.
     * @param config a connection configuration
     * @return a new instance
     * @since 4.4.7
     */
    public static DefaultHttpClientIODispatch create(final NHttpClientEventHandler handler,
            final SSLContext sslContext,
            final ConnectionConfig config) {
        return sslContext == null ? new DefaultHttpClientIODispatch(handler, config)
                : new DefaultHttpClientIODispatch(handler, sslContext, config);
    }
    
    /**
     * Creates a new instance of this class to be used for dispatching I/O event
     * notifications to the given protocol handler.
     *
     * @param handler the client protocol handler.
     * @param sslContext an SSLContext or null for a plain text connection.
     * @param sslHandler customizes various aspects of the TLS/SSL protocol.
     * @param config a connection configuration
     * @return a new instance
     * @since 4.4.7
     */
    public static DefaultHttpClientIODispatch create(final NHttpClientEventHandler handler,
            final SSLContext sslContext,
            final SSLSetupHandler sslHandler,
            final ConnectionConfig config) {
        return sslContext == null ? new DefaultHttpClientIODispatch(handler, config)
                : new DefaultHttpClientIODispatch(handler, sslContext, sslHandler, config);
    }
{code}


> Add factory methods to DefaultHttpClientIODispatch to handle a null SSLContext
> ------------------------------------------------------------------------------
>
>                 Key: HTTPCORE-460
>                 URL: https://issues.apache.org/jira/browse/HTTPCORE-460
>             Project: HttpComponents HttpCore
>          Issue Type: Improvement
>            Reporter: Gary Gregory
>            Assignee: Gary Gregory
>             Fix For: 4.4.7
>
>
> Add factory methods to {{DefaultHttpClientIODispatch}} to handle a null {{SSLContext}}:
> {code:java}
>     /**
>      * Creates a new instance of this class to be used for dispatching I/O event
>      * notifications to the given protocol handler.
>      *
>      * @param handler the client protocol handler.
>      * @param sslContext an SSLContext or null (for a plain text connection.)
>      * @param config a connection configuration
>      * @return a new instance
>      * @since 4.4.7
>      */
>     public static DefaultHttpClientIODispatch create(final NHttpClientEventHandler handler,
>             final SSLContext sslContext,
>             final ConnectionConfig config) {
>         return sslContext == null ? new DefaultHttpClientIODispatch(handler, config)
>                 : new DefaultHttpClientIODispatch(handler, sslContext, config);
>     }
>     
>     /**
>      * Creates a new instance of this class to be used for dispatching I/O event
>      * notifications to the given protocol handler.
>      *
>      * @param handler the client protocol handler.
>      * @param sslContext an SSLContext or null (for a plain text connection.)
>      * @param sslHandler customizes various aspects of the TLS/SSL protocol.
>      * @param config a connection configuration
>      * @return a new instance
>      * @since 4.4.7
>      */
>     public static DefaultHttpClientIODispatch create(final NHttpClientEventHandler handler,
>             final SSLContext sslContext,
>             final SSLSetupHandler sslHandler,
>             final ConnectionConfig config) {
>         return sslContext == null ? new DefaultHttpClientIODispatch(handler, config)
>                 : new DefaultHttpClientIODispatch(handler, sslContext, sslHandler, config);
>     }
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@hc.apache.org
For additional commands, e-mail: dev-help@hc.apache.org


Mime
View raw message