1 16 17 package org.springframework.jca.work; 18 19 import javax.resource.spi.work.Work ; 20 21 import org.springframework.util.Assert; 22 23 31 public class DelegatingWork implements Work { 32 33 private final Runnable delegate; 34 35 36 40 public DelegatingWork(Runnable delegate) { 41 Assert.notNull(delegate, "Delegate must not be null"); 42 this.delegate = delegate; 43 } 44 45 48 public final Runnable getDelegate() { 49 return this.delegate; 50 } 51 52 53 56 public void run() { 57 this.delegate.run(); 58 } 59 60 64 public void release() { 65 } 66 67 } 68 | Popular Tags |