org.restlet.ext.ssl
Class HttpsServerHelper

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<Server>
                      extended by org.restlet.engine.connector.ServerConnectionHelper
                          extended by org.restlet.engine.connector.HttpServerHelper
                              extended by org.restlet.ext.ssl.HttpsServerHelper

public class HttpsServerHelper
extends HttpServerHelper

HTTPS server 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.BaseHelper
clientSide, controller, inboundMessages, outboundMessages
 
Constructor Summary
HttpsServerHelper(Server server)
          Constructor.
 
Method Summary
protected  Connection<Server> createConnection(SocketChannel socketChannel, ConnectionController controller, InetSocketAddress socketAddress)
           
 InboundWay createInboundWay(Connection<Server> connection, int bufferSize)
           
 OutboundWay createOutboundWay(Connection<Server> connection, int bufferSize)
           
protected  Request createRequest(Connection<Server> connection, String methodName, String resourceUri, String protocol)
           
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.HttpServerHelper
canHandle
 
Methods inherited from class org.restlet.engine.connector.ServerConnectionHelper
createController, createServerSocketChannel, createSocketAddress, doHandleInbound, doHandleOutbound, getController, getServerSocketChannel, handle, handleInbound, handleOutbound, isControllerDaemon, isProxying, isReuseAddress, setEphemeralPort, setEphemeralPort, stop
 
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, 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

HttpsServerHelper

public HttpsServerHelper(Server server)
Constructor.

Parameters:
server - The server to help.
Method Detail

createConnection

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

createInboundWay

public InboundWay createInboundWay(Connection<Server> connection,
                                   int bufferSize)
Overrides:
createInboundWay in class HttpServerHelper

createOutboundWay

public OutboundWay createOutboundWay(Connection<Server> connection,
                                     int bufferSize)
Overrides:
createOutboundWay in class HttpServerHelper

createRequest

protected Request createRequest(Connection<Server> connection,
                                String methodName,
                                String resourceUri,
                                String protocol)
Overrides:
createRequest in class HttpServerHelper

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 ServerConnectionHelper
Throws:
Exception


Copyright © 2005-2013 Restlet.