src/test/apps/xconnect/src/main/java/org/ciena/xconnect/AppComponent.java
private void revokeNext(XConnectStoreKey key, NextObjective nextObj,
            CompletableFuture<ObjectiveError> nextFuture) {
        ObjectiveContext context = new ObjectiveContext() {
            @Override
            public void onSuccess(Objective objective) {
                log.debug("Previous NextObj for {} removed", key);
                if (nextFuture != null) {
                    nextFuture.complete(null);
                }
            }

            @Override
            public void onError(Objective objective, ObjectiveError error) {
                log.warn("Failed to remove previous NextObj for {}: {}", key, error);
                if (nextFuture != null) {
                    nextFuture.complete(error);
                }
            }
        };
        flowObjectiveService.next(key.deviceId(),
                                  (NextObjective) nextObj.copy().remove(context));
        xConnectNextObjStore.remove(key);
    }
/**
     * Revokes next objectives for given XConnect.
     *
     * @param key XConnect store key
     * @param nextObj next objective
     * @param nextFuture completable future for this next objective operation
     */
Revokes next objectives for given XConnect.
@param key XConnect store key
@param nextObj next objective
@param nextFuture completable future for this next objective operation
Revokes next objectives for given XConnect . @param key XConnect store key @param nextObj next objective @param nextFuture completable future for this next objective operation
private void revokeNext(XConnectStoreKey key, NextObjective nextObj,
            CompletableFuture<ObjectiveError> nextFuture) {
        ObjectiveContext context = new ObjectiveContext() {
            @Override
            public void onSuccess(Objective objective) {
                log.debug("Previous NextObj for {} removed", key);
                if (nextFuture != null) {
                    nextFuture.complete(null);
                }
            }
            @Override
            public void onError(Objective objective, ObjectiveError error) {
                log.warn("Failed to remove previous NextObj for {}: {}", key, error);
                if (nextFuture != null) {
                    nextFuture.complete(error);
                }
            }
        };
        flowObjectiveService.next(key.deviceId(),
                                  (NextObjective) nextObj.copy().remove(context));
        xConnectNextObjStore.remove(key);
    }
private void revokeNext ( XConnectStoreKey key , NextObjective nextObj , CompletableFuture < ObjectiveError > nextFuture ) { ObjectiveContext context = new ObjectiveContext ( ) { @ Override public void onSuccess ( Objective objective ) { log . debug ( "Previous NextObj for {} removed" , key ) ; if ( nextFuture != null ) { nextFuture . complete ( null ) ; } } @ Override public void onError ( Objective objective , ObjectiveError error ) { log . warn ( "Failed to remove previous NextObj for {}: {}" , key , error ) ; if ( nextFuture != null ) { nextFuture . complete ( error ) ; } } } ; flowObjectiveService . next ( key . deviceId ( ) , ( NextObjective ) nextObj . copy ( ) . remove ( context ) ) ; xConnectNextObjStore . remove ( key ) ; }
Revokes next objectives for given XConnect.
Revokes next objectives for given XConnect .