com.sun.grizzly.http
Class KeepAliveThreadAttachment

java.lang.Object
  extended by com.sun.grizzly.util.SelectionKeyAttachment
      extended by com.sun.grizzly.util.SelectionKeyActionAttachment
          extended by com.sun.grizzly.util.ThreadAttachment
              extended by com.sun.grizzly.http.KeepAliveThreadAttachment
All Implemented Interfaces:
AttributeHolder

public class KeepAliveThreadAttachment
extends ThreadAttachment

Add keep alive counting mechanism to the ThreadAttachement.

Author:
Jeanfrancois Arcand

Nested Class Summary
 
Nested classes/interfaces inherited from class com.sun.grizzly.util.ThreadAttachment
ThreadAttachment.Mode
 
Field Summary
 
Fields inherited from class com.sun.grizzly.util.SelectionKeyAttachment
UNLIMITED_TIMEOUT
 
Constructor Summary
KeepAliveThreadAttachment()
           
 
Method Summary
 int increaseKeepAliveCount()
          Increase the keep=alibe keepAliveCount by one.
 void resetKeepAliveCount()
          Reset the keep alive value to 0.
 void setKeepAliveStats(KeepAliveStats keepAliveStats)
          Set the KeepAliveStats instance used to collect request statistic.
 
Methods inherited from class com.sun.grizzly.util.ThreadAttachment
activeThread, associate, deassociate, getActiveThreadTimeout, getAttribute, getAttributes, getByteBuffer, getInputBB, getMode, getOutputBB, getSSLEngine, getThreadId, postProcess, process, release, removeAttribute, reset, setActiveThreadTimeout, setAttribute, setAttributes, setByteBuffer, setInputBB, setMode, setOutputBB, setSSLEngine, setThreadId, toString
 
Methods inherited from class com.sun.grizzly.util.SelectionKeyAttachment
getAttachment, getIdleTimeoutDelay, getTimeout, setTimeout
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

KeepAliveThreadAttachment

public KeepAliveThreadAttachment()
Method Detail

setKeepAliveStats

public void setKeepAliveStats(KeepAliveStats keepAliveStats)
Set the KeepAliveStats instance used to collect request statistic.

Parameters:
k - the KeepAliveStats instance used to collect request statistic.

increaseKeepAliveCount

public int increaseKeepAliveCount()
Increase the keep=alibe keepAliveCount by one.


resetKeepAliveCount

public void resetKeepAliveCount()
Reset the keep alive value to 0.



Copyright © 2009 SUN Microsystems. All Rights Reserved.