com.flat502.rox.server
Interface SSLSessionPolicy

All Known Implementing Classes:
SimpleSSLSessionPolicy

public interface SSLSessionPolicy

A very simple accept policy interface.

An instance of this interface may be associated with an instance of HttpRpcServer. After a new SSL connection has completed handshaking the installed SSLSessionPolicy is consulted to check if the SSL session should be retained.

If policy dictates that the connection not be retained it is closed immediately.


Method Summary
 boolean shouldRetain(java.nio.channels.SocketChannel channel, SSLSession session)
          Consulted to determine whether or not the given SSLSession should be retained.
 

Method Detail

shouldRetain

boolean shouldRetain(java.nio.channels.SocketChannel channel,
                     SSLSession session)
Consulted to determine whether or not the given SSLSession should be retained.

Implementations should avoid any calls on the channel that may block. Blocking the calling thread will have a significant impact on throughput on the server.

Parameters:
channel - The SocketChannel that has just been accepted.
session - The SSLSession that has just completed handshaking.
Returns:
true if the channel should be retained, or false if it should be closed and discarded.