org.restlet.ext.ssl
Class HttpsClientHelper

java.lang.Object
  extended by org.restlet.engine.Helper
      extended by org.restlet.engine.RestletHelper<T>
          extended by org.restlet.engine.ConnectorHelper<T>
              extended by org.restlet.engine.connector.BaseHelper<T>
                  extended by org.restlet.engine.connector.ConnectionHelper<Client>
                      extended by org.restlet.engine.connector.ClientConnectionHelper
                          extended by org.restlet.ext.ssl.HttpsClientHelper

public class HttpsClientHelper
extends ClientConnectionHelper

HTTPS client helper based on NIO blocking sockets. Here is the list of SSL related parameters that are also supported:

Parameter name Value type Default value Description
sslContextFactory String org.restlet.ext.ssl.DefaultSslContextFactory Let you specify a SslContextFactory qualified class name as a parameter, or an instance as an attribute for a more complete and flexible SSL context setting.
For the default SSL parameters see the Javadocs of the DefaultSslContextFactory class.

Author:
Jerome Louvel

Field Summary
 
Fields inherited from class org.restlet.engine.connector.ClientConnectionHelper
CONNECTOR_LATCH
 
Fields inherited from class org.restlet.engine.connector.BaseHelper
clientSide, controller, inboundMessages, outboundMessages
 
Constructor Summary
HttpsClientHelper(Client client)
          Constructor.
 
Method Summary
protected  Connection<Client> createConnection(SocketChannel socketChannel, ConnectionController controller, InetSocketAddress socketAddress)
           
 InboundWay createInboundWay(Connection<Client> connection, int bufferSize)
           
 OutboundWay createOutboundWay(Connection<Client> connection, int bufferSize)
           
protected  SSLContext getSslContext()
          Returns the SSL context.
protected  void setSslContext(SSLContext sslContext)
          Sets the SSL context.
 void start()
           
 
Methods inherited from class org.restlet.engine.connector.ClientConnectionHelper
createController, createSocketChannel, createSocketChannel, doHandleInbound, doHandleOutbound, getBestConnection, getProxyHost, getProxyPort, getSocketAddress, getSocketConnectTimeoutMs, handle, handleInbound, handleOutbound, isControllerDaemon, isProxying, stop, unblock
 
Methods inherited from class org.restlet.engine.connector.ConnectionHelper
addOutboundMessage, checkin, checkout, configure, createConnectionPool, doFinishStop, doGracefulStop, getConnectionPool, getConnections, getInitialConnections, getMaxConnectionsPerHost, getMaxTotalConnections, getSocketLingerTimeMs, getSocketReceiveBufferSize, getSocketSendBufferSize, getSocketTrafficClass, isPersistingConnections, isPipeliningConnections, isPooledConnection, isSocketKeepAlive, isSocketNoDelay, isSocketOobInline, isSocketReuseAddress
 
Methods inherited from class org.restlet.engine.connector.BaseHelper
control, createControllerService, createRequest, createWorkerService, execute, getController, getControllerSleepTimeMs, getInboundBufferSize, getInboundMessages, getLowThreads, getMaxIoIdleTimeMs, getMaxQueued, getMaxThreadIdleTimeMs, getMaxThreads, getMinThreads, getOutboundBufferSize, getOutboundMessages, getRequest, getThrottleTimeMs, getTraceStream, getTransport, getWorkerService, handleInbound, handleOutbound, hasWorkerThreads, isClientSide, isDirectBuffers, isServerSide, isTracing, isWorkerServiceOverloaded, onInboundError, onOutboundError, traceWorkerService
 
Methods inherited from class org.restlet.engine.ConnectorHelper
getConnectorService, getContext, getProtocols, update
 
Methods inherited from class org.restlet.engine.RestletHelper
getAttributes, getHelped, getHelpedParameters, getLogger, getMetadataService, setHelped
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

HttpsClientHelper

public HttpsClientHelper(Client client)
Constructor.

Parameters:
client - The client to help.
Method Detail

createConnection

protected Connection<Client> createConnection(SocketChannel socketChannel,
                                              ConnectionController controller,
                                              InetSocketAddress socketAddress)
                                       throws IOException
Overrides:
createConnection in class ClientConnectionHelper
Throws:
IOException

createInboundWay

public InboundWay createInboundWay(Connection<Client> connection,
                                   int bufferSize)
Specified by:
createInboundWay in class ConnectionHelper<Client>

createOutboundWay

public OutboundWay createOutboundWay(Connection<Client> connection,
                                     int bufferSize)
Specified by:
createOutboundWay in class ConnectionHelper<Client>

getSslContext

protected SSLContext getSslContext()
Returns the SSL context.

Returns:
The SSL context.

setSslContext

protected void setSslContext(SSLContext sslContext)
Sets the SSL context.

Parameters:
sslContext - The SSL context.

start

public void start()
           throws Exception
Overrides:
start in class ClientConnectionHelper
Throws:
Exception


Copyright © 2005-2013 Restlet.