Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'target_explorer/plugins/org.eclipse.tcf.te.runtime/src/org/eclipse/tcf/te/runtime/interfaces/callback/ICallback.java')
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.runtime/src/org/eclipse/tcf/te/runtime/interfaces/callback/ICallback.java67
1 files changed, 67 insertions, 0 deletions
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.runtime/src/org/eclipse/tcf/te/runtime/interfaces/callback/ICallback.java b/target_explorer/plugins/org.eclipse.tcf.te.runtime/src/org/eclipse/tcf/te/runtime/interfaces/callback/ICallback.java
new file mode 100644
index 000000000..5514c31ef
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.runtime/src/org/eclipse/tcf/te/runtime/interfaces/callback/ICallback.java
@@ -0,0 +1,67 @@
+/*******************************************************************************
+ * Copyright (c) 2011 Wind River Systems, Inc. and others. All rights reserved.
+ * This program and the accompanying materials are made available under the terms
+ * of the Eclipse Public License v1.0 which accompanies this distribution, and is
+ * available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Wind River Systems - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.tcf.te.runtime.interfaces.callback;
+
+import javax.security.auth.callback.Callback;
+
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.tcf.te.runtime.interfaces.properties.IPropertiesContainer;
+
+
+/**
+ * Generic callback interface for asynchronous calls.
+ *
+ * @noimplement Not intended to be implemented by clients, use {@link Callback} as base implementation instead.
+ * @noextend
+ */
+public interface ICallback extends IPropertiesContainer {
+
+ /**
+ * Returns if or if not the callbacks <code>done</code> method
+ * was called already.
+ *
+ * @return <code>True</code> if {@link #done(Object, IStatus)} was called already, <code>false</code> otherwise.
+ */
+ public boolean isDone();
+
+ /**
+ * Callback method invoked when a request is completed.
+ *
+ * @param caller
+ * The caller or <code>null</code>.
+ * @param status
+ * The status. Must not be <code>null</code>.
+ */
+ public void done(Object caller, IStatus status);
+
+ /**
+ * Add an additional parent callback to the end of the parent callback list.
+ *
+ * @param callback
+ * The parent callback. Must not be <code>null</code>.
+ */
+ public void addParentCallback(ICallback callback);
+
+ /**
+ * Sets the result of an asynchronous operation to be carried by
+ * the callback object.
+ *
+ * @param result The result object or <code>null</code>.
+ */
+ public void setResult(Object result);
+
+ /**
+ * Gets the result of an asynchronous operation which is carried by
+ * the callback object.
+ *
+ * @return The result object or <code>null</code>.
+ */
+ public Object getResult();
+}

Back to the top