blob: 481c7bff74055801b65f732c1a02405ce284763c (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
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) ;
}
|