@Override public void onPostAdd(IoFilterChain parent, String name, NextFilter nextFilter) throws SSLException { if (autoStart == START_HANDSHAKE) { initiateHandshake(nextFilter, parent.getSession()); } }
@Override public void onPostAdd(IoFilterChain parent, String name, NextFilter nextFilter) throws SSLException { if (autoStart) { initiateHandshake(nextFilter, parent.getSession()); } }
@Override public void onPostAdd(IoFilterChain parent, String name, NextFilter nextFilter) throws SSLException { if (autoStart == START_HANDSHAKE) { initiateHandshake(nextFilter, parent.getSession()); } }
/** * Initiate the SSL handshake. This can be invoked if you have set the 'autoStart' to * false when creating the SslFilter instance. * * @param session The session for which the SSL handshake should be done * @throws SSLException If the handshake failed */ public void initiateHandshake(IoSession session) throws SSLException { IoFilterChain filterChain = session.getFilterChain(); if (filterChain == null) { throw new SSLException("No filter chain"); } IoFilter.NextFilter nextFilter = filterChain.getNextFilter(SslFilter.class); if (nextFilter == null) { throw new SSLException("No SSL next filter in the chain"); } initiateHandshake(nextFilter, session); }
/** * Initiate the SSL handshake. This can be invoked if you have set the 'autoStart' to * false when creating the SslFilter instance. * * @param session The session for which the SSL handshake should be done * @throws SSLException If the handshake failed */ public void initiateHandshake(IoSession session) throws SSLException { IoFilterChain filterChain = session.getFilterChain(); if (filterChain == null) { throw new SSLException("No filter chain"); } IoFilter.NextFilter nextFilter = filterChain.getNextFilter(SslFilter.class); if (nextFilter == null) { throw new SSLException("No SSL next filter in the chain"); } initiateHandshake(nextFilter, session); }