|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.catalina.tribes.transport.AbstractSender
org.apache.catalina.tribes.transport.bio.BioSender
public class BioSender
Send cluster messages with only one socket. Ack and keep Alive Handling is supported
| Field Summary | |
|---|---|
protected XByteBuffer |
ackbuf
|
protected static StringManager |
sm
The string manager for this package. |
| Constructor Summary | |
|---|---|
BioSender()
|
|
| Method Summary | |
|---|---|
protected void |
closeSocket()
close socket |
void |
connect()
Connect other cluster member receiver |
void |
disconnect()
disconnect and close socket |
String |
getInfo()
Return descriptive information about this implementation and the corresponding version number, in the format <description>/<version>. |
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()
Name of this SockerSender |
protected void |
waitForAck()
Wait for Acknowledgment from other server FIXME Please, not wait only for three characters, better control that the wait ack message is correct. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
protected static final StringManager sm
protected XByteBuffer ackbuf
| Constructor Detail |
|---|
public BioSender()
| Method Detail |
|---|
public String getInfo()
<description>/<version>.
public void connect()
throws IOException
connect in interface DataSenderconnect in class AbstractSenderIOExceptiontribes.transport.IDataSenderpublic void disconnect()
disconnect in interface DataSenderdisconnect in class AbstractSenderIDataSender#disconnect()
public void sendMessage(byte[] data,
boolean waitForAck)
throws IOException
IOExceptiontribes.transport.IDataSenderpublic String toString()
toString in class Object
protected void openSocket()
throws IOException
IOExceptionprotected void closeSocket()
DataSender.disconnect(),
DataSender#closeSocket()
protected void pushMessage(byte[] data,
boolean reconnect,
boolean waitForAck)
throws IOException
data - data to send
IOExceptioncloseSocket(),
openSocket(),
#writeData(ChannelMessage)
protected void waitForAck()
throws IOException
timeout -
IOException
SocketTimeoutException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||