| | |
| | | /** |
| | | * LDAP connection implementation. |
| | | */ |
| | | final class LDAPConnection extends AbstractAsynchronousConnection implements Connection { |
| | | final class LDAPConnection extends AbstractAsynchronousConnection implements Connection, |
| | | TimeoutEventListener { |
| | | /** |
| | | * A dummy SSL client engine configurator as SSLFilter only needs client |
| | | * config. This prevents Grizzly from needlessly using JVM defaults which |
| | |
| | | } |
| | | |
| | | @Override |
| | | public long getTimeout() { |
| | | return factory.getLDAPOptions().getTimeout(TimeUnit.MILLISECONDS); |
| | | } |
| | | |
| | | @Override |
| | | public <R extends ExtendedResult> FutureResult<R> extendedRequestAsync( |
| | | final ExtendedRequest<R> request, |
| | | final IntermediateResponseHandler intermediateResponseHandler, |
| | |
| | | return builder.toString(); |
| | | } |
| | | |
| | | long cancelExpiredRequests(final long currentTime) { |
| | | @Override |
| | | public long handleTimeout(final long currentTime) { |
| | | final long timeout = factory.getLDAPOptions().getTimeout(TimeUnit.MILLISECONDS); |
| | | if (timeout <= 0) { |
| | | return 0; |
| | |
| | | } finally { |
| | | asn1Writer.recycle(); |
| | | } |
| | | factory.getTimeoutChecker().removeConnection(this); |
| | | factory.getTimeoutChecker().removeListener(this); |
| | | connection.closeSilently(); |
| | | factory.releaseTransportAndTimeoutChecker(); |
| | | } |