Class BioSender
- java.lang.Object
-
- org.apache.catalina.tribes.transport.AbstractSender
-
- org.apache.catalina.tribes.transport.bio.BioSender
-
- All Implemented Interfaces:
DataSender
@Deprecated public class BioSender extends AbstractSender
Deprecated.This will be removed in Tomcat 10Send cluster messages with only one socket. Ack and keep Alive Handling is supported- Since:
- 5.5.16
- Author:
- Peter Rossbach
-
-
Field Summary
Fields Modifier and Type Field Description protected XByteBufferackbufDeprecated.protected static StringManagersmDeprecated.The string manager for this package.
-
Constructor Summary
Constructors Constructor Description BioSender()Deprecated.
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description protected voidcloseSocket()Deprecated.Close socket.voidconnect()Deprecated.Connect other cluster member receivervoiddisconnect()Deprecated.disconnect and close socketprotected voidopenSocket()Deprecated.Open real socket and set time out when waitForAck is enabled is socket open return directly.protected voidpushMessage(byte[] data, boolean reconnect, boolean waitForAck)Deprecated.Push messages with only one socket at a time Wait for ack is needed and make auto retry when write message is failed.voidsendMessage(byte[] data, boolean waitForAck)Deprecated.Send message.java.lang.StringtoString()Deprecated.protected voidwaitForAck()Deprecated.Wait for Acknowledgement from other server.-
Methods inherited from class org.apache.catalina.tribes.transport.AbstractSender
getAddress, getAttempt, getConnectTime, getDestination, 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, setDirectBuffer, setKeepAliveCount, setKeepAliveTime, setMaxRetryAttempts, setOoBInline, setPort, setRequestCount, setRxBufSize, setSoKeepAlive, setSoLingerOn, setSoLingerTime, setSoReuseAddress, setSoTrafficClass, setTcpNoDelay, setThrowOnFailedAck, setTimeout, setTxBufSize, setUdpBased, setUdpPort, setUdpRxBufSize, setUdpTxBufSize, transferProperties
-
-
-
-
Field Detail
-
sm
protected static final StringManager sm
Deprecated.The string manager for this package.
-
ackbuf
protected final XByteBuffer ackbuf
Deprecated.
-
-
Method Detail
-
connect
public void connect() throws java.io.IOExceptionDeprecated.Connect other cluster member receiver- Specified by:
connectin interfaceDataSender- Specified by:
connectin classAbstractSender- Throws:
java.io.IOException- TODO Implement this org.apache.catalina.tribes.transport.DataSender method- See Also:
DataSender.connect()
-
disconnect
public void disconnect()
Deprecated.disconnect and close socket- Specified by:
disconnectin interfaceDataSender- Specified by:
disconnectin classAbstractSender- See Also:
DataSender.disconnect()
-
sendMessage
public void sendMessage(byte[] data, boolean waitForAck) throws java.io.IOExceptionDeprecated.Send message.- Parameters:
data- The data to sendwaitForAck- Wait for an ack- Throws:
java.io.IOException- An IO error occurred sending the message
-
toString
public java.lang.String toString()
Deprecated.- Overrides:
toStringin classjava.lang.Object
-
openSocket
protected void openSocket() throws java.io.IOExceptionDeprecated.Open real socket and set time out when waitForAck is enabled is socket open return directly.- Throws:
java.io.IOException- Error opening socket
-
closeSocket
protected void closeSocket()
Deprecated.Close socket.- See Also:
disconnect()
-
pushMessage
protected void pushMessage(byte[] data, boolean reconnect, boolean waitForAck) throws java.io.IOExceptionDeprecated.Push messages with only one socket at a time Wait for ack is needed and make auto retry when write message is failed. After sending error close and reopen socket again. After successful sending update stats WARNING: Subclasses must be very careful that only one thread call this pushMessage at once!!!- Parameters:
data- Data to sendreconnect- Do a reconnect (close socket then reopen)waitForAck- Wait for an acknowledgement- Throws:
java.io.IOException- IO error writing data- Since:
- 5.5.10
- See Also:
closeSocket(),openSocket(),sendMessage(byte[], boolean)
-
waitForAck
protected void waitForAck() throws java.io.IOExceptionDeprecated.Wait for Acknowledgement from other server. FIXME Please, not wait only for three characters, better control that the wait ack message is correct.- Throws:
java.io.IOException- An IO error occurred
-
-