mirror of https://github.com/OpenIdentityPlatform/OpenDJ.git

Matthew Swift
11.17.2013 976da4aa6126aefd775b7c223c71e29d1207bf10
opendj-ldap-sdk/src/main/java/com/forgerock/opendj/ldap/AbstractLDAPFutureResultImpl.java
@@ -94,11 +94,34 @@
     */
    @Override
    protected final ErrorResultException handleCancelRequest(final boolean mayInterruptIfRunning) {
        /*
         * This will abandon the request, but will also recursively cancel this
         * future. There is no risk of an infinite loop because the state of
         * this future has already been changed.
         */
        connection.abandonAsync(Requests.newAbandonRequest(requestID));
        return null;
    }
    @Override
    protected final boolean isCancelable() {
        /*
         * No other operations can be performed while a bind or startTLS
         * operations is active. Therefore it is not possible to cancel bind or
         * startTLS requests, since doing so will leave the connection in a
         * state which prevents other operations from being performed.
         */
        return !isBindOrStartTLS();
    }
    /**
     * Returns {@code false} by default.
     */
    boolean isBindOrStartTLS() {
        return false;
    }
    @Override
    protected void toString(final StringBuilder sb) {
        sb.append(" requestID = ");
        sb.append(requestID);