protected <T> Callable<T> associateWithSubject(Callable<T> task) { Subject subject = getSubject(); return subject.associateWith(task); }
/** * Utility method for subclasses to associate the argument {@code Runnable} with the currently executing subject * and then return the associated Runnable. The default implementation merely defaults to * <pre> * Subject subject = {@link #getSubject() getSubject()}; * return subject.{@link Subject#associateWith(Runnable) associateWith(r)}; * </pre> * * @param r the argument runnable to be associated with the current subject * @return the associated runnable instance reflecting the current subject */ protected Runnable associateWithSubject(Runnable r) { Subject subject = getSubject(); return subject.associateWith(r); }
@Override public Callable associateWith(final Callable callable) { Subject currentUser = getSubject(); return currentUser.associateWith(callable); }
protected <T> Callable<T> associateWithSubject(Callable<T> task) { Subject subject = getSubject(); return subject.associateWith(task); }
/** * Utility method for subclasses to associate the argument {@code Runnable} with the currently executing subject * and then return the associated Runnable. The default implementation merely defaults to * <pre> * Subject subject = {@link #getSubject() getSubject()}; * return subject.{@link Subject#associateWith(Runnable) associateWith(r)}; * </pre> * * @param r the argument runnable to be associated with the current subject * @return the associated runnable instance reflecting the current subject */ protected Runnable associateWithSubject(Runnable r) { Subject subject = getSubject(); return subject.associateWith(r); }
public void addAmmo( final Callable<? extends E> callable, final ExceptionHandler exceptionHandler ) { super.addAmmo( subject.associateWith( callable ), exceptionHandler ); } }
protected <T> Callable<T> associateWithSubject(Callable<T> task) { Subject subject = getSubject(); return subject.associateWith(task); }
/** * Utility method for subclasses to associate the argument {@code Runnable} with the currently executing subject * and then return the associated Runnable. The default implementation merely defaults to * <pre> * Subject subject = {@link #getSubject() getSubject()}; * return subject.{@link Subject#associateWith(Runnable) associateWith(r)}; * </pre> * * @param r the argument runnable to be associated with the current subject * @return the associated runnable instance reflecting the current subject */ protected Runnable associateWithSubject(Runnable r) { Subject subject = getSubject(); return subject.associateWith(r); }
@Override protected <T> Callable<T> associateWithSubject(Callable<T> task) { Subject subject = getSubject(); return subject.associateWith(new MDCAwareCallable<>(task)); }
@Override protected Runnable associateWithSubject(Runnable r) { Subject subject = getSubject(); return subject.associateWith(new MDCAwareRunnable(r)); }
subject.associateWith(tester); new Thread(tester).start();