public class BioSender extends AbstractSender
| Modifier and Type | Field and Description | 
|---|---|
| protected XByteBuffer | ackbuf | 
| protected static StringManager | smThe string manager for this package. | 
| Constructor and Description | 
|---|
| BioSender() | 
| Modifier and Type | Method and Description | 
|---|---|
| protected void | closeSocket()Close socket. | 
| void | connect()Connect other cluster member receiver | 
| void | disconnect()disconnect and close socket | 
| String | getInfo() | 
| protected void | openSocket()Open real socket and set time out when waitForAck is enabled
 is socket open return directly. | 
| protected void | pushMessage(byte[] data,
           boolean reconnect,
           boolean waitForAck)Push messages with only one socket at a time
 Wait for ack is needed and make auto retry when write message is failed. | 
| void | sendMessage(byte[] data,
           boolean waitForAck)Send message. | 
| String | toString() | 
| protected void | waitForAck()Wait for Acknowledgement from other server. | 
getAddress, getAttempt, getConnectTime, getDestination, getDirect, getDirectBuffer, getKeepAliveCount, getKeepAliveTime, getMaxRetryAttempts, getOoBInline, getPort, getRequestCount, getRxBufSize, getSoKeepAlive, getSoLingerOn, getSoLingerTime, getSoReuseAddress, getSoTrafficClass, getTcpNoDelay, getThrowOnFailedAck, getTimeout, getTxBufSize, getUdpPort, getUdpRxBufSize, getUdpTxBufSize, isConnected, isUdpBased, keepalive, setAddress, setAttempt, setConnected, setConnectTime, setDestination, setDirect, setDirectBuffer, setKeepAliveCount, setKeepAliveTime, setMaxRetryAttempts, setOoBInline, setPort, setRequestCount, setRxBufSize, setSoKeepAlive, setSoLingerOn, setSoLingerTime, setSoReuseAddress, setSoTrafficClass, setTcpNoDelay, setThrowOnFailedAck, setTimeout, setTxBufSize, setUdpBased, setUdpPort, setUdpRxBufSize, setUdpTxBufSize, transferPropertiesprotected static final StringManager sm
protected XByteBuffer ackbuf
public String getInfo()
<description>/<version>.public void connect()
             throws IOException
connect in interface DataSenderconnect in class AbstractSenderIOException - TODO Implement this org.apache.catalina.tribes.transport.DataSender methodDataSender.connect()public void disconnect()
disconnect in interface DataSenderdisconnect in class AbstractSenderDataSender.disconnect()public void sendMessage(byte[] data,
               boolean waitForAck)
                 throws IOException
data - The data to sendwaitForAck - Wait for an ackIOException - An IO error occurred sending the messageprotected void openSocket()
                   throws IOException
IOException - Error opening socketprotected void closeSocket()
disconnect()protected void pushMessage(byte[] data,
               boolean reconnect,
               boolean waitForAck)
                    throws IOException
data - Data to sendreconnect - Do a reconnect (close socket then reopen)waitForAck - Wait for an acknowledgementIOException - IO error writing datacloseSocket(), 
openSocket(), 
sendMessage(byte[], boolean)protected void waitForAck()
                   throws IOException
IOException - An IO error occurredCopyright © 2000-2020 Apache Software Foundation. All Rights Reserved.