code: public static Operation onOutbound(final Operation operation)
     {
        return new DefaultOperationBuilderInternal(operation) {
  
           @Override
           public void perform(Rewrite event, EvaluationContext context)
           {
              if (event instanceof OutboundRewrite)
                 operation.perform(event, context);
           }
  
           @Override
           public String toString()
           {
              return "Operations.onOutbound(" + operation + ")";
           }
        };
     }
docs: Wrap the given {@link Operation} in a new {@link Operation} which will invoke the wrapped operation only for
  outbound rewrites.