01 /*
02 * SandboxCanceller.java
03 * Copyright (c) 1998-2010, The University of Sheffield.
04 *
05 * This code is from the GATE project (http://gate.ac.uk/) and is free
06 * software licenced under the GNU General Public License version 3. It is
07 * distributed without any warranty. For more details see COPYING.txt in the
08 * top level directory (or at http://gatewiki.sf.net/COPYING.txt).
09 *
10 * Ian Roberts 29th November 2009
11 */
12 package gate.versioning.svnkit;
13
14 import org.tmatesoft.svn.core.SVNCancelException;
15 import org.tmatesoft.svn.core.ISVNCanceller;
16
17 /**
18 * Simple implementation of ISVNCanceller that delegates checkCancelled calls
19 * back to a Sandbox object.
20 */
21 public class SandboxCanceller implements ISVNCanceller {
22 private Sandbox sandbox;
23
24 public SandboxCanceller(Sandbox sandbox) {
25 this.sandbox = sandbox;
26 }
27
28 /**
29 * Delegate checkCancelled back to the Sandbox.
30 */
31 public void checkCancelled() throws SVNCancelException {
32 sandbox.checkCancelled();
33 }
34 }
|