|
Apache Tomcat 7.0.4 | ||||||||
| 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 Acknowledgement from other server. |
| 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 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
IOExceptionpublic String toString()
toString in class Object
protected void openSocket()
throws IOException
IOExceptionprotected void closeSocket()
disconnect()
protected void pushMessage(byte[] data,
boolean reconnect,
boolean waitForAck)
throws IOException
data - data to send
IOExceptioncloseSocket(),
openSocket(),
sendMessage(byte[], boolean)
protected void waitForAck()
throws IOException
IOException
SocketTimeoutException
|
Apache Tomcat 7.0.4 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||