Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'proctools/plugins/org.eclipse.sequoyah.device.linuxtools.base/src/org/eclipse/sequoyah/linuxtools/network/IConnectionProvider.java')
-rw-r--r--proctools/plugins/org.eclipse.sequoyah.device.linuxtools.base/src/org/eclipse/sequoyah/linuxtools/network/IConnectionProvider.java74
1 files changed, 74 insertions, 0 deletions
diff --git a/proctools/plugins/org.eclipse.sequoyah.device.linuxtools.base/src/org/eclipse/sequoyah/linuxtools/network/IConnectionProvider.java b/proctools/plugins/org.eclipse.sequoyah.device.linuxtools.base/src/org/eclipse/sequoyah/linuxtools/network/IConnectionProvider.java
new file mode 100644
index 0000000000..481c7bff74
--- /dev/null
+++ b/proctools/plugins/org.eclipse.sequoyah.device.linuxtools.base/src/org/eclipse/sequoyah/linuxtools/network/IConnectionProvider.java
@@ -0,0 +1,74 @@
+/********************************************************************************
+ * Copyright (c) 2008 Motorola Inc. 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
+ *
+ * Initial Contributor:
+ * Otávio Ferranti (Motorola)
+ *
+ * Contributors:
+ * {Name} (company) - description of contribution.
+ ********************************************************************************/
+
+package org.eclipse.tml.linuxtools.network;
+
+import java.io.IOException;
+
+import org.eclipse.tml.linuxtools.tools.INotifier;
+import org.eclipse.tml.linuxtools.network.IConstants.CommandCode;;
+
+/**
+ * @author Otávio Ferranti
+ */
+public interface IConnectionProvider extends INotifier{
+
+ /**
+ * This method will be executed in a separated thread and will produce
+ * an event to be sent to the registered listeners.
+ * @param host
+ * @param port
+ * @throws IOException
+ */
+ public void connect(String host, int port) throws IOException ;
+
+ /**
+ * @throws IOException
+ */
+ public void disconnect() throws IOException ;
+
+ /**
+ * This method will be executed in a separated thread and will produce
+ * an event to be sent to the registered listeners.
+ * @param user
+ * @param password
+ * @throws IOException
+ */
+ public void login(String user, String password) throws IOException ;
+
+ /**
+ * Retrieves the last response.
+ * @return
+ */
+ public StringBuffer getLastResponde() ;
+
+ /**
+ * Sends a command to be executed and waits for the results.
+ * @param command
+ * @throws IOException
+ */
+ public void sendCommand(CommandCode cmd, String cmdStr) throws IOException ;
+
+ /**
+ * Sends some command or data without waiting any response or result.
+ * @param out
+ */
+ public void sendData(String out) ;
+
+ /**
+ * Sets the maximum response length.
+ * @param maxLength
+ */
+ public void setResponseLength(int maxLength) ;
+
+}

Back to the top