You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hc.apache.org by ol...@apache.org on 2010/02/19 15:14:32 UTC
svn commit: r911817 - in /httpcomponents/httpcore/trunk/httpcore-nio/src:
examples/org/apache/http/examples/nio/ main/java/org/apache/http/impl/nio/
main/java/org/apache/http/impl/nio/reactor/
main/java/org/apache/http/impl/nio/ssl/ test/java/org/apach...
Author: olegk
Date: Fri Feb 19 14:14:31 2010
New Revision: 911817
URL: http://svn.apache.org/viewvc?rev=911817&view=rev
Log:
HTTPCORE-217: Replaced extended SSLIOSessionHandlerExt interface with a new interface
Added:
httpcomponents/httpcore/trunk/httpcore-nio/src/main/java/org/apache/http/impl/nio/reactor/SSLIOSessionHandlerAdaptor.java (with props)
httpcomponents/httpcore/trunk/httpcore-nio/src/main/java/org/apache/http/impl/nio/reactor/SSLSetupHandler.java (with props)
httpcomponents/httpcore/trunk/httpcore-nio/src/main/java/org/apache/http/impl/nio/ssl/
httpcomponents/httpcore/trunk/httpcore-nio/src/main/java/org/apache/http/impl/nio/ssl/SSLClientIOEventDispatch.java
- copied, changed from r910320, httpcomponents/httpcore/trunk/httpcore-nio/src/main/java/org/apache/http/impl/nio/SSLClientIOEventDispatch.java
httpcomponents/httpcore/trunk/httpcore-nio/src/main/java/org/apache/http/impl/nio/ssl/SSLServerIOEventDispatch.java
- copied, changed from r910320, httpcomponents/httpcore/trunk/httpcore-nio/src/main/java/org/apache/http/impl/nio/SSLServerIOEventDispatch.java
Removed:
httpcomponents/httpcore/trunk/httpcore-nio/src/main/java/org/apache/http/impl/nio/reactor/SSLIOSessionHandlerExt.java
Modified:
httpcomponents/httpcore/trunk/httpcore-nio/src/examples/org/apache/http/examples/nio/NHttpSSLClient.java
httpcomponents/httpcore/trunk/httpcore-nio/src/examples/org/apache/http/examples/nio/NHttpSSLServer.java
httpcomponents/httpcore/trunk/httpcore-nio/src/main/java/org/apache/http/impl/nio/SSLClientIOEventDispatch.java
httpcomponents/httpcore/trunk/httpcore-nio/src/main/java/org/apache/http/impl/nio/SSLServerIOEventDispatch.java
httpcomponents/httpcore/trunk/httpcore-nio/src/main/java/org/apache/http/impl/nio/reactor/SSLIOSession.java
httpcomponents/httpcore/trunk/httpcore-nio/src/main/java/org/apache/http/impl/nio/reactor/SSLIOSessionHandler.java
httpcomponents/httpcore/trunk/httpcore-nio/src/test/java/org/apache/http/mockup/TestHttpSSLClient.java
httpcomponents/httpcore/trunk/httpcore-nio/src/test/java/org/apache/http/mockup/TestHttpSSLServer.java
Modified: httpcomponents/httpcore/trunk/httpcore-nio/src/examples/org/apache/http/examples/nio/NHttpSSLClient.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpcore/trunk/httpcore-nio/src/examples/org/apache/http/examples/nio/NHttpSSLClient.java?rev=911817&r1=911816&r2=911817&view=diff
==============================================================================
--- httpcomponents/httpcore/trunk/httpcore-nio/src/examples/org/apache/http/examples/nio/NHttpSSLClient.java (original)
+++ httpcomponents/httpcore/trunk/httpcore-nio/src/examples/org/apache/http/examples/nio/NHttpSSLClient.java Fri Feb 19 14:14:31 2010
@@ -40,8 +40,8 @@
import org.apache.http.HttpRequestInterceptor;
import org.apache.http.HttpResponse;
import org.apache.http.impl.DefaultConnectionReuseStrategy;
-import org.apache.http.impl.nio.SSLClientIOEventDispatch;
import org.apache.http.impl.nio.reactor.DefaultConnectingIOReactor;
+import org.apache.http.impl.nio.ssl.SSLClientIOEventDispatch;
import org.apache.http.message.BasicHttpRequest;
import org.apache.http.nio.NHttpConnection;
import org.apache.http.nio.protocol.BufferingHttpClientHandler;
Modified: httpcomponents/httpcore/trunk/httpcore-nio/src/examples/org/apache/http/examples/nio/NHttpSSLServer.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpcore/trunk/httpcore-nio/src/examples/org/apache/http/examples/nio/NHttpSSLServer.java?rev=911817&r1=911816&r2=911817&view=diff
==============================================================================
--- httpcomponents/httpcore/trunk/httpcore-nio/src/examples/org/apache/http/examples/nio/NHttpSSLServer.java (original)
+++ httpcomponents/httpcore/trunk/httpcore-nio/src/examples/org/apache/http/examples/nio/NHttpSSLServer.java Fri Feb 19 14:14:31 2010
@@ -55,8 +55,8 @@
import org.apache.http.entity.FileEntity;
import org.apache.http.impl.DefaultConnectionReuseStrategy;
import org.apache.http.impl.DefaultHttpResponseFactory;
-import org.apache.http.impl.nio.SSLServerIOEventDispatch;
import org.apache.http.impl.nio.reactor.DefaultListeningIOReactor;
+import org.apache.http.impl.nio.ssl.SSLServerIOEventDispatch;
import org.apache.http.nio.NHttpConnection;
import org.apache.http.nio.protocol.EventListener;
import org.apache.http.nio.protocol.BufferingHttpServiceHandler;
Modified: httpcomponents/httpcore/trunk/httpcore-nio/src/main/java/org/apache/http/impl/nio/SSLClientIOEventDispatch.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpcore/trunk/httpcore-nio/src/main/java/org/apache/http/impl/nio/SSLClientIOEventDispatch.java?rev=911817&r1=911816&r2=911817&view=diff
==============================================================================
--- httpcomponents/httpcore/trunk/httpcore-nio/src/main/java/org/apache/http/impl/nio/SSLClientIOEventDispatch.java (original)
+++ httpcomponents/httpcore/trunk/httpcore-nio/src/main/java/org/apache/http/impl/nio/SSLClientIOEventDispatch.java Fri Feb 19 14:14:31 2010
@@ -61,7 +61,10 @@
* </ul>
*
* @since 4.0
+ *
+ * @deprecated use {@link org.apache.http.impl.nio.ssl.SSLClientIOEventDispatch}
*/
+@Deprecated
public class SSLClientIOEventDispatch implements IOEventDispatch {
private static final String SSL_SESSION = "SSL_SESSION";
Modified: httpcomponents/httpcore/trunk/httpcore-nio/src/main/java/org/apache/http/impl/nio/SSLServerIOEventDispatch.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpcore/trunk/httpcore-nio/src/main/java/org/apache/http/impl/nio/SSLServerIOEventDispatch.java?rev=911817&r1=911816&r2=911817&view=diff
==============================================================================
--- httpcomponents/httpcore/trunk/httpcore-nio/src/main/java/org/apache/http/impl/nio/SSLServerIOEventDispatch.java (original)
+++ httpcomponents/httpcore/trunk/httpcore-nio/src/main/java/org/apache/http/impl/nio/SSLServerIOEventDispatch.java Fri Feb 19 14:14:31 2010
@@ -61,7 +61,10 @@
* </ul>
*
* @since 4.0
+ *
+ * @deprecated use {@link org.apache.http.impl.nio.ssl.SSLServerIOEventDispatch}
*/
+@Deprecated
public class SSLServerIOEventDispatch implements IOEventDispatch {
private static final String SSL_SESSION = "SSL_SESSION";
Modified: httpcomponents/httpcore/trunk/httpcore-nio/src/main/java/org/apache/http/impl/nio/reactor/SSLIOSession.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpcore/trunk/httpcore-nio/src/main/java/org/apache/http/impl/nio/reactor/SSLIOSession.java?rev=911817&r1=911816&r2=911817&view=diff
==============================================================================
--- httpcomponents/httpcore/trunk/httpcore-nio/src/main/java/org/apache/http/impl/nio/reactor/SSLIOSession.java (original)
+++ httpcomponents/httpcore/trunk/httpcore-nio/src/main/java/org/apache/http/impl/nio/reactor/SSLIOSession.java Fri Feb 19 14:14:31 2010
@@ -60,7 +60,7 @@
private final ByteBuffer inPlain;
private final ByteBuffer outPlain;
private final InternalByteChannel channel;
- private final SSLIOSessionHandler handler;
+ private final SSLSetupHandler handler;
private int appEventMask;
private SessionBufferStatus appBufferStatus;
@@ -68,10 +68,13 @@
private boolean endOfStream;
private volatile int status;
+ /**
+ * @since 4.1
+ */
public SSLIOSession(
final IOSession session,
final SSLContext sslContext,
- final SSLIOSessionHandler handler) {
+ final SSLSetupHandler handler) {
super();
if (session == null) {
throw new IllegalArgumentException("IO session may not be null");
@@ -107,6 +110,19 @@
this.outPlain = ByteBuffer.allocate(appBuffersize);
}
+ /**
+ * @since 4.1
+ *
+ * @deprecated
+ */
+ @Deprecated
+ public SSLIOSession(
+ final IOSession session,
+ final SSLContext sslContext,
+ final SSLIOSessionHandler handler) {
+ this(session, sslContext, handler != null ? new SSLIOSessionHandlerAdaptor(handler) : null);
+ }
+
public synchronized void bind(
final SSLMode mode,
final HttpParams params) throws SSLException {
@@ -178,16 +194,7 @@
// It is never generated by SSLEngine.getHandshakeStatus().
if (result != null && result.getHandshakeStatus() == HandshakeStatus.FINISHED) {
if (this.handler != null) {
- if (this.handler instanceof SSLIOSessionHandlerExt) {
- ((SSLIOSessionHandlerExt) this.handler).verify(
- this.session.getRemoteAddress(),
- this.sslEngine.getSession(),
- this.session);
- } else {
- this.handler.verify(
- this.session.getRemoteAddress(),
- this.sslEngine.getSession());
- }
+ this.handler.verify(this.session, this.sslEngine.getSession());
}
}
}
Modified: httpcomponents/httpcore/trunk/httpcore-nio/src/main/java/org/apache/http/impl/nio/reactor/SSLIOSessionHandler.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpcore/trunk/httpcore-nio/src/main/java/org/apache/http/impl/nio/reactor/SSLIOSessionHandler.java?rev=911817&r1=911816&r2=911817&view=diff
==============================================================================
--- httpcomponents/httpcore/trunk/httpcore-nio/src/main/java/org/apache/http/impl/nio/reactor/SSLIOSessionHandler.java (original)
+++ httpcomponents/httpcore/trunk/httpcore-nio/src/main/java/org/apache/http/impl/nio/reactor/SSLIOSessionHandler.java Fri Feb 19 14:14:31 2010
@@ -40,7 +40,10 @@
* the TLS/SSl protocol.
*
* @since 4.0
+ *
+ * @deprecated Use {@link SSLSetupHandler}
*/
+@Deprecated
public interface SSLIOSessionHandler {
/**
Added: httpcomponents/httpcore/trunk/httpcore-nio/src/main/java/org/apache/http/impl/nio/reactor/SSLIOSessionHandlerAdaptor.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpcore/trunk/httpcore-nio/src/main/java/org/apache/http/impl/nio/reactor/SSLIOSessionHandlerAdaptor.java?rev=911817&view=auto
==============================================================================
--- httpcomponents/httpcore/trunk/httpcore-nio/src/main/java/org/apache/http/impl/nio/reactor/SSLIOSessionHandlerAdaptor.java (added)
+++ httpcomponents/httpcore/trunk/httpcore-nio/src/main/java/org/apache/http/impl/nio/reactor/SSLIOSessionHandlerAdaptor.java Fri Feb 19 14:14:31 2010
@@ -0,0 +1,55 @@
+/*
+ * ====================================================================
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ * ====================================================================
+ *
+ * This software consists of voluntary contributions made by many
+ * individuals on behalf of the Apache Software Foundation. For more
+ * information on the Apache Software Foundation, please see
+ * <http://www.apache.org/>.
+ *
+ */
+
+package org.apache.http.impl.nio.reactor;
+
+import javax.net.ssl.SSLEngine;
+import javax.net.ssl.SSLException;
+import javax.net.ssl.SSLSession;
+
+import org.apache.http.nio.reactor.IOSession;
+import org.apache.http.params.HttpParams;
+
+@Deprecated
+class SSLIOSessionHandlerAdaptor implements SSLSetupHandler {
+
+ private final SSLIOSessionHandler handler;
+
+ public SSLIOSessionHandlerAdaptor(final SSLIOSessionHandler handler) {
+ super();
+ this.handler = handler;
+ }
+
+ public void initalize(final SSLEngine sslengine, final HttpParams params) throws SSLException {
+ this.handler.initalize(sslengine, params);
+ }
+
+ public void verify(final IOSession iosession, final SSLSession sslsession) throws SSLException {
+ this.handler.verify(iosession.getRemoteAddress(), sslsession);
+ }
+
+}
Propchange: httpcomponents/httpcore/trunk/httpcore-nio/src/main/java/org/apache/http/impl/nio/reactor/SSLIOSessionHandlerAdaptor.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: httpcomponents/httpcore/trunk/httpcore-nio/src/main/java/org/apache/http/impl/nio/reactor/SSLIOSessionHandlerAdaptor.java
------------------------------------------------------------------------------
svn:keywords = Rev Date
Added: httpcomponents/httpcore/trunk/httpcore-nio/src/main/java/org/apache/http/impl/nio/reactor/SSLSetupHandler.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpcore/trunk/httpcore-nio/src/main/java/org/apache/http/impl/nio/reactor/SSLSetupHandler.java?rev=911817&view=auto
==============================================================================
--- httpcomponents/httpcore/trunk/httpcore-nio/src/main/java/org/apache/http/impl/nio/reactor/SSLSetupHandler.java (added)
+++ httpcomponents/httpcore/trunk/httpcore-nio/src/main/java/org/apache/http/impl/nio/reactor/SSLSetupHandler.java Fri Feb 19 14:14:31 2010
@@ -0,0 +1,71 @@
+/*
+ * ====================================================================
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ * ====================================================================
+ *
+ * This software consists of voluntary contributions made by many
+ * individuals on behalf of the Apache Software Foundation. For more
+ * information on the Apache Software Foundation, please see
+ * <http://www.apache.org/>.
+ *
+ */
+
+package org.apache.http.impl.nio.reactor;
+
+import javax.net.ssl.SSLEngine;
+import javax.net.ssl.SSLException;
+import javax.net.ssl.SSLSession;
+
+import org.apache.http.nio.reactor.IOSession;
+import org.apache.http.params.HttpParams;
+
+/**
+ * Callback interface that can be used to customize various aspects of
+ * the TLS/SSl protocol.
+ *
+ * @since 4.1
+ */
+public interface SSLSetupHandler {
+
+ /**
+ * Triggered when the SSL connection is being initialized. Custom handlers
+ * can use this callback to customize properties of the {@link SSLEngine}
+ * used to establish the SSL session.
+ *
+ * @param sslengine the SSL engine.
+ * @param params HTTP parameters.
+ * @throws SSLException if case of SSL protocol error.
+ */
+ void initalize(SSLEngine sslengine, HttpParams params)
+ throws SSLException;
+
+ /**
+ * Triggered when the SSL connection has been established and initial SSL
+ * handshake has been successfully completed. Custom handlers can use
+ * this callback to verify properties of the {@link SSLSession}.
+ * For instance this would be the right place to enforce SSL cipher
+ * strength, validate certificate chain and do hostname checks.
+ *
+ * @param iosession the underlying IOSession for the SSL connection.
+ * @param sslsession newly created SSL session.
+ * @throws SSLException if case of SSL protocol error.
+ */
+ void verify(IOSession iosession, SSLSession sslsession)
+ throws SSLException;
+
+}
Propchange: httpcomponents/httpcore/trunk/httpcore-nio/src/main/java/org/apache/http/impl/nio/reactor/SSLSetupHandler.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: httpcomponents/httpcore/trunk/httpcore-nio/src/main/java/org/apache/http/impl/nio/reactor/SSLSetupHandler.java
------------------------------------------------------------------------------
svn:keywords = Rev Date
Copied: httpcomponents/httpcore/trunk/httpcore-nio/src/main/java/org/apache/http/impl/nio/ssl/SSLClientIOEventDispatch.java (from r910320, httpcomponents/httpcore/trunk/httpcore-nio/src/main/java/org/apache/http/impl/nio/SSLClientIOEventDispatch.java)
URL: http://svn.apache.org/viewvc/httpcomponents/httpcore/trunk/httpcore-nio/src/main/java/org/apache/http/impl/nio/ssl/SSLClientIOEventDispatch.java?p2=httpcomponents/httpcore/trunk/httpcore-nio/src/main/java/org/apache/http/impl/nio/ssl/SSLClientIOEventDispatch.java&p1=httpcomponents/httpcore/trunk/httpcore-nio/src/main/java/org/apache/http/impl/nio/SSLClientIOEventDispatch.java&r1=910320&r2=911817&rev=911817&view=diff
==============================================================================
--- httpcomponents/httpcore/trunk/httpcore-nio/src/main/java/org/apache/http/impl/nio/SSLClientIOEventDispatch.java (original)
+++ httpcomponents/httpcore/trunk/httpcore-nio/src/main/java/org/apache/http/impl/nio/ssl/SSLClientIOEventDispatch.java Fri Feb 19 14:14:31 2010
@@ -25,7 +25,7 @@
*
*/
-package org.apache.http.impl.nio;
+package org.apache.http.impl.nio.ssl;
import java.io.IOException;
@@ -35,9 +35,10 @@
import org.apache.http.HttpResponse;
import org.apache.http.HttpResponseFactory;
import org.apache.http.impl.DefaultHttpResponseFactory;
+import org.apache.http.impl.nio.DefaultNHttpClientConnection;
import org.apache.http.impl.nio.reactor.SSLIOSession;
-import org.apache.http.impl.nio.reactor.SSLIOSessionHandler;
import org.apache.http.impl.nio.reactor.SSLMode;
+import org.apache.http.impl.nio.reactor.SSLSetupHandler;
import org.apache.http.nio.NHttpClientHandler;
import org.apache.http.nio.NHttpClientIOTarget;
import org.apache.http.nio.reactor.IOEventDispatch;
@@ -60,16 +61,16 @@
* <li>{@link org.apache.http.params.CoreConnectionPNames#MAX_LINE_LENGTH}</li>
* </ul>
*
- * @since 4.0
+ * @since 4.1
*/
public class SSLClientIOEventDispatch implements IOEventDispatch {
private static final String SSL_SESSION = "SSL_SESSION";
- protected final NHttpClientHandler handler;
- protected final SSLContext sslcontext;
- protected final SSLIOSessionHandler sslHandler;
- protected final HttpParams params;
+ private final NHttpClientHandler handler;
+ private final SSLContext sslcontext;
+ private final SSLSetupHandler sslHandler;
+ private final HttpParams params;
/**
* Creates a new instance of this class to be used for dispatching I/O event
@@ -79,13 +80,13 @@
*
* @param handler the client protocol handler.
* @param sslcontext the SSL context.
- * @param sslHandler the SSL handler.
+ * @param sslHandler the SSL setup handler.
* @param params HTTP parameters.
*/
public SSLClientIOEventDispatch(
final NHttpClientHandler handler,
final SSLContext sslcontext,
- final SSLIOSessionHandler sslHandler,
+ final SSLSetupHandler sslHandler,
final HttpParams params) {
super();
if (handler == null) {
@@ -174,13 +175,13 @@
*
* @param session the underlying I/O session.
* @param sslcontext the SSL context.
- * @param sslHandler the SSL handler.
+ * @param sslHandler the SSL setup handler.
* @return newly created SSL I/O session.
*/
protected SSLIOSession createSSLIOSession(
final IOSession session,
final SSLContext sslcontext,
- final SSLIOSessionHandler sslHandler) {
+ final SSLSetupHandler sslHandler) {
return new SSLIOSession(session, sslcontext, sslHandler);
}
Copied: httpcomponents/httpcore/trunk/httpcore-nio/src/main/java/org/apache/http/impl/nio/ssl/SSLServerIOEventDispatch.java (from r910320, httpcomponents/httpcore/trunk/httpcore-nio/src/main/java/org/apache/http/impl/nio/SSLServerIOEventDispatch.java)
URL: http://svn.apache.org/viewvc/httpcomponents/httpcore/trunk/httpcore-nio/src/main/java/org/apache/http/impl/nio/ssl/SSLServerIOEventDispatch.java?p2=httpcomponents/httpcore/trunk/httpcore-nio/src/main/java/org/apache/http/impl/nio/ssl/SSLServerIOEventDispatch.java&p1=httpcomponents/httpcore/trunk/httpcore-nio/src/main/java/org/apache/http/impl/nio/SSLServerIOEventDispatch.java&r1=910320&r2=911817&rev=911817&view=diff
==============================================================================
--- httpcomponents/httpcore/trunk/httpcore-nio/src/main/java/org/apache/http/impl/nio/SSLServerIOEventDispatch.java (original)
+++ httpcomponents/httpcore/trunk/httpcore-nio/src/main/java/org/apache/http/impl/nio/ssl/SSLServerIOEventDispatch.java Fri Feb 19 14:14:31 2010
@@ -25,7 +25,7 @@
*
*/
-package org.apache.http.impl.nio;
+package org.apache.http.impl.nio.ssl;
import java.io.IOException;
@@ -35,9 +35,10 @@
import org.apache.http.HttpRequest;
import org.apache.http.HttpRequestFactory;
import org.apache.http.impl.DefaultHttpRequestFactory;
+import org.apache.http.impl.nio.DefaultNHttpServerConnection;
import org.apache.http.impl.nio.reactor.SSLIOSession;
-import org.apache.http.impl.nio.reactor.SSLIOSessionHandler;
import org.apache.http.impl.nio.reactor.SSLMode;
+import org.apache.http.impl.nio.reactor.SSLSetupHandler;
import org.apache.http.nio.NHttpServerIOTarget;
import org.apache.http.nio.NHttpServiceHandler;
import org.apache.http.nio.reactor.IOEventDispatch;
@@ -60,16 +61,16 @@
* <li>{@link org.apache.http.params.CoreConnectionPNames#MAX_LINE_LENGTH}</li>
* </ul>
*
- * @since 4.0
+ * @since 4.1
*/
public class SSLServerIOEventDispatch implements IOEventDispatch {
private static final String SSL_SESSION = "SSL_SESSION";
- protected final NHttpServiceHandler handler;
- protected final SSLContext sslcontext;
- protected final SSLIOSessionHandler sslHandler;
- protected final HttpParams params;
+ private final NHttpServiceHandler handler;
+ private final SSLContext sslcontext;
+ private final SSLSetupHandler sslHandler;
+ private final HttpParams params;
/**
* Creates a new instance of this class to be used for dispatching I/O event
@@ -79,13 +80,13 @@
*
* @param handler the server protocol handler.
* @param sslcontext the SSL context.
- * @param sslHandler the SSL handler.
+ * @param sslHandler the SSL setup handler.
* @param params HTTP parameters.
*/
public SSLServerIOEventDispatch(
final NHttpServiceHandler handler,
final SSLContext sslcontext,
- final SSLIOSessionHandler sslHandler,
+ final SSLSetupHandler sslHandler,
final HttpParams params) {
super();
if (handler == null) {
@@ -174,13 +175,13 @@
*
* @param session the underlying I/O session.
* @param sslcontext the SSL context.
- * @param sslHandler the SSL handler.
+ * @param sslHandler the SSL setup handler.
* @return newly created SSL I/O session.
*/
protected SSLIOSession createSSLIOSession(
final IOSession session,
final SSLContext sslcontext,
- final SSLIOSessionHandler sslHandler) {
+ final SSLSetupHandler sslHandler) {
return new SSLIOSession(session, sslcontext, sslHandler);
}
Modified: httpcomponents/httpcore/trunk/httpcore-nio/src/test/java/org/apache/http/mockup/TestHttpSSLClient.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpcore/trunk/httpcore-nio/src/test/java/org/apache/http/mockup/TestHttpSSLClient.java?rev=911817&r1=911816&r2=911817&view=diff
==============================================================================
--- httpcomponents/httpcore/trunk/httpcore-nio/src/test/java/org/apache/http/mockup/TestHttpSSLClient.java (original)
+++ httpcomponents/httpcore/trunk/httpcore-nio/src/test/java/org/apache/http/mockup/TestHttpSSLClient.java Fri Feb 19 14:14:31 2010
@@ -38,9 +38,9 @@
import javax.net.ssl.TrustManager;
import javax.net.ssl.TrustManagerFactory;
-import org.apache.http.impl.nio.SSLClientIOEventDispatch;
import org.apache.http.impl.nio.reactor.DefaultConnectingIOReactor;
import org.apache.http.impl.nio.reactor.ExceptionEvent;
+import org.apache.http.impl.nio.ssl.SSLClientIOEventDispatch;
import org.apache.http.nio.NHttpClientHandler;
import org.apache.http.nio.reactor.IOEventDispatch;
import org.apache.http.nio.reactor.IOReactorExceptionHandler;
Modified: httpcomponents/httpcore/trunk/httpcore-nio/src/test/java/org/apache/http/mockup/TestHttpSSLServer.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpcore/trunk/httpcore-nio/src/test/java/org/apache/http/mockup/TestHttpSSLServer.java?rev=911817&r1=911816&r2=911817&view=diff
==============================================================================
--- httpcomponents/httpcore/trunk/httpcore-nio/src/test/java/org/apache/http/mockup/TestHttpSSLServer.java (original)
+++ httpcomponents/httpcore/trunk/httpcore-nio/src/test/java/org/apache/http/mockup/TestHttpSSLServer.java Fri Feb 19 14:14:31 2010
@@ -38,9 +38,9 @@
import javax.net.ssl.KeyManagerFactory;
import javax.net.ssl.SSLContext;
-import org.apache.http.impl.nio.SSLServerIOEventDispatch;
import org.apache.http.impl.nio.reactor.DefaultListeningIOReactor;
import org.apache.http.impl.nio.reactor.ExceptionEvent;
+import org.apache.http.impl.nio.ssl.SSLServerIOEventDispatch;
import org.apache.http.nio.NHttpServiceHandler;
import org.apache.http.nio.reactor.IOEventDispatch;
import org.apache.http.nio.reactor.IOReactorExceptionHandler;