Class AbstractSender
java.lang.Object
org.apache.catalina.tribes.transport.AbstractSender
- All Implemented Interfaces:
DataSender
- Direct Known Subclasses:
NioSender,ParallelNioSender,PooledSender
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintlongbooleanintlongintbooleanintgetPort()intintbooleanbooleanintbooleanintbooleanbooleanlongintintintintbooleanbooleanbooleanKeepalive.voidsetAddress(InetAddress address) voidsetAttempt(int attempt) protected voidsetConnected(boolean connected) voidsetConnectTime(long connectTime) voidsetDestination(Member destination) voidsetDirectBuffer(boolean directBuffer) voidsetKeepAliveCount(int keepAliveCount) Set the amount of requests during which to keepalive.voidsetKeepAliveTime(long keepAliveTime) Set the keepalive time.voidsetMaxRetryAttempts(int maxRetryAttempts) voidsetOoBInline(boolean ooBInline) voidsetPort(int port) voidsetRequestCount(int requestCount) voidsetRxBufSize(int rxBufSize) Set the receive buffer size.voidsetSoKeepAlive(boolean soKeepAlive) voidsetSoLingerOn(boolean soLingerOn) voidsetSoLingerTime(int soLingerTime) voidsetSoReuseAddress(boolean soReuseAddress) voidsetSoTrafficClass(int soTrafficClass) voidsetTcpNoDelay(boolean tcpNoDelay) voidsetThrowOnFailedAck(boolean throwOnFailedAck) voidsetTimeout(long timeout) Set the socket timeout.voidsetTxBufSize(int txBufSize) Set the transmit buffer size.voidsetUdpBased(boolean udpBased) voidsetUdpPort(int udpPort) voidsetUdpRxBufSize(int udpRxBufSize) voidsetUdpTxBufSize(int udpTxBufSize) static voidtransferProperties(AbstractSender from, AbstractSender to) transfers sender properties from one sender to anotherMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.apache.catalina.tribes.transport.DataSender
connect, disconnect
-
Constructor Details
-
AbstractSender
public AbstractSender()
-
-
Method Details
-
transferProperties
transfers sender properties from one sender to another- Parameters:
from- AbstractSenderto- AbstractSender
-
keepalive
public boolean keepalive()Description copied from interface:DataSenderKeepalive.- Specified by:
keepalivein interfaceDataSender- Returns:
trueif kept alive
-
setConnected
protected void setConnected(boolean connected) -
isConnected
public boolean isConnected()- Specified by:
isConnectedin interfaceDataSender- Returns:
trueif connected
-
getConnectTime
public long getConnectTime()- Specified by:
getConnectTimein interfaceDataSender- Returns:
- the time to connect
-
getDestination
-
getKeepAliveCount
public int getKeepAliveCount() -
getKeepAliveTime
public long getKeepAliveTime() -
getRequestCount
public int getRequestCount()- Specified by:
getRequestCountin interfaceDataSender- Returns:
- the request count
-
getRxBufSize
public int getRxBufSize() -
getTimeout
public long getTimeout() -
getTxBufSize
public int getTxBufSize() -
getAddress
-
getPort
public int getPort() -
getMaxRetryAttempts
public int getMaxRetryAttempts() -
setDirectBuffer
public void setDirectBuffer(boolean directBuffer) -
getDirectBuffer
public boolean getDirectBuffer() -
getAttempt
public int getAttempt() -
getTcpNoDelay
public boolean getTcpNoDelay() -
getSoKeepAlive
public boolean getSoKeepAlive() -
getOoBInline
public boolean getOoBInline() -
getSoReuseAddress
public boolean getSoReuseAddress() -
getSoLingerOn
public boolean getSoLingerOn() -
getSoLingerTime
public int getSoLingerTime() -
getSoTrafficClass
public int getSoTrafficClass() -
getThrowOnFailedAck
public boolean getThrowOnFailedAck() -
setKeepAliveCount
public void setKeepAliveCount(int keepAliveCount) Description copied from interface:DataSenderSet the amount of requests during which to keepalive.- Specified by:
setKeepAliveCountin interfaceDataSender- Parameters:
keepAliveCount- the amount of requests
-
setKeepAliveTime
public void setKeepAliveTime(long keepAliveTime) Description copied from interface:DataSenderSet the keepalive time.- Specified by:
setKeepAliveTimein interfaceDataSender- Parameters:
keepAliveTime- the time in ms
-
setRequestCount
public void setRequestCount(int requestCount) -
setRxBufSize
public void setRxBufSize(int rxBufSize) Description copied from interface:DataSenderSet the receive buffer size.- Specified by:
setRxBufSizein interfaceDataSender- Parameters:
rxBufSize- the new size
-
setTimeout
public void setTimeout(long timeout) Description copied from interface:DataSenderSet the socket timeout.- Specified by:
setTimeoutin interfaceDataSender- Parameters:
timeout- in ms
-
setTxBufSize
public void setTxBufSize(int txBufSize) Description copied from interface:DataSenderSet the transmit buffer size.- Specified by:
setTxBufSizein interfaceDataSender- Parameters:
txBufSize- the new size
-
setConnectTime
public void setConnectTime(long connectTime) -
setMaxRetryAttempts
public void setMaxRetryAttempts(int maxRetryAttempts) -
setAttempt
public void setAttempt(int attempt) -
setTcpNoDelay
public void setTcpNoDelay(boolean tcpNoDelay) -
setSoKeepAlive
public void setSoKeepAlive(boolean soKeepAlive) -
setOoBInline
public void setOoBInline(boolean ooBInline) -
setSoReuseAddress
public void setSoReuseAddress(boolean soReuseAddress) -
setSoLingerOn
public void setSoLingerOn(boolean soLingerOn) -
setSoLingerTime
public void setSoLingerTime(int soLingerTime) -
setSoTrafficClass
public void setSoTrafficClass(int soTrafficClass) -
setThrowOnFailedAck
public void setThrowOnFailedAck(boolean throwOnFailedAck) -
setDestination
- Throws:
UnknownHostException
-
setPort
public void setPort(int port) -
setAddress
-
isUdpBased
public boolean isUdpBased() -
setUdpBased
public void setUdpBased(boolean udpBased) -
getUdpPort
public int getUdpPort() -
setUdpPort
public void setUdpPort(int udpPort) -
getUdpRxBufSize
public int getUdpRxBufSize() -
setUdpRxBufSize
public void setUdpRxBufSize(int udpRxBufSize) -
getUdpTxBufSize
public int getUdpTxBufSize() -
setUdpTxBufSize
public void setUdpTxBufSize(int udpTxBufSize)
-