Restlet Framework 2.2.1
Android

org.restlet.ext.nio
Class HttpsServerHelper

java.lang.Object
  extended by org.restlet.engine.Helper
      extended by org.restlet.engine.RestletHelper<T>
          extended by org.restlet.engine.connector.ConnectorHelper<T>
              extended by org.restlet.ext.nio.BaseHelper<T>
                  extended by org.restlet.ext.nio.ConnectionHelper<Server>
                      extended by org.restlet.ext.nio.ServerConnectionHelper
                          extended by org.restlet.ext.nio.HttpServerHelper
                              extended by org.restlet.ext.nio.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.engine.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.ext.nio.BaseHelper
clientSide, controller, inboundMessages, outboundMessages
 
Constructor Summary
HttpsServerHelper(Server server)
          Constructor.
 
Method Summary
 org.restlet.ext.nio.internal.connection.Connection<Server> createConnection(java.nio.channels.SocketChannel socketChannel, org.restlet.ext.nio.internal.controller.ConnectionController controller, java.net.InetSocketAddress socketAddress)
          Creates a connection associated to the given socket.
 org.restlet.ext.nio.internal.way.InboundWay createInboundWay(org.restlet.ext.nio.internal.connection.Connection<Server> connection, int bufferSize)
          Creates an inbound way for the given connection.
 org.restlet.ext.nio.internal.way.OutboundWay createOutboundWay(org.restlet.ext.nio.internal.connection.Connection<Server> connection, int bufferSize)
          Creates an outbound way for the given connection.
 Request createRequest(org.restlet.ext.nio.internal.connection.Connection<Server> connection, java.lang.String methodName, java.lang.String resourceUri, java.lang.String protocol)
          Creates a new request.
protected  javax.net.ssl.SSLContext getSslContext()
          Returns the SSL context.
protected  void setSslContext(javax.net.ssl.SSLContext sslContext)
          Sets the SSL context.
 void start()
           
 
Methods inherited from class org.restlet.ext.nio.HttpServerHelper
canHandle
 
Methods inherited from class org.restlet.ext.nio.ServerConnectionHelper
createController, createServerSocketChannel, createSocketAddress, doHandleInbound, doHandleOutbound, getController, getServerSocketChannel, handle, handleInbound, handleOutbound, isControllerDaemon, isProxying, isReuseAddress, setEphemeralPort, setEphemeralPort, stop
 
Methods inherited from class org.restlet.ext.nio.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.ext.nio.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.connector.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

public org.restlet.ext.nio.internal.connection.Connection<Server> createConnection(java.nio.channels.SocketChannel socketChannel,
                                                                                   org.restlet.ext.nio.internal.controller.ConnectionController controller,
                                                                                   java.net.InetSocketAddress socketAddress)
                                                                            throws java.io.IOException
Description copied from class: ConnectionHelper
Creates a connection associated to the given socket.

Overrides:
createConnection in class ServerConnectionHelper
Parameters:
socketChannel - The underlying NIO socket channel.
controller - The underlying IO controller.
socketAddress - The associated IP address.
Returns:
The new connection.
Throws:
java.io.IOException

createInboundWay

public org.restlet.ext.nio.internal.way.InboundWay createInboundWay(org.restlet.ext.nio.internal.connection.Connection<Server> connection,
                                                                    int bufferSize)
Description copied from class: ConnectionHelper
Creates an inbound way for the given connection.

Overrides:
createInboundWay in class HttpServerHelper
Parameters:
connection - The parent connection.
bufferSize - The byte buffer size.
Returns:
The inbound way created.

createOutboundWay

public org.restlet.ext.nio.internal.way.OutboundWay createOutboundWay(org.restlet.ext.nio.internal.connection.Connection<Server> connection,
                                                                      int bufferSize)
Description copied from class: ConnectionHelper
Creates an outbound way for the given connection.

Overrides:
createOutboundWay in class HttpServerHelper
Parameters:
connection - The parent connection.
bufferSize - The byte buffer size.
Returns:
The outbound way created.

createRequest

public Request createRequest(org.restlet.ext.nio.internal.connection.Connection<Server> connection,
                             java.lang.String methodName,
                             java.lang.String resourceUri,
                             java.lang.String protocol)
Description copied from class: ServerConnectionHelper
Creates a new request.

Overrides:
createRequest in class HttpServerHelper
Parameters:
connection - The associated connection.
methodName - The method name.
resourceUri - The target resource URI.
protocol - The protocol name and version.
Returns:
The created request.

getSslContext

protected javax.net.ssl.SSLContext getSslContext()
Returns the SSL context.

Returns:
The SSL context.

setSslContext

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

Parameters:
sslContext - The SSL context.

start

public void start()
           throws java.lang.Exception
Overrides:
start in class ServerConnectionHelper
Throws:
java.lang.Exception

Restlet Framework 2.2.1
Android

Copyright © 2005-2014 Restlet.