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

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