public class TcpStatusConnection extends TcpConnection implements StatusConnectionWithWriteLogging
Modifier and Type | Field and Description |
---|---|
static int |
DEFAULT_STATUS_TCP_PORT
The default Status TCP port for ZPL devices.
|
DEFAULT_CPCL_TCP_PORT, DEFAULT_ZPL_TCP_PORT, isCardPrinter, serialNumber
Constructor and Description |
---|
TcpStatusConnection(String address,
int port)
Initializes a new status only instance of the
TcpConnection class. |
TcpStatusConnection(String address,
int port,
int maxTimeoutForRead,
int timeToWaitForMoreData)
Initializes a new status only instance of the
TcpConnection class. |
Modifier and Type | Method and Description |
---|---|
String |
getSimpleConnectionName()
Return the IP address and the status port as the description.
|
String |
toString()
Returns
TCP_STATUS :[address]:[port number].The address and port number are the parameters which were passed into the constructor. |
getAddress, getConnectionReestablisher, getPortNumber
addWriteLogStream, bytesAvailable, close, getManufacturer, getMaxDataToWrite, getMaxTimeoutForRead, getTimeToWaitForMoreData, isConnected, open, read, read, read, read, readChar, sendAndWaitForResponse, sendAndWaitForResponse, sendAndWaitForValidResponse, sendAndWaitForValidResponse, setMaxDataToWrite, setMaxTimeoutForRead, setReadTimeout, setTimeToWaitForMoreData, waitForData, write, write, write
addWriteLogStream
bytesAvailable, close, getConnectionReestablisher, getMaxTimeoutForRead, getTimeToWaitForMoreData, isConnected, open, read, read, readChar, sendAndWaitForResponse, sendAndWaitForResponse, sendAndWaitForValidResponse, sendAndWaitForValidResponse, setMaxTimeoutForRead, setTimeToWaitForMoreData, waitForData, write, write, write
public static final int DEFAULT_STATUS_TCP_PORT
public TcpStatusConnection(String address, int port)
TcpConnection
class. This constructor will use the
default timeouts for Connection.read()
. The default timeout is a maximum of 5 seconds for any data
to be received. If no more data is available after 500 milliseconds the read operation is assumed to be complete.TcpStatusConnection(String, int, int, int)
.address
- the IP Address or DNS Hostname.port
- the port number.public TcpStatusConnection(String address, int port, int maxTimeoutForRead, int timeToWaitForMoreData)
TcpConnection
class. This constructor will use the
specified timeouts for Connection.read()
. The timeout is a maximum of
maxTimeoutForRead
milliseconds for any data to be received. If no more data is available after
timeToWaitForMoreData
milliseconds the read operation is assumed to be complete.address
- the IP Address or DNS Hostname.port
- the port number.maxTimeoutForRead
- the maximum time, in milliseconds, to wait for any data to be received.timeToWaitForMoreData
- the maximum time, in milliseconds, to wait in-between reads after the initial read.public String toString()
TCP_STATUS
:[address]:[port number].address
and port number
are the parameters which were passed into the constructor.toString
in interface Connection
toString
in class TcpConnection
Connection.toString()
public String getSimpleConnectionName()
getSimpleConnectionName
in interface Connection
getSimpleConnectionName
in class TcpConnection
Connection.getSimpleConnectionName()
© 2017 ZIH Corp. All Rights Reserved.