public class TcpIpConnection extends Connection
Connection.State
Modifier and Type | Field and Description |
---|---|
static int |
DEFAULT_RESPONSE_TIMEOUT_OFFSET |
DEFAULT_BAUDRATE, is, os
Constructor and Description |
---|
TcpIpConnection() |
TcpIpConnection(String host,
int port) |
TcpIpConnection(String host,
int port,
int bitPerSecond,
int responseTimeoutOffset) |
Modifier and Type | Method and Description |
---|---|
void |
close() |
boolean |
equals(Object obj) |
void |
fromJSON(net.sf.json.JSONObject json) |
String |
getHost() |
String |
getJsonFieldName() |
String |
getName() |
int |
getPort() |
int |
hashCode() |
void |
open() |
void |
setHost(String host) |
void |
setPort(int port) |
net.sf.json.JSONObject |
toJSON(JsonSerializeType jsonSerializeType) |
String |
toString() |
createFromJSON, getBitPerSecond, getConnState, getInputStream, getLoggingStream, getOutputStrteam, getResponseTimeOutOffset, setBitPerSecond, setConnState, setLoggingStream, setResponseTimeOutOffset
public static final int DEFAULT_RESPONSE_TIMEOUT_OFFSET
public TcpIpConnection()
public TcpIpConnection(String host, int port)
public TcpIpConnection(String host, int port, int bitPerSecond, int responseTimeoutOffset)
public void open() throws IOException
open
in class Connection
IOException
public void close() throws IOException
IOException
public net.sf.json.JSONObject toJSON(JsonSerializeType jsonSerializeType)
toJSON
in interface JSONSerializable
toJSON
in class Connection
public void fromJSON(net.sf.json.JSONObject json)
fromJSON
in interface JSONSerializable
fromJSON
in class Connection
public String getHost()
public int getPort()
public void setHost(String host)
public void setPort(int port)
public String getJsonFieldName()
getJsonFieldName
in class Connection
public String getName()
getName
in class Connection
Copyright © 2009–2016 MBus4J. All rights reserved.