You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@taverna.apache.org by st...@apache.org on 2018/01/09 23:30:51 UTC
[35/42] incubator-taverna-server git commit: package org.taverna ->
org.apache.taverna
http://git-wip-us.apache.org/repos/asf/incubator-taverna-server/blob/00397eff/taverna-server-port-description/src/test/java/org/taverna/server/port_description/JaxbSanityTest.java
----------------------------------------------------------------------
diff --git a/taverna-server-port-description/src/test/java/org/taverna/server/port_description/JaxbSanityTest.java b/taverna-server-port-description/src/test/java/org/taverna/server/port_description/JaxbSanityTest.java
deleted file mode 100644
index de15cfa..0000000
--- a/taverna-server-port-description/src/test/java/org/taverna/server/port_description/JaxbSanityTest.java
+++ /dev/null
@@ -1,114 +0,0 @@
-package org.taverna.server.port_description;
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-import java.io.IOException;
-import java.io.StringWriter;
-
-import javax.xml.bind.JAXBContext;
-import javax.xml.bind.JAXBException;
-import javax.xml.bind.SchemaOutputResolver;
-import javax.xml.transform.Result;
-import javax.xml.transform.stream.StreamResult;
-
-import org.junit.Assert;
-import org.junit.Before;
-import org.junit.Test;
-
-/**
- * This test file ensures that the JAXB bindings will work once deployed instead
- * of mysteriously failing in service.
- *
- * @author Donal Fellows
- */
-public class JaxbSanityTest {
- SchemaOutputResolver sink;
- StringWriter schema;
-
- String schema() {
- return schema.toString();
- }
-
- private String schemaTest(Class<?>... classes) throws IOException, JAXBException {
- Assert.assertTrue(schema().isEmpty());
- JAXBContext.newInstance(classes).generateSchema(sink);
- Assert.assertFalse(schema().isEmpty());
- return schema();
- }
-
- @Before
- public void init() {
- schema = new StringWriter();
- sink = new SchemaOutputResolver() {
- @Override
- public Result createOutput(String namespaceUri,
- String suggestedFileName) throws IOException {
- StreamResult sr = new StreamResult(schema);
- sr.setSystemId("/dev/null");
- return sr;
- }
- };
- }
-
- @Test
- public void testJAXBForInput() throws Exception {
- schemaTest(InputDescription.InputPort.class);
- }
-
- @Test
- public void testJAXBForInputDescription() throws Exception {
- schemaTest(InputDescription.class);
- }
-
- @Test
- public void testJAXBForAbsentValue() throws Exception {
- schemaTest(AbstractValue.class);
- }
-
- @Test
- public void testJAXBForAbstractValue() throws Exception {
- schemaTest(AbstractValue.class);
- }
-
- @Test
- public void testJAXBForErrorValue() throws Exception {
- schemaTest(ErrorValue.class);
- }
-
- @Test
- public void testJAXBForLeafValue() throws Exception {
- schemaTest(LeafValue.class);
- }
-
- @Test
- public void testJAXBForListValue() throws Exception {
- schemaTest(ListValue.class);
- }
-
- @Test
- public void testJAXBForOutputDescription() throws Exception {
- schemaTest(OutputDescription.class);
- }
-
- @Test
- public void testJAXBForEverythingAtOnce() throws Exception {
- schemaTest(AbsentValue.class, AbstractValue.class, ListValue.class,
- LeafValue.class, ErrorValue.class, OutputDescription.class,
- InputDescription.InputPort.class, InputDescription.class);
- // System.out.println(schema());
- }
-}
http://git-wip-us.apache.org/repos/asf/incubator-taverna-server/blob/00397eff/taverna-server-rmidaemon/src/main/java/org/apache/taverna/server/rmidaemon/Registry.java
----------------------------------------------------------------------
diff --git a/taverna-server-rmidaemon/src/main/java/org/apache/taverna/server/rmidaemon/Registry.java b/taverna-server-rmidaemon/src/main/java/org/apache/taverna/server/rmidaemon/Registry.java
new file mode 100644
index 0000000..333153f
--- /dev/null
+++ b/taverna-server-rmidaemon/src/main/java/org/apache/taverna/server/rmidaemon/Registry.java
@@ -0,0 +1,88 @@
+package org.taverna.server.rmidaemon;
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import static java.lang.System.setProperty;
+import static java.net.InetAddress.getLocalHost;
+import static java.rmi.registry.LocateRegistry.createRegistry;
+import static java.rmi.registry.Registry.REGISTRY_PORT;
+import static java.rmi.server.RMISocketFactory.getDefaultSocketFactory;
+
+import java.io.IOException;
+import java.io.ObjectOutputStream;
+import java.net.ServerSocket;
+import java.rmi.MarshalledObject;
+import java.rmi.server.RMIServerSocketFactory;
+
+/**
+ * Special version of <tt>rmiregistry</tt>.
+ *
+ * @author Donal Fellows
+ */
+public class Registry {
+ /**
+ * Run a registry. The first optional argument is the port for the registry
+ * to listen on, and the second optional argument is whether the registry
+ * should restrict itself to connections from localhost only.
+ *
+ * @param args
+ * Arguments to the program.
+ */
+ public static void main(String... args) {
+ try {
+ if (args.length > 0)
+ port = Integer.parseInt(args[0]);
+ } catch (Exception e) {
+ System.err.println("failed to parse port: " + e.getMessage());
+ System.exit(2);
+ }
+ try {
+ if (args.length > 1)
+ localhostOnly = Boolean.parseBoolean(args[1]);
+ } catch (Exception e) {
+ System.err.println("failed to parse boolean localhost flag: "
+ + e.getMessage());
+ System.exit(2);
+ }
+ try {
+ Object registryHandle = makeRegistry();
+ try (ObjectOutputStream oos = new ObjectOutputStream(System.out)) {
+ oos.writeObject(registryHandle);
+ }
+ } catch (Exception e) {
+ System.err.println("problem creating registry: " + e.getMessage());
+ System.exit(1);
+ }
+ }
+
+ private static int port = REGISTRY_PORT;
+ private static boolean localhostOnly = false;
+
+ private static MarshalledObject<java.rmi.registry.Registry> makeRegistry() throws IOException {
+ if (!localhostOnly)
+ return new MarshalledObject<>(createRegistry(port));
+ setProperty("java.rmi.server.hostname", "127.0.0.1");
+ return new MarshalledObject<>(createRegistry(port,
+ getDefaultSocketFactory(), new RMIServerSocketFactory() {
+ @Override
+ public ServerSocket createServerSocket(int port)
+ throws IOException {
+ return new ServerSocket(port, 0, getLocalHost());
+ }
+ }));
+ }
+}
http://git-wip-us.apache.org/repos/asf/incubator-taverna-server/blob/00397eff/taverna-server-rmidaemon/src/main/java/org/apache/taverna/server/rmidaemon/package-info.java
----------------------------------------------------------------------
diff --git a/taverna-server-rmidaemon/src/main/java/org/apache/taverna/server/rmidaemon/package-info.java b/taverna-server-rmidaemon/src/main/java/org/apache/taverna/server/rmidaemon/package-info.java
new file mode 100644
index 0000000..520b928
--- /dev/null
+++ b/taverna-server-rmidaemon/src/main/java/org/apache/taverna/server/rmidaemon/package-info.java
@@ -0,0 +1,21 @@
+/**
+ * RMI daemon implementation. A variation of an RMI registry.
+ * @author Donal Fellows
+ */
+package org.taverna.server.rmidaemon;
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
http://git-wip-us.apache.org/repos/asf/incubator-taverna-server/blob/00397eff/taverna-server-rmidaemon/src/main/java/org/taverna/server/rmidaemon/Registry.java
----------------------------------------------------------------------
diff --git a/taverna-server-rmidaemon/src/main/java/org/taverna/server/rmidaemon/Registry.java b/taverna-server-rmidaemon/src/main/java/org/taverna/server/rmidaemon/Registry.java
deleted file mode 100644
index 333153f..0000000
--- a/taverna-server-rmidaemon/src/main/java/org/taverna/server/rmidaemon/Registry.java
+++ /dev/null
@@ -1,88 +0,0 @@
-package org.taverna.server.rmidaemon;
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-import static java.lang.System.setProperty;
-import static java.net.InetAddress.getLocalHost;
-import static java.rmi.registry.LocateRegistry.createRegistry;
-import static java.rmi.registry.Registry.REGISTRY_PORT;
-import static java.rmi.server.RMISocketFactory.getDefaultSocketFactory;
-
-import java.io.IOException;
-import java.io.ObjectOutputStream;
-import java.net.ServerSocket;
-import java.rmi.MarshalledObject;
-import java.rmi.server.RMIServerSocketFactory;
-
-/**
- * Special version of <tt>rmiregistry</tt>.
- *
- * @author Donal Fellows
- */
-public class Registry {
- /**
- * Run a registry. The first optional argument is the port for the registry
- * to listen on, and the second optional argument is whether the registry
- * should restrict itself to connections from localhost only.
- *
- * @param args
- * Arguments to the program.
- */
- public static void main(String... args) {
- try {
- if (args.length > 0)
- port = Integer.parseInt(args[0]);
- } catch (Exception e) {
- System.err.println("failed to parse port: " + e.getMessage());
- System.exit(2);
- }
- try {
- if (args.length > 1)
- localhostOnly = Boolean.parseBoolean(args[1]);
- } catch (Exception e) {
- System.err.println("failed to parse boolean localhost flag: "
- + e.getMessage());
- System.exit(2);
- }
- try {
- Object registryHandle = makeRegistry();
- try (ObjectOutputStream oos = new ObjectOutputStream(System.out)) {
- oos.writeObject(registryHandle);
- }
- } catch (Exception e) {
- System.err.println("problem creating registry: " + e.getMessage());
- System.exit(1);
- }
- }
-
- private static int port = REGISTRY_PORT;
- private static boolean localhostOnly = false;
-
- private static MarshalledObject<java.rmi.registry.Registry> makeRegistry() throws IOException {
- if (!localhostOnly)
- return new MarshalledObject<>(createRegistry(port));
- setProperty("java.rmi.server.hostname", "127.0.0.1");
- return new MarshalledObject<>(createRegistry(port,
- getDefaultSocketFactory(), new RMIServerSocketFactory() {
- @Override
- public ServerSocket createServerSocket(int port)
- throws IOException {
- return new ServerSocket(port, 0, getLocalHost());
- }
- }));
- }
-}
http://git-wip-us.apache.org/repos/asf/incubator-taverna-server/blob/00397eff/taverna-server-rmidaemon/src/main/java/org/taverna/server/rmidaemon/package-info.java
----------------------------------------------------------------------
diff --git a/taverna-server-rmidaemon/src/main/java/org/taverna/server/rmidaemon/package-info.java b/taverna-server-rmidaemon/src/main/java/org/taverna/server/rmidaemon/package-info.java
deleted file mode 100644
index 520b928..0000000
--- a/taverna-server-rmidaemon/src/main/java/org/taverna/server/rmidaemon/package-info.java
+++ /dev/null
@@ -1,21 +0,0 @@
-/**
- * RMI daemon implementation. A variation of an RMI registry.
- * @author Donal Fellows
- */
-package org.taverna.server.rmidaemon;
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
http://git-wip-us.apache.org/repos/asf/incubator-taverna-server/blob/00397eff/taverna-server-runinterface/src/main/java/org/apache/taverna/server/localworker/remote/IllegalStateTransitionException.java
----------------------------------------------------------------------
diff --git a/taverna-server-runinterface/src/main/java/org/apache/taverna/server/localworker/remote/IllegalStateTransitionException.java b/taverna-server-runinterface/src/main/java/org/apache/taverna/server/localworker/remote/IllegalStateTransitionException.java
new file mode 100644
index 0000000..cb0cc0a
--- /dev/null
+++ b/taverna-server-runinterface/src/main/java/org/apache/taverna/server/localworker/remote/IllegalStateTransitionException.java
@@ -0,0 +1,49 @@
+/*
+ */
+package org.taverna.server.localworker.remote;
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import javax.xml.ws.WebFault;
+
+/**
+ * Exception that indicates where a change of a workflow run's status is
+ * illegal.
+ *
+ * @author Donal Fellows
+ * @see RemoteSingleRun#setStatus(RemoteStatus)
+ */
+@WebFault(name = "IllegalStateTransitionFault", targetNamespace = "http://ns.taverna.org.uk/2010/xml/server/worker/")
+public class IllegalStateTransitionException extends Exception {
+ private static final long serialVersionUID = 159673249162345L;
+
+ public IllegalStateTransitionException() {
+ this("illegal state transition");
+ }
+
+ public IllegalStateTransitionException(String message) {
+ super(message);
+ }
+
+ public IllegalStateTransitionException(Throwable cause) {
+ this("illegal state transition", cause);
+ }
+
+ public IllegalStateTransitionException(String message, Throwable cause) {
+ super(message, cause);
+ }
+}
http://git-wip-us.apache.org/repos/asf/incubator-taverna-server/blob/00397eff/taverna-server-runinterface/src/main/java/org/apache/taverna/server/localworker/remote/ImplementationException.java
----------------------------------------------------------------------
diff --git a/taverna-server-runinterface/src/main/java/org/apache/taverna/server/localworker/remote/ImplementationException.java b/taverna-server-runinterface/src/main/java/org/apache/taverna/server/localworker/remote/ImplementationException.java
new file mode 100644
index 0000000..3e33fc7
--- /dev/null
+++ b/taverna-server-runinterface/src/main/java/org/apache/taverna/server/localworker/remote/ImplementationException.java
@@ -0,0 +1,39 @@
+/*
+ */
+package org.taverna.server.localworker.remote;
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import javax.xml.ws.WebFault;
+
+/**
+ * Exception that indicates that the implementation has gone wrong in some
+ * unexpected way.
+ *
+ * @author Donal Fellows
+ */
+@WebFault(name = "ImplementationFault", targetNamespace = "http://ns.taverna.org.uk/2010/xml/server/worker/")
+@SuppressWarnings("serial")
+public class ImplementationException extends Exception {
+ public ImplementationException(String message) {
+ super(message);
+ }
+
+ public ImplementationException(String message, Throwable cause) {
+ super(message, cause);
+ }
+}
http://git-wip-us.apache.org/repos/asf/incubator-taverna-server/blob/00397eff/taverna-server-runinterface/src/main/java/org/apache/taverna/server/localworker/remote/RemoteDirectory.java
----------------------------------------------------------------------
diff --git a/taverna-server-runinterface/src/main/java/org/apache/taverna/server/localworker/remote/RemoteDirectory.java b/taverna-server-runinterface/src/main/java/org/apache/taverna/server/localworker/remote/RemoteDirectory.java
new file mode 100644
index 0000000..229d0b7
--- /dev/null
+++ b/taverna-server-runinterface/src/main/java/org/apache/taverna/server/localworker/remote/RemoteDirectory.java
@@ -0,0 +1,75 @@
+/*
+ */
+package org.taverna.server.localworker.remote;
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import java.io.IOException;
+import java.rmi.RemoteException;
+import java.util.Collection;
+
+import javax.annotation.Nonnull;
+
+/**
+ * Represents a directory that is the working directory of a workflow run, or a
+ * sub-directory of it.
+ *
+ * @author Donal Fellows
+ * @see RemoteFile
+ */
+public interface RemoteDirectory extends RemoteDirectoryEntry {
+ /**
+ * @return A list of the contents of the directory.
+ * @throws RemoteException
+ * If anything goes wrong with the communication.
+ * @throws IOException
+ * If anything goes wrong with listing the directory.
+ */
+ @Nonnull
+ public Collection<RemoteDirectoryEntry> getContents()
+ throws RemoteException, IOException;
+
+ /**
+ * Creates a sub-directory of this directory.
+ *
+ * @param name
+ * The name of the sub-directory.
+ * @return A handle to the newly-created directory.
+ * @throws RemoteException
+ * If anything goes wrong with the communication.
+ * @throws IOException
+ * If things go wrong with creating the subdirectory.
+ */
+ @Nonnull
+ public RemoteDirectory makeSubdirectory(@Nonnull String name)
+ throws RemoteException, IOException;
+
+ /**
+ * Creates an empty file in this directory.
+ *
+ * @param name
+ * The name of the file to create.
+ * @return A handle to the newly-created file.
+ * @throws RemoteException
+ * If anything goes wrong with the communication.
+ * @throws IOException
+ * If anything goes wrong with creating the file.
+ */
+ @Nonnull
+ public RemoteFile makeEmptyFile(@Nonnull String name)
+ throws RemoteException, IOException;
+}
http://git-wip-us.apache.org/repos/asf/incubator-taverna-server/blob/00397eff/taverna-server-runinterface/src/main/java/org/apache/taverna/server/localworker/remote/RemoteDirectoryEntry.java
----------------------------------------------------------------------
diff --git a/taverna-server-runinterface/src/main/java/org/apache/taverna/server/localworker/remote/RemoteDirectoryEntry.java b/taverna-server-runinterface/src/main/java/org/apache/taverna/server/localworker/remote/RemoteDirectoryEntry.java
new file mode 100644
index 0000000..9b77e79
--- /dev/null
+++ b/taverna-server-runinterface/src/main/java/org/apache/taverna/server/localworker/remote/RemoteDirectoryEntry.java
@@ -0,0 +1,75 @@
+/*
+ */
+package org.taverna.server.localworker.remote;
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import java.io.IOException;
+import java.rmi.Remote;
+import java.rmi.RemoteException;
+import java.util.Date;
+
+import javax.annotation.Nonnull;
+import javax.annotation.Nullable;
+
+/**
+ * An entry in a {@link RemoteDirectory} representing a file or sub-directory.
+ *
+ * @author Donal Fellows
+ * @see RemoteDirectory
+ * @see RemoteFile
+ */
+public interface RemoteDirectoryEntry extends Remote {
+ /**
+ * @return The "local" name of the entry. This will never be "<tt>..</tt>"
+ * or contain the character "<tt>/</tt>".
+ * @throws RemoteException
+ * If anything goes wrong with the communication.
+ */
+ @Nonnull
+ public String getName() throws RemoteException;
+
+ /**
+ * @return The time when the entry was last modified.
+ * @throws RemoteException
+ * If anything goes wrong with the communication.
+ */
+ @Nonnull
+ public Date getModificationDate() throws RemoteException;
+
+ /**
+ * Gets the directory containing this directory entry.
+ *
+ * @return A directory handle, or <tt>null</tt> if called on the workflow
+ * run's working directory.
+ * @throws RemoteException
+ * If anything goes wrong with the communication.
+ */
+ @Nullable
+ public RemoteDirectory getContainingDirectory() throws RemoteException;
+
+ /**
+ * Destroy this directory entry, deleting the file or sub-directory. The
+ * workflow run's working directory can never be manually destroyed.
+ *
+ * @throws RemoteException
+ * If anything goes wrong with the communication.
+ * @throws IOException
+ * If things go wrong when deleting the directory entry.
+ */
+ public void destroy() throws RemoteException, IOException;
+}
http://git-wip-us.apache.org/repos/asf/incubator-taverna-server/blob/00397eff/taverna-server-runinterface/src/main/java/org/apache/taverna/server/localworker/remote/RemoteFile.java
----------------------------------------------------------------------
diff --git a/taverna-server-runinterface/src/main/java/org/apache/taverna/server/localworker/remote/RemoteFile.java b/taverna-server-runinterface/src/main/java/org/apache/taverna/server/localworker/remote/RemoteFile.java
new file mode 100644
index 0000000..63778db
--- /dev/null
+++ b/taverna-server-runinterface/src/main/java/org/apache/taverna/server/localworker/remote/RemoteFile.java
@@ -0,0 +1,111 @@
+/*
+ */
+package org.taverna.server.localworker.remote;
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import java.io.IOException;
+import java.rmi.RemoteException;
+
+import javax.annotation.Nonnull;
+
+/**
+ * Represents a file in the working directory of a workflow instance run, or in
+ * some sub-directory of it.
+ *
+ * @author Donal Fellows
+ * @see RemoteDirectory
+ */
+public interface RemoteFile extends RemoteDirectoryEntry {
+ /**
+ * Read from the file.
+ *
+ * @param offset
+ * Where in the file to read the bytes from.
+ * @param length
+ * How much of the file to read; -1 for "to the end".
+ * @return The literal byte contents of the given section of the file.
+ * @throws RemoteException
+ * If anything goes wrong with the communication.
+ * @throws IOException
+ * If things go wrong reading the file.
+ */
+ @Nonnull
+ byte[] getContents(int offset, int length) throws RemoteException,
+ IOException;
+
+ /**
+ * Write the data to the file, totally replacing what was there before.
+ *
+ * @param data
+ * The literal bytes that will form the new contents of the file.
+ * @throws RemoteException
+ * If anything goes wrong with the communication.
+ * @throws IOException
+ * If things go wrong writing the contents.
+ */
+ void setContents(@Nonnull byte[] data) throws RemoteException, IOException;
+
+ /**
+ * Append the data to the file.
+ *
+ * @param data
+ * The literal bytes that will be appended.
+ * @throws RemoteException
+ * If anything goes wrong with the communication.
+ * @throws IOException
+ * If things go wrong writing the contents.
+ */
+ void appendContents(@Nonnull byte[] data) throws RemoteException,
+ IOException;
+
+ /**
+ * @return The length of the file, in bytes.
+ * @throws RemoteException
+ * If anything goes wrong with the communication.
+ */
+ long getSize() throws RemoteException;
+
+ /**
+ * Copy from another file to this one.
+ *
+ * @param sourceFile
+ * The other file to copy from.
+ * @throws RemoteException
+ * If anything goes wrong with the communication.
+ * @throws IOException
+ * If things go wrong during the copy.
+ */
+ void copy(@Nonnull RemoteFile sourceFile) throws RemoteException,
+ IOException;
+
+ /**
+ * @return The full native OS name for the file.
+ * @throws RemoteException
+ * If anything goes wrong with the communication.
+ */
+ @Nonnull
+ String getNativeName() throws RemoteException;
+
+ /**
+ * @return The host holding the file.
+ * @throws RemoteException
+ * If anything goes wrong with the communication.
+ */
+ @Nonnull
+ String getNativeHost() throws RemoteException;
+}
http://git-wip-us.apache.org/repos/asf/incubator-taverna-server/blob/00397eff/taverna-server-runinterface/src/main/java/org/apache/taverna/server/localworker/remote/RemoteInput.java
----------------------------------------------------------------------
diff --git a/taverna-server-runinterface/src/main/java/org/apache/taverna/server/localworker/remote/RemoteInput.java b/taverna-server-runinterface/src/main/java/org/apache/taverna/server/localworker/remote/RemoteInput.java
new file mode 100644
index 0000000..b4fda9e
--- /dev/null
+++ b/taverna-server-runinterface/src/main/java/org/apache/taverna/server/localworker/remote/RemoteInput.java
@@ -0,0 +1,105 @@
+/*
+ */
+package org.taverna.server.localworker.remote;
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import java.rmi.Remote;
+import java.rmi.RemoteException;
+
+import javax.annotation.Nonnull;
+import javax.annotation.Nullable;
+
+/**
+ * This represents the assignment of inputs to input ports of the workflow. Note
+ * that the <tt>file</tt> and <tt>value</tt> properties are never set at the
+ * same time.
+ *
+ * @author Donal Fellows
+ */
+public interface RemoteInput extends Remote {
+ /**
+ * @return The file currently assigned to this input port, or <tt>null</tt>
+ * if no file is assigned.
+ * @throws RemoteException
+ * If anything goes wrong with the communication.
+ */
+ @Nullable
+ String getFile() throws RemoteException;
+
+ /**
+ * @return The name of this input port. This may not be changed.
+ * @throws RemoteException
+ * If anything goes wrong with the communication.
+ */
+ @Nonnull
+ String getName() throws RemoteException;
+
+ /**
+ * @return The value currently assigned to this input port, or <tt>null</tt>
+ * if no value is assigned.
+ * @throws RemoteException
+ * If anything goes wrong with the communication.
+ */
+ @Nullable
+ String getValue() throws RemoteException;
+
+ /**
+ * @return The delimiter currently used to split this input port's value
+ * into a list, or <tt>null</tt> if no delimiter is to be used
+ * (i.e., the value is a singleton).
+ * @throws RemoteException
+ * If anything goes wrong with the communication.
+ */
+ @Nullable
+ String getDelimiter() throws RemoteException;
+
+ /**
+ * Sets the file to use for this input. This overrides the use of the
+ * previous file and any set value.
+ *
+ * @param file
+ * The filename to use. Must not start with a <tt>/</tt> or
+ * contain any <tt>..</tt> segments. Will be interpreted relative
+ * to the run's working directory.
+ * @throws RemoteException
+ * If anything goes wrong with the communication.
+ */
+ void setFile(@Nonnull String file) throws RemoteException;
+
+ /**
+ * Sets the value to use for this input. This overrides the use of the
+ * previous value and any set file.
+ *
+ * @param value
+ * The value to use.
+ * @throws RemoteException
+ * If anything goes wrong with the communication.
+ */
+ void setValue(@Nonnull String value) throws RemoteException;
+
+ /**
+ * Sets the delimiter used to split this input port's value into a list.
+ *
+ * @param delimiter
+ * The delimiter character, or <tt>null</tt> if no delimiter is
+ * to be used (i.e., the value is a singleton).
+ * @throws RemoteException
+ * If anything goes wrong with the communication.
+ */
+ void setDelimiter(@Nullable String delimiter) throws RemoteException;
+}
http://git-wip-us.apache.org/repos/asf/incubator-taverna-server/blob/00397eff/taverna-server-runinterface/src/main/java/org/apache/taverna/server/localworker/remote/RemoteListener.java
----------------------------------------------------------------------
diff --git a/taverna-server-runinterface/src/main/java/org/apache/taverna/server/localworker/remote/RemoteListener.java b/taverna-server-runinterface/src/main/java/org/apache/taverna/server/localworker/remote/RemoteListener.java
new file mode 100644
index 0000000..2539f0d
--- /dev/null
+++ b/taverna-server-runinterface/src/main/java/org/apache/taverna/server/localworker/remote/RemoteListener.java
@@ -0,0 +1,90 @@
+/*
+ */
+package org.taverna.server.localworker.remote;
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import java.rmi.Remote;
+import java.rmi.RemoteException;
+
+import javax.annotation.Nonnull;
+
+/**
+ * An event listener that is attached to a {@link RemoteSingleRun}.
+ *
+ * @author Donal Fellows
+ */
+public interface RemoteListener extends Remote {
+ /**
+ * @return The name of the listener.
+ * @throws RemoteException
+ * If anything goes wrong with the communication.
+ */
+ @Nonnull
+ public String getName() throws RemoteException;
+
+ /**
+ * @return The type of the listener.
+ * @throws RemoteException
+ * If anything goes wrong with the communication.
+ */
+ @Nonnull
+ public String getType() throws RemoteException;
+
+ /**
+ * @return The configuration document for the listener.
+ * @throws RemoteException
+ * If anything goes wrong with the communication.
+ */
+ @Nonnull
+ public String getConfiguration() throws RemoteException;
+
+ /**
+ * @return The supported properties of the listener.
+ * @throws RemoteException
+ * If anything goes wrong with the communication.
+ */
+ @Nonnull
+ public String[] listProperties() throws RemoteException;
+
+ /**
+ * Get the value of a particular property, which should be listed in the
+ * {@link #listProperties()} method.
+ *
+ * @param propName
+ * The name of the property to read.
+ * @return The value of the property.
+ * @throws RemoteException
+ * If anything goes wrong with the communication.
+ */
+ @Nonnull
+ public String getProperty(@Nonnull String propName) throws RemoteException;
+
+ /**
+ * Set the value of a particular property, which should be listed in the
+ * {@link #listProperties()} method.
+ *
+ * @param propName
+ * The name of the property to write.
+ * @param value
+ * The value to set the property to.
+ * @throws RemoteException
+ * If anything goes wrong with the communication.
+ */
+ public void setProperty(@Nonnull String propName, @Nonnull String value)
+ throws RemoteException;
+}
http://git-wip-us.apache.org/repos/asf/incubator-taverna-server/blob/00397eff/taverna-server-runinterface/src/main/java/org/apache/taverna/server/localworker/remote/RemoteRunFactory.java
----------------------------------------------------------------------
diff --git a/taverna-server-runinterface/src/main/java/org/apache/taverna/server/localworker/remote/RemoteRunFactory.java b/taverna-server-runinterface/src/main/java/org/apache/taverna/server/localworker/remote/RemoteRunFactory.java
new file mode 100644
index 0000000..bc91f0e
--- /dev/null
+++ b/taverna-server-runinterface/src/main/java/org/apache/taverna/server/localworker/remote/RemoteRunFactory.java
@@ -0,0 +1,97 @@
+/*
+ */
+package org.taverna.server.localworker.remote;
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import java.rmi.Remote;
+import java.rmi.RemoteException;
+import java.util.UUID;
+
+import org.taverna.server.localworker.server.UsageRecordReceiver;
+
+import javax.annotation.Nonnull;
+import javax.annotation.Nullable;
+
+/**
+ * The main RMI-enabled interface for creating runs.
+ *
+ * @author Donal Fellows
+ */
+public interface RemoteRunFactory extends Remote {
+ /**
+ * Makes a workflow run that will process a particular workflow document.
+ *
+ * @param workflow
+ * The (serialised) workflow to instantiate as a run.
+ * @param creator
+ * Who is this run created for?
+ * @param usageRecordReceiver
+ * Where to write any usage records. May be <tt>null</tt> to
+ * cause them to not be written.
+ * @param masterID
+ * The UUID of the run to use, or <tt>null</tt> if the execution
+ * engine is to manufacture a new one for itself.
+ * @return A remote handle for the run.
+ * @throws RemoteException
+ * If anything goes wrong with the communication.
+ */
+ @Nonnull
+ RemoteSingleRun make(@Nonnull byte[] workflow, @Nonnull String creator,
+ @Nullable UsageRecordReceiver usageRecordReceiver,
+ @Nullable UUID masterID) throws RemoteException;
+
+ /**
+ * Asks this factory to unregister itself from the registry and cease
+ * operation.
+ *
+ * @throws RemoteException
+ * If anything goes wrong with the communication.
+ */
+ void shutdown() throws RemoteException;
+
+ /**
+ * Configures the details to use when setting up the workflow run's
+ * connnection to the interaction feed.
+ *
+ * @param host
+ * The host where the feed is located.
+ * @param port
+ * The port where the feed is located.
+ * @param webdavPath
+ * The path used for pushing web pages into the feed.
+ * @param feedPath
+ * The path used for reading and writing notifications on the
+ * feed.
+ * @throws RemoteException
+ * If anything goes wrong with the communication.
+ */
+ void setInteractionServiceDetails(@Nonnull String host,
+ @Nonnull String port, @Nonnull String webdavPath,
+ @Nonnull String feedPath) throws RemoteException;
+
+ /**
+ * Gets a count of the number of {@linkplain RemoteSingleRun workflow runs}
+ * that this factor knows about that are in the
+ * {@link RemoteStatus#Operating Operating} state.
+ *
+ * @return A count of "running" workflow runs.
+ * @throws RemoteException
+ * If anything goes wrong with the communication.
+ */
+ int countOperatingRuns() throws RemoteException;
+}
http://git-wip-us.apache.org/repos/asf/incubator-taverna-server/blob/00397eff/taverna-server-runinterface/src/main/java/org/apache/taverna/server/localworker/remote/RemoteSecurityContext.java
----------------------------------------------------------------------
diff --git a/taverna-server-runinterface/src/main/java/org/apache/taverna/server/localworker/remote/RemoteSecurityContext.java b/taverna-server-runinterface/src/main/java/org/apache/taverna/server/localworker/remote/RemoteSecurityContext.java
new file mode 100644
index 0000000..fc4baff
--- /dev/null
+++ b/taverna-server-runinterface/src/main/java/org/apache/taverna/server/localworker/remote/RemoteSecurityContext.java
@@ -0,0 +1,47 @@
+/*
+ */
+package org.taverna.server.localworker.remote;
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import java.net.URI;
+import java.rmi.Remote;
+import java.rmi.RemoteException;
+import java.util.Map;
+
+import javax.annotation.Nonnull;
+
+/**
+ * Outline of the security context for a workflow run.
+ *
+ * @author Donal Fellows
+ */
+public interface RemoteSecurityContext extends Remote {
+ void setKeystore(@Nonnull byte[] keystore) throws RemoteException,
+ ImplementationException;
+
+ void setPassword(@Nonnull char[] password) throws RemoteException,
+ ImplementationException;
+
+ void setTruststore(@Nonnull byte[] truststore) throws RemoteException,
+ ImplementationException;
+
+ void setUriToAliasMap(@Nonnull Map<URI, String> uriToAliasMap)
+ throws RemoteException;
+
+ void setHelioToken(@Nonnull String helioToken) throws RemoteException;
+}
http://git-wip-us.apache.org/repos/asf/incubator-taverna-server/blob/00397eff/taverna-server-runinterface/src/main/java/org/apache/taverna/server/localworker/remote/RemoteSingleRun.java
----------------------------------------------------------------------
diff --git a/taverna-server-runinterface/src/main/java/org/apache/taverna/server/localworker/remote/RemoteSingleRun.java b/taverna-server-runinterface/src/main/java/org/apache/taverna/server/localworker/remote/RemoteSingleRun.java
new file mode 100644
index 0000000..e2519f8
--- /dev/null
+++ b/taverna-server-runinterface/src/main/java/org/apache/taverna/server/localworker/remote/RemoteSingleRun.java
@@ -0,0 +1,267 @@
+/*
+ */
+package org.taverna.server.localworker.remote;
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import java.net.URL;
+import java.rmi.Remote;
+import java.rmi.RemoteException;
+import java.util.Date;
+import java.util.List;
+
+import javax.annotation.Nonnull;
+import javax.annotation.Nullable;
+
+public interface RemoteSingleRun extends Remote {
+ /**
+ * @return The name of the Baclava file to use for all inputs, or
+ * <tt>null</tt> if no Baclava file is set.
+ * @throws RemoteException
+ * If anything goes wrong with the communication.
+ */
+ @Nullable
+ public String getInputBaclavaFile() throws RemoteException;
+
+ /**
+ * Sets the Baclava file to use for all inputs. This overrides the use of
+ * individual inputs.
+ *
+ * @param filename
+ * The filename to use. Must not start with a <tt>/</tt> or
+ * contain any <tt>..</tt> segments. Will be interpreted relative
+ * to the run's working directory.
+ * @throws RemoteException
+ * If anything goes wrong with the communication.
+ */
+ public void setInputBaclavaFile(@Nonnull String filename)
+ throws RemoteException;
+
+ /**
+ * @return The list of input assignments.
+ * @throws RemoteException
+ * If anything goes wrong with the communication.
+ */
+ @Nonnull
+ public List<RemoteInput> getInputs() throws RemoteException;
+
+ /**
+ * Create an input assignment.
+ *
+ * @param name
+ * The name of the port that this will be an input for.
+ * @return The assignment reference.
+ * @throws RemoteException
+ * If anything goes wrong with the communication.
+ */
+ @Nonnull
+ public RemoteInput makeInput(@Nonnull String name) throws RemoteException;
+
+ /**
+ * @return The file (relative to the working directory) to write the outputs
+ * of the run to as a Baclava document, or <tt>null</tt> if they are
+ * to be written to non-Baclava files in a directory called
+ * <tt>out</tt>.
+ * @throws RemoteException
+ * If anything goes wrong with the communication.
+ */
+ @Nullable
+ public String getOutputBaclavaFile() throws RemoteException;
+
+ /**
+ * Sets where the output of the run is to be written to. This will cause the
+ * output to be generated as a Baclava document, rather than a collection of
+ * individual non-Baclava files in the subdirectory of the working directory
+ * called <tt>out</tt>.
+ *
+ * @param filename
+ * Where to write the Baclava file (or <tt>null</tt> to cause the
+ * output to be written to individual files); overwrites any
+ * previous setting of this value.
+ * @throws RemoteException
+ * If anything goes wrong with the communication.
+ */
+ public void setOutputBaclavaFile(@Nullable String filename)
+ throws RemoteException;
+
+ /**
+ * @return The current status of the run.
+ * @throws RemoteException
+ * If anything goes wrong with the communication.
+ */
+ @Nonnull
+ public RemoteStatus getStatus() throws RemoteException;
+
+ /**
+ * Set the status of the run, which should cause it to move into the given
+ * state. This may cause some significant changes.
+ *
+ * @param s
+ * The state to try to change to.
+ * @throws IllegalStateTransitionException
+ * If the requested state change is impossible. (Note that it is
+ * always legal to set the status to the current status.)
+ * @throws RemoteException
+ * If anything goes wrong with the communication.
+ * @throws ImplementationException
+ * If something goes horribly wrong on the back end.
+ * @throws StillWorkingOnItException
+ * If the startup time of the workflow implementation exceeds a
+ * built-in threshold.
+ */
+ public void setStatus(@Nonnull RemoteStatus s)
+ throws IllegalStateTransitionException, RemoteException,
+ ImplementationException, StillWorkingOnItException;
+
+ /**
+ * @return When this workflow run was found to have finished, or
+ * <tt>null</tt> if it has never finished (either still running or
+ * never started).
+ * @throws RemoteException
+ * If anything goes wrong with the communication.
+ */
+ @Nullable
+ public Date getFinishTimestamp() throws RemoteException;
+
+ /**
+ * @return When this workflow run was started, or <tt>null</tt> if it has
+ * never been started.
+ * @throws RemoteException
+ * If anything goes wrong with the communication.
+ */
+ @Nullable
+ public Date getStartTimestamp() throws RemoteException;
+
+ /**
+ * @return Handle to the main working directory of the run.
+ * @throws RemoteException
+ * If anything goes wrong with the communication.
+ */
+ @Nonnull
+ public RemoteDirectory getWorkingDirectory() throws RemoteException;
+
+ /**
+ * @return The list of listener instances attached to the run.
+ * @throws RemoteException
+ * If anything goes wrong with the communication.
+ */
+ @Nonnull
+ public List<RemoteListener> getListeners() throws RemoteException;
+
+ /**
+ * Add a listener to the run.
+ *
+ * @param listener
+ * The listener to add.
+ * @throws RemoteException
+ * If anything goes wrong with the communication.
+ * @throws ImplementationException
+ * If something goes wrong when adding the listener.
+ */
+ public void addListener(@Nonnull RemoteListener listener)
+ throws RemoteException, ImplementationException;
+
+ /**
+ * @return The security context structure for this run.
+ * @throws RemoteException
+ * If anything goes wrong with the communication.
+ * @throws ImplementationException
+ * If something goes wrong when getting the context.
+ */
+ @Nonnull
+ public RemoteSecurityContext getSecurityContext() throws RemoteException,
+ ImplementationException;
+
+ /**
+ * Kill off this run, removing all resources which it consumes.
+ *
+ * @throws RemoteException
+ * If anything goes wrong with the communication.
+ * @throws ImplementationException
+ * If something goes horribly wrong when destroying the run.
+ */
+ public void destroy() throws RemoteException, ImplementationException;
+
+ /**
+ * Get the types of listener supported by this run.
+ *
+ * @return A list of listener type names.
+ * @throws RemoteException
+ * If anything goes wrong with the communication.
+ */
+ @Nonnull
+ public List<String> getListenerTypes() throws RemoteException;
+
+ /**
+ * Create a listener that can be attached to this run.
+ *
+ * @param type
+ * The type name of the listener to create; it must be one of the
+ * names returned by the {@link #getListenerTypes()} operation.
+ * @param configuration
+ * The configuration document for this listener. The nature of
+ * the contents of this are determined by the type.
+ * @return A handle for the listener.
+ * @throws RemoteException
+ * If anything goes wrong with the communication.
+ */
+ @Nonnull
+ public RemoteListener makeListener(@Nonnull String type,
+ @Nonnull String configuration) throws RemoteException;
+
+ /**
+ * Configures the details to use when setting up the workflow run's
+ * connnection to the interaction feed.
+ *
+ * @param interactionFeed
+ * The location of the interaction feed. If <tt>null</tt>,
+ * defaults from the factory will be used instead.
+ * @param webdavPath
+ * The location used for pushing web pages to support the feed.
+ * If <tt>null</tt>, a default from the factory will be used
+ * instead.
+ * @param publishUrlBase
+ * Where to <i>actually</i> publish to, if this needs to be
+ * different from the location presented in the published HTML
+ * and Feed entries. Necessary in complex network scenarios.
+ * @throws RemoteException
+ * If anything goes wrong with the communication.
+ */
+ void setInteractionServiceDetails(@Nonnull URL interactionFeed,
+ @Nonnull URL webdavPath, @Nullable URL publishUrlBase) throws RemoteException;
+
+ /**
+ * A do-nothing method, used to check the general reachability of the
+ * workflow run.
+ *
+ * @throws RemoteException
+ * If anything goes wrong with the communication.
+ */
+ void ping() throws RemoteException;
+
+ /**
+ * Sets whether we should generate provenance information from a run.
+ *
+ * @param generateProvenance
+ * Boolean flag, true for do the generation. Must be set before
+ * starting the run for this to have an effect.
+ * @throws RemoteException
+ * If anything goes wrong with the communication.
+ */
+ void setGenerateProvenance(boolean generateProvenance)
+ throws RemoteException;
+}
http://git-wip-us.apache.org/repos/asf/incubator-taverna-server/blob/00397eff/taverna-server-runinterface/src/main/java/org/apache/taverna/server/localworker/remote/RemoteStatus.java
----------------------------------------------------------------------
diff --git a/taverna-server-runinterface/src/main/java/org/apache/taverna/server/localworker/remote/RemoteStatus.java b/taverna-server-runinterface/src/main/java/org/apache/taverna/server/localworker/remote/RemoteStatus.java
new file mode 100644
index 0000000..89a7cff
--- /dev/null
+++ b/taverna-server-runinterface/src/main/java/org/apache/taverna/server/localworker/remote/RemoteStatus.java
@@ -0,0 +1,53 @@
+/*
+ */
+package org.taverna.server.localworker.remote;
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+/**
+ * States of a workflow run. They are {@link RemoteStatus#Initialized
+ * Initialized}, {@link RemoteStatus#Operating Operating},
+ * {@link RemoteStatus#Stopped Stopped}, and {@link RemoteStatus#Finished
+ * Finished}. Conceptually, there is also a <tt>Destroyed</tt> state, but the
+ * workflow run does not exist (and hence can't have its state queried or set)
+ * in that case.
+ *
+ * @author Donal Fellows
+ */
+public enum RemoteStatus {
+ /**
+ * The workflow run has been created, but is not yet running. The run will
+ * need to be manually moved to {@link #Operating} when ready.
+ */
+ Initialized,
+ /**
+ * The workflow run is going, reading input, generating output, etc. Will
+ * eventually either move automatically to {@link #Finished} or can be moved
+ * manually to {@link #Stopped} (where supported).
+ */
+ Operating,
+ /**
+ * The workflow run is paused, and will need to be moved back to
+ * {@link #Operating} manually.
+ */
+ Stopped,
+ /**
+ * The workflow run has ceased; data files will continue to exist until the
+ * run is destroyed (which may be manual or automatic).
+ */
+ Finished
+}
http://git-wip-us.apache.org/repos/asf/incubator-taverna-server/blob/00397eff/taverna-server-runinterface/src/main/java/org/apache/taverna/server/localworker/remote/StillWorkingOnItException.java
----------------------------------------------------------------------
diff --git a/taverna-server-runinterface/src/main/java/org/apache/taverna/server/localworker/remote/StillWorkingOnItException.java b/taverna-server-runinterface/src/main/java/org/apache/taverna/server/localworker/remote/StillWorkingOnItException.java
new file mode 100644
index 0000000..a7af96b
--- /dev/null
+++ b/taverna-server-runinterface/src/main/java/org/apache/taverna/server/localworker/remote/StillWorkingOnItException.java
@@ -0,0 +1,33 @@
+/*
+ */
+package org.taverna.server.localworker.remote;
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+/**
+ * Exception that indicates that the implementation is still working on
+ * processing the operation. Note that though this is an exception, it is <i>not
+ * a failure</i>.
+ *
+ * @author Donal Fellows
+ */
+@SuppressWarnings("serial")
+public class StillWorkingOnItException extends Exception {
+ public StillWorkingOnItException(String string) {
+ super(string);
+ }
+}
http://git-wip-us.apache.org/repos/asf/incubator-taverna-server/blob/00397eff/taverna-server-runinterface/src/main/java/org/apache/taverna/server/localworker/remote/package-info.java
----------------------------------------------------------------------
diff --git a/taverna-server-runinterface/src/main/java/org/apache/taverna/server/localworker/remote/package-info.java b/taverna-server-runinterface/src/main/java/org/apache/taverna/server/localworker/remote/package-info.java
new file mode 100644
index 0000000..6466e2f
--- /dev/null
+++ b/taverna-server-runinterface/src/main/java/org/apache/taverna/server/localworker/remote/package-info.java
@@ -0,0 +1,22 @@
+/*
+ */
+/**
+ * Interfaces exported by worker classes to the server.
+ */
+package org.taverna.server.localworker.remote;
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
http://git-wip-us.apache.org/repos/asf/incubator-taverna-server/blob/00397eff/taverna-server-runinterface/src/main/java/org/apache/taverna/server/localworker/server/UsageRecordReceiver.java
----------------------------------------------------------------------
diff --git a/taverna-server-runinterface/src/main/java/org/apache/taverna/server/localworker/server/UsageRecordReceiver.java b/taverna-server-runinterface/src/main/java/org/apache/taverna/server/localworker/server/UsageRecordReceiver.java
new file mode 100644
index 0000000..cc0127e
--- /dev/null
+++ b/taverna-server-runinterface/src/main/java/org/apache/taverna/server/localworker/server/UsageRecordReceiver.java
@@ -0,0 +1,42 @@
+/*
+ */
+package org.taverna.server.localworker.server;
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import java.rmi.Remote;
+import java.rmi.RemoteException;
+
+/**
+ * Interface exported by (part of) the webapp to allow processes it creates to
+ * push in usage records.
+ *
+ * @author Donal Fellows
+ */
+public interface UsageRecordReceiver extends Remote {
+ /**
+ * Called to push in a usage record. Note that it is assumed that the usage
+ * record already contains all the information required to locate and
+ * process the job; there is no separate handle.
+ *
+ * @param usageRecord
+ * The serialised XML of the usage record.
+ * @throws RemoteException
+ * if anything goes wrong.
+ */
+ void acceptUsageRecord(String usageRecord) throws RemoteException;
+}
http://git-wip-us.apache.org/repos/asf/incubator-taverna-server/blob/00397eff/taverna-server-runinterface/src/main/java/org/apache/taverna/server/localworker/server/package-info.java
----------------------------------------------------------------------
diff --git a/taverna-server-runinterface/src/main/java/org/apache/taverna/server/localworker/server/package-info.java b/taverna-server-runinterface/src/main/java/org/apache/taverna/server/localworker/server/package-info.java
new file mode 100644
index 0000000..584f1ed
--- /dev/null
+++ b/taverna-server-runinterface/src/main/java/org/apache/taverna/server/localworker/server/package-info.java
@@ -0,0 +1,22 @@
+/*
+ */
+/**
+ * Interfaces exported by the server to worker classes.
+ */
+package org.taverna.server.localworker.server;
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
http://git-wip-us.apache.org/repos/asf/incubator-taverna-server/blob/00397eff/taverna-server-runinterface/src/main/java/org/taverna/server/localworker/remote/IllegalStateTransitionException.java
----------------------------------------------------------------------
diff --git a/taverna-server-runinterface/src/main/java/org/taverna/server/localworker/remote/IllegalStateTransitionException.java b/taverna-server-runinterface/src/main/java/org/taverna/server/localworker/remote/IllegalStateTransitionException.java
deleted file mode 100644
index cb0cc0a..0000000
--- a/taverna-server-runinterface/src/main/java/org/taverna/server/localworker/remote/IllegalStateTransitionException.java
+++ /dev/null
@@ -1,49 +0,0 @@
-/*
- */
-package org.taverna.server.localworker.remote;
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-import javax.xml.ws.WebFault;
-
-/**
- * Exception that indicates where a change of a workflow run's status is
- * illegal.
- *
- * @author Donal Fellows
- * @see RemoteSingleRun#setStatus(RemoteStatus)
- */
-@WebFault(name = "IllegalStateTransitionFault", targetNamespace = "http://ns.taverna.org.uk/2010/xml/server/worker/")
-public class IllegalStateTransitionException extends Exception {
- private static final long serialVersionUID = 159673249162345L;
-
- public IllegalStateTransitionException() {
- this("illegal state transition");
- }
-
- public IllegalStateTransitionException(String message) {
- super(message);
- }
-
- public IllegalStateTransitionException(Throwable cause) {
- this("illegal state transition", cause);
- }
-
- public IllegalStateTransitionException(String message, Throwable cause) {
- super(message, cause);
- }
-}
http://git-wip-us.apache.org/repos/asf/incubator-taverna-server/blob/00397eff/taverna-server-runinterface/src/main/java/org/taverna/server/localworker/remote/ImplementationException.java
----------------------------------------------------------------------
diff --git a/taverna-server-runinterface/src/main/java/org/taverna/server/localworker/remote/ImplementationException.java b/taverna-server-runinterface/src/main/java/org/taverna/server/localworker/remote/ImplementationException.java
deleted file mode 100644
index 3e33fc7..0000000
--- a/taverna-server-runinterface/src/main/java/org/taverna/server/localworker/remote/ImplementationException.java
+++ /dev/null
@@ -1,39 +0,0 @@
-/*
- */
-package org.taverna.server.localworker.remote;
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-import javax.xml.ws.WebFault;
-
-/**
- * Exception that indicates that the implementation has gone wrong in some
- * unexpected way.
- *
- * @author Donal Fellows
- */
-@WebFault(name = "ImplementationFault", targetNamespace = "http://ns.taverna.org.uk/2010/xml/server/worker/")
-@SuppressWarnings("serial")
-public class ImplementationException extends Exception {
- public ImplementationException(String message) {
- super(message);
- }
-
- public ImplementationException(String message, Throwable cause) {
- super(message, cause);
- }
-}
http://git-wip-us.apache.org/repos/asf/incubator-taverna-server/blob/00397eff/taverna-server-runinterface/src/main/java/org/taverna/server/localworker/remote/RemoteDirectory.java
----------------------------------------------------------------------
diff --git a/taverna-server-runinterface/src/main/java/org/taverna/server/localworker/remote/RemoteDirectory.java b/taverna-server-runinterface/src/main/java/org/taverna/server/localworker/remote/RemoteDirectory.java
deleted file mode 100644
index 229d0b7..0000000
--- a/taverna-server-runinterface/src/main/java/org/taverna/server/localworker/remote/RemoteDirectory.java
+++ /dev/null
@@ -1,75 +0,0 @@
-/*
- */
-package org.taverna.server.localworker.remote;
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-import java.io.IOException;
-import java.rmi.RemoteException;
-import java.util.Collection;
-
-import javax.annotation.Nonnull;
-
-/**
- * Represents a directory that is the working directory of a workflow run, or a
- * sub-directory of it.
- *
- * @author Donal Fellows
- * @see RemoteFile
- */
-public interface RemoteDirectory extends RemoteDirectoryEntry {
- /**
- * @return A list of the contents of the directory.
- * @throws RemoteException
- * If anything goes wrong with the communication.
- * @throws IOException
- * If anything goes wrong with listing the directory.
- */
- @Nonnull
- public Collection<RemoteDirectoryEntry> getContents()
- throws RemoteException, IOException;
-
- /**
- * Creates a sub-directory of this directory.
- *
- * @param name
- * The name of the sub-directory.
- * @return A handle to the newly-created directory.
- * @throws RemoteException
- * If anything goes wrong with the communication.
- * @throws IOException
- * If things go wrong with creating the subdirectory.
- */
- @Nonnull
- public RemoteDirectory makeSubdirectory(@Nonnull String name)
- throws RemoteException, IOException;
-
- /**
- * Creates an empty file in this directory.
- *
- * @param name
- * The name of the file to create.
- * @return A handle to the newly-created file.
- * @throws RemoteException
- * If anything goes wrong with the communication.
- * @throws IOException
- * If anything goes wrong with creating the file.
- */
- @Nonnull
- public RemoteFile makeEmptyFile(@Nonnull String name)
- throws RemoteException, IOException;
-}
http://git-wip-us.apache.org/repos/asf/incubator-taverna-server/blob/00397eff/taverna-server-runinterface/src/main/java/org/taverna/server/localworker/remote/RemoteDirectoryEntry.java
----------------------------------------------------------------------
diff --git a/taverna-server-runinterface/src/main/java/org/taverna/server/localworker/remote/RemoteDirectoryEntry.java b/taverna-server-runinterface/src/main/java/org/taverna/server/localworker/remote/RemoteDirectoryEntry.java
deleted file mode 100644
index 9b77e79..0000000
--- a/taverna-server-runinterface/src/main/java/org/taverna/server/localworker/remote/RemoteDirectoryEntry.java
+++ /dev/null
@@ -1,75 +0,0 @@
-/*
- */
-package org.taverna.server.localworker.remote;
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-import java.io.IOException;
-import java.rmi.Remote;
-import java.rmi.RemoteException;
-import java.util.Date;
-
-import javax.annotation.Nonnull;
-import javax.annotation.Nullable;
-
-/**
- * An entry in a {@link RemoteDirectory} representing a file or sub-directory.
- *
- * @author Donal Fellows
- * @see RemoteDirectory
- * @see RemoteFile
- */
-public interface RemoteDirectoryEntry extends Remote {
- /**
- * @return The "local" name of the entry. This will never be "<tt>..</tt>"
- * or contain the character "<tt>/</tt>".
- * @throws RemoteException
- * If anything goes wrong with the communication.
- */
- @Nonnull
- public String getName() throws RemoteException;
-
- /**
- * @return The time when the entry was last modified.
- * @throws RemoteException
- * If anything goes wrong with the communication.
- */
- @Nonnull
- public Date getModificationDate() throws RemoteException;
-
- /**
- * Gets the directory containing this directory entry.
- *
- * @return A directory handle, or <tt>null</tt> if called on the workflow
- * run's working directory.
- * @throws RemoteException
- * If anything goes wrong with the communication.
- */
- @Nullable
- public RemoteDirectory getContainingDirectory() throws RemoteException;
-
- /**
- * Destroy this directory entry, deleting the file or sub-directory. The
- * workflow run's working directory can never be manually destroyed.
- *
- * @throws RemoteException
- * If anything goes wrong with the communication.
- * @throws IOException
- * If things go wrong when deleting the directory entry.
- */
- public void destroy() throws RemoteException, IOException;
-}
http://git-wip-us.apache.org/repos/asf/incubator-taverna-server/blob/00397eff/taverna-server-runinterface/src/main/java/org/taverna/server/localworker/remote/RemoteFile.java
----------------------------------------------------------------------
diff --git a/taverna-server-runinterface/src/main/java/org/taverna/server/localworker/remote/RemoteFile.java b/taverna-server-runinterface/src/main/java/org/taverna/server/localworker/remote/RemoteFile.java
deleted file mode 100644
index 63778db..0000000
--- a/taverna-server-runinterface/src/main/java/org/taverna/server/localworker/remote/RemoteFile.java
+++ /dev/null
@@ -1,111 +0,0 @@
-/*
- */
-package org.taverna.server.localworker.remote;
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-import java.io.IOException;
-import java.rmi.RemoteException;
-
-import javax.annotation.Nonnull;
-
-/**
- * Represents a file in the working directory of a workflow instance run, or in
- * some sub-directory of it.
- *
- * @author Donal Fellows
- * @see RemoteDirectory
- */
-public interface RemoteFile extends RemoteDirectoryEntry {
- /**
- * Read from the file.
- *
- * @param offset
- * Where in the file to read the bytes from.
- * @param length
- * How much of the file to read; -1 for "to the end".
- * @return The literal byte contents of the given section of the file.
- * @throws RemoteException
- * If anything goes wrong with the communication.
- * @throws IOException
- * If things go wrong reading the file.
- */
- @Nonnull
- byte[] getContents(int offset, int length) throws RemoteException,
- IOException;
-
- /**
- * Write the data to the file, totally replacing what was there before.
- *
- * @param data
- * The literal bytes that will form the new contents of the file.
- * @throws RemoteException
- * If anything goes wrong with the communication.
- * @throws IOException
- * If things go wrong writing the contents.
- */
- void setContents(@Nonnull byte[] data) throws RemoteException, IOException;
-
- /**
- * Append the data to the file.
- *
- * @param data
- * The literal bytes that will be appended.
- * @throws RemoteException
- * If anything goes wrong with the communication.
- * @throws IOException
- * If things go wrong writing the contents.
- */
- void appendContents(@Nonnull byte[] data) throws RemoteException,
- IOException;
-
- /**
- * @return The length of the file, in bytes.
- * @throws RemoteException
- * If anything goes wrong with the communication.
- */
- long getSize() throws RemoteException;
-
- /**
- * Copy from another file to this one.
- *
- * @param sourceFile
- * The other file to copy from.
- * @throws RemoteException
- * If anything goes wrong with the communication.
- * @throws IOException
- * If things go wrong during the copy.
- */
- void copy(@Nonnull RemoteFile sourceFile) throws RemoteException,
- IOException;
-
- /**
- * @return The full native OS name for the file.
- * @throws RemoteException
- * If anything goes wrong with the communication.
- */
- @Nonnull
- String getNativeName() throws RemoteException;
-
- /**
- * @return The host holding the file.
- * @throws RemoteException
- * If anything goes wrong with the communication.
- */
- @Nonnull
- String getNativeHost() throws RemoteException;
-}
http://git-wip-us.apache.org/repos/asf/incubator-taverna-server/blob/00397eff/taverna-server-runinterface/src/main/java/org/taverna/server/localworker/remote/RemoteInput.java
----------------------------------------------------------------------
diff --git a/taverna-server-runinterface/src/main/java/org/taverna/server/localworker/remote/RemoteInput.java b/taverna-server-runinterface/src/main/java/org/taverna/server/localworker/remote/RemoteInput.java
deleted file mode 100644
index b4fda9e..0000000
--- a/taverna-server-runinterface/src/main/java/org/taverna/server/localworker/remote/RemoteInput.java
+++ /dev/null
@@ -1,105 +0,0 @@
-/*
- */
-package org.taverna.server.localworker.remote;
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-import java.rmi.Remote;
-import java.rmi.RemoteException;
-
-import javax.annotation.Nonnull;
-import javax.annotation.Nullable;
-
-/**
- * This represents the assignment of inputs to input ports of the workflow. Note
- * that the <tt>file</tt> and <tt>value</tt> properties are never set at the
- * same time.
- *
- * @author Donal Fellows
- */
-public interface RemoteInput extends Remote {
- /**
- * @return The file currently assigned to this input port, or <tt>null</tt>
- * if no file is assigned.
- * @throws RemoteException
- * If anything goes wrong with the communication.
- */
- @Nullable
- String getFile() throws RemoteException;
-
- /**
- * @return The name of this input port. This may not be changed.
- * @throws RemoteException
- * If anything goes wrong with the communication.
- */
- @Nonnull
- String getName() throws RemoteException;
-
- /**
- * @return The value currently assigned to this input port, or <tt>null</tt>
- * if no value is assigned.
- * @throws RemoteException
- * If anything goes wrong with the communication.
- */
- @Nullable
- String getValue() throws RemoteException;
-
- /**
- * @return The delimiter currently used to split this input port's value
- * into a list, or <tt>null</tt> if no delimiter is to be used
- * (i.e., the value is a singleton).
- * @throws RemoteException
- * If anything goes wrong with the communication.
- */
- @Nullable
- String getDelimiter() throws RemoteException;
-
- /**
- * Sets the file to use for this input. This overrides the use of the
- * previous file and any set value.
- *
- * @param file
- * The filename to use. Must not start with a <tt>/</tt> or
- * contain any <tt>..</tt> segments. Will be interpreted relative
- * to the run's working directory.
- * @throws RemoteException
- * If anything goes wrong with the communication.
- */
- void setFile(@Nonnull String file) throws RemoteException;
-
- /**
- * Sets the value to use for this input. This overrides the use of the
- * previous value and any set file.
- *
- * @param value
- * The value to use.
- * @throws RemoteException
- * If anything goes wrong with the communication.
- */
- void setValue(@Nonnull String value) throws RemoteException;
-
- /**
- * Sets the delimiter used to split this input port's value into a list.
- *
- * @param delimiter
- * The delimiter character, or <tt>null</tt> if no delimiter is
- * to be used (i.e., the value is a singleton).
- * @throws RemoteException
- * If anything goes wrong with the communication.
- */
- void setDelimiter(@Nullable String delimiter) throws RemoteException;
-}
http://git-wip-us.apache.org/repos/asf/incubator-taverna-server/blob/00397eff/taverna-server-runinterface/src/main/java/org/taverna/server/localworker/remote/RemoteListener.java
----------------------------------------------------------------------
diff --git a/taverna-server-runinterface/src/main/java/org/taverna/server/localworker/remote/RemoteListener.java b/taverna-server-runinterface/src/main/java/org/taverna/server/localworker/remote/RemoteListener.java
deleted file mode 100644
index 2539f0d..0000000
--- a/taverna-server-runinterface/src/main/java/org/taverna/server/localworker/remote/RemoteListener.java
+++ /dev/null
@@ -1,90 +0,0 @@
-/*
- */
-package org.taverna.server.localworker.remote;
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-import java.rmi.Remote;
-import java.rmi.RemoteException;
-
-import javax.annotation.Nonnull;
-
-/**
- * An event listener that is attached to a {@link RemoteSingleRun}.
- *
- * @author Donal Fellows
- */
-public interface RemoteListener extends Remote {
- /**
- * @return The name of the listener.
- * @throws RemoteException
- * If anything goes wrong with the communication.
- */
- @Nonnull
- public String getName() throws RemoteException;
-
- /**
- * @return The type of the listener.
- * @throws RemoteException
- * If anything goes wrong with the communication.
- */
- @Nonnull
- public String getType() throws RemoteException;
-
- /**
- * @return The configuration document for the listener.
- * @throws RemoteException
- * If anything goes wrong with the communication.
- */
- @Nonnull
- public String getConfiguration() throws RemoteException;
-
- /**
- * @return The supported properties of the listener.
- * @throws RemoteException
- * If anything goes wrong with the communication.
- */
- @Nonnull
- public String[] listProperties() throws RemoteException;
-
- /**
- * Get the value of a particular property, which should be listed in the
- * {@link #listProperties()} method.
- *
- * @param propName
- * The name of the property to read.
- * @return The value of the property.
- * @throws RemoteException
- * If anything goes wrong with the communication.
- */
- @Nonnull
- public String getProperty(@Nonnull String propName) throws RemoteException;
-
- /**
- * Set the value of a particular property, which should be listed in the
- * {@link #listProperties()} method.
- *
- * @param propName
- * The name of the property to write.
- * @param value
- * The value to set the property to.
- * @throws RemoteException
- * If anything goes wrong with the communication.
- */
- public void setProperty(@Nonnull String propName, @Nonnull String value)
- throws RemoteException;
-}