public void handleExtendedOperation( LdapSession session, ExtendedRequest<ExtendedResponse> req ) throws Exception
{
LOG.info( "Handling StartTLS request." );
IoFilterChain chain = session.getIoSession().getFilterChain();
SslFilter sslFilter = ( SslFilter ) chain.get( "sslFilter" );
if ( sslFilter == null )
{
sslFilter = new SslFilter( sslContext );
chain.addFirst( "sslFilter", sslFilter );
}
else
{
sslFilter.startSsl( session.getIoSession() );
}
ExtendedResponseDecorator<ExtendedResponse> res = new ExtendedResponseDecorator<ExtendedResponse>(
LdapApiServiceFactory.getSingleton(), new ExtendedResponseImpl( req.getMessageId() ) );
LdapResult result = res.getLdapResult();