tmf: Move plugins to their own sub-directory
[deliverable/tracecompass.git] / tmf / org.eclipse.tracecompass.tmf.remote.core / src / org / eclipse / tracecompass / tmf / remote / core / shell / ICommandInput.java
diff --git a/tmf/org.eclipse.tracecompass.tmf.remote.core/src/org/eclipse/tracecompass/tmf/remote/core/shell/ICommandInput.java b/tmf/org.eclipse.tracecompass.tmf.remote.core/src/org/eclipse/tracecompass/tmf/remote/core/shell/ICommandInput.java
new file mode 100644 (file)
index 0000000..a8e9573
--- /dev/null
@@ -0,0 +1,53 @@
+/**********************************************************************
+ * Copyright (c) 2015 Ericsson
+ *
+ * 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:
+ *   Bernd Hufmann - Initial API and implementation
+ *   Markus Schorn - Bug 448058: Use org.eclipse.remote in favor of RSE
+ **********************************************************************/
+package org.eclipse.tracecompass.tmf.remote.core.shell;
+
+import java.util.List;
+
+import org.eclipse.jdt.annotation.Nullable;
+
+/**
+ * Interface for creating a command input to executued in a
+ * {@link ICommandShell} implementation.
+ *
+ * @author Bernd Hufmann
+ */
+public interface ICommandInput {
+
+    /**
+     * Return the command output.
+     *
+     * It should not be null, but could be empty.
+     * It should return an immutable list.
+     *
+     * @return the command output.
+     */
+    List<String> getInput();
+
+    /**
+     * Adds a command segment to the command
+     *
+     * @param segment
+     *            the command segment to add. Ignored if null.
+     */
+    void add(@Nullable String segment);
+
+    /**
+     * Adds a command segments to the command
+     *
+     * @param segments
+     *            the command segments to add. Ignored if null.
+     *            Any null segment in list will be ignored too.
+     */
+    void addAll(List<String> segments);
+}
This page took 0.025304 seconds and 5 git commands to generate.