replace Callback with Callable/Pausable
[org.ibex.util.git] / src / org / ibex / util / Callable.java
diff --git a/src/org/ibex/util/Callable.java b/src/org/ibex/util/Callable.java
new file mode 100644 (file)
index 0000000..3281433
--- /dev/null
@@ -0,0 +1,21 @@
+// Copyright 2000-2005 the Contributors, as shown in the revision logs.
+// Licensed under the Apache Public Source License 2.0 ("the License").
+// You may not use this file except in compliance with the License.
+
+package org.ibex.util;
+
+/** Provides a generic interface with which to call an object with a
+ *  given argument.
+ *
+ * <b>NOTE:</b> State restrictions and concurrent access are implementation
+ * specific. All the <tt>Callable</tt> interface specifies is that an
+ * object is callable, not the conditions under which a call may be
+ * made.
+ *
+ * @see org.ibex.util.Pausable
+ *
+ */
+public interface Callable {
+    /** Calls the object with a given argument. */
+    public Object run(Object o) throws Exception;
+}