public <C> Callable<C> wrap(final Callable<C> c) {
    return new Callable<C>() {
      @Override
      public C call() throws Exception {
        Context previous = attach();
        try {
          return c.call();
        } finally {
          detach(previous);
        }
      }
    };
  }
public < C > Callable < C > wrap ( final Callable < C > c ) { return new Callable < C > ( ) { @ Override public C call ( ) throws Exception { Context previous = attach ( ) ; try { return c . call ( ) ; } finally { detach ( previous ) ; } } } ; }
Wrap a {@link Callable} so that it executes with this context as the {@link #current} context.