public abstract class SocketConnection extends Object
Constructor and Description |
---|
SocketConnection() |
SocketConnection(int connectTimeout)
Creates a socket connection, setting the connect timeout.
|
Modifier and Type | Method and Description |
---|---|
abstract void |
connectionError(int errorCode,
String message)
Invoked in case of an error in the socket connection, this method is invoked off the EDT
|
abstract void |
connectionEstablished(InputStream is,
OutputStream os)
Invoked when a socket connection is established, this method is invoked off the EDT
|
int |
getConnectTimeout()
Gets the connect timeout.
|
boolean |
isConnected()
Returns true if this connection is currently active
|
void |
setConnectTimeout(int connectTimeout)
Sets the connect timeout.
|
public SocketConnection()
public SocketConnection(int connectTimeout)
connectTimeout
- The connect timeout. 0 for infinite.public abstract void connectionError(int errorCode, String message)
errorCode
- the error codemessage
- error message if applicablepublic abstract void connectionEstablished(InputStream is, OutputStream os)
is
- input stream for the socketos
- output stream for the socketpublic boolean isConnected()
public void setConnectTimeout(int connectTimeout)
connectTimeout
- The connect timeout. 0 for infinite timeout.public int getConnectTimeout()