|
Openfire 3.3.3 Javadoc | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.jivesoftware.openfire.net.SocketSendingTracker
public class SocketSendingTracker
A SocketSendingTracker keeps track of all the sockets that are currently sending data and checks the health of the sockets to detect hanged connections. If a sending operation takes too much time (i.e. exceeds a time limit) then it is assumed that the connection has been lost and for some reason the JVM has not been notified of the dead connection. Once a dead connection has been detected it will be closed so that the thread that was writing to the socket can resume. Resuming locked threads is important since otherwise a complete system halt may occur.
The time limit to wait before considering a connection dead can be configured changing the property xmpp.session.sending-limit. If the property was not defined then a default time limit of 60 seconds will be assumed. This means that by default if a sending operation takes longer than 60 seconds then the connection will be closed and the client disconnected. Therefore, it is important to not set a very low time limit since active clients may be incorrectly considered as dead clients.
Method Summary | |
---|---|
static SocketSendingTracker |
getInstance()
Returns the unique instance of this class. |
void |
shutdown()
Indicates that the checking thread should be stoped. |
void |
start()
Start up the daemon thread that will check for the health of the sockets that are currently sending data. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static SocketSendingTracker getInstance()
public void start()
public void shutdown()
|
Openfire 3.3.3 Javadoc | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |