org.apache.catalina.cluster.tcp
Class PooledSocketSender
java.lang.Object
org.apache.catalina.cluster.tcp.PooledSocketSender
- All Implemented Interfaces:
- IDataSender
- public class PooledSocketSender
- extends java.lang.Object
- implements IDataSender
Send cluster messages with a pool of sockets (25).
- Version:
- 1.1
- Author:
- Filip Hanik, Peter Rossbach
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
PooledSocketSender
public PooledSocketSender(java.net.InetAddress host,
int port)
getNrOfRequests
public long getNrOfRequests()
- Returns:
- Returns the nrOfRequests.
getTotalBytes
public long getTotalBytes()
- Returns:
- Returns the totalBytes.
getAddress
public java.net.InetAddress getAddress()
- Specified by:
getAddress
in interface IDataSender
getPort
public int getPort()
- Specified by:
getPort
in interface IDataSender
connect
public void connect()
throws java.io.IOException
- Specified by:
connect
in interface IDataSender
- Throws:
java.io.IOException
disconnect
public void disconnect()
- Specified by:
disconnect
in interface IDataSender
isConnected
public boolean isConnected()
- Specified by:
isConnected
in interface IDataSender
setAckTimeout
public void setAckTimeout(long timeout)
- Specified by:
setAckTimeout
in interface IDataSender
getAckTimeout
public long getAckTimeout()
setMaxPoolSocketLimit
public void setMaxPoolSocketLimit(int limit)
getMaxPoolSocketLimit
public int getMaxPoolSocketLimit()
sendMessage
public void sendMessage(java.lang.String sessionId,
byte[] data)
throws java.io.IOException
- Blocking send
- Specified by:
sendMessage
in interface IDataSender
- Parameters:
data
-
- Throws:
java.io.IOException
toString
public java.lang.String toString()
getSuspect
public boolean getSuspect()
- Specified by:
getSuspect
in interface IDataSender
setSuspect
public void setSuspect(boolean suspect)
- Specified by:
setSuspect
in interface IDataSender
getKeepAliveTimeout
public long getKeepAliveTimeout()
setKeepAliveTimeout
public void setKeepAliveTimeout(long keepAliveTimeout)
getKeepAliveMaxRequestCount
public int getKeepAliveMaxRequestCount()
setKeepAliveMaxRequestCount
public void setKeepAliveMaxRequestCount(int keepAliveMaxRequestCount)
getKeepAliveConnectTime
public long getKeepAliveConnectTime()
- Returns:
- Returns the keepAliveConnectTime.
getKeepAliveCount
public int getKeepAliveCount()
- Returns:
- Returns the keepAliveCount.
Copyright © 2000-2005 Apache Software Foundation. All Rights Reserved.