Merge branch 'JAL-3878_ws-overhaul-3' into mmw/Release_2_12_ws_merge
[jalview.git] / src / jalview / ws2 / actions / alignment / AlignmentProviderI.java
diff --git a/src/jalview/ws2/actions/alignment/AlignmentProviderI.java b/src/jalview/ws2/actions/alignment/AlignmentProviderI.java
new file mode 100644 (file)
index 0000000..58bf8fc
--- /dev/null
@@ -0,0 +1,32 @@
+package jalview.ws2.actions.alignment;
+
+import java.io.IOException;
+
+import jalview.datamodel.AlignmentI;
+
+import jalview.ws2.api.WebServiceJobHandle;
+import jalview.ws2.client.api.AlignmentWebServiceClientI;
+import jalview.ws2.client.api.WebServiceClientI;
+
+/**
+ * An interface for providing alignment results to the alignment services. Web
+ * service clients that want to support alignment actions must implement this
+ * interface in addition to {@link WebServiceClientI}.
+ * 
+ * @author mmwarowny
+ *
+ * @see AlignmentWebServiceClientI
+ */
+public interface AlignmentProviderI
+{
+  /**
+   * Get the alignment result for the job from the server.
+   * 
+   * @param job
+   *          web service job
+   * @return alignment result
+   * @throws IOException
+   *           server communication error
+   */
+  public AlignmentI getAlignment(WebServiceJobHandle job) throws IOException;
+}