public class

KeepAliveStreamCleaner

extends LinkedBlockingQueue<E>
implements Runnable
java.lang.Object
   ↳ java.util.AbstractCollection<E>
     ↳ java.util.AbstractQueue<E>
       ↳ java.util.concurrent.LinkedBlockingQueue<E>
         ↳ sun.net.www.http.KeepAliveStreamCleaner

Class Overview

This class is used to cleanup any remaining data that may be on a KeepAliveStream so that the connection can be cached in the KeepAliveCache. Instances of this class can be used as a FIFO queue for KeepAliveCleanerEntry objects. Executing this Runnable removes each KeepAliveCleanerEntry from the Queue, reads the reamining bytes on its KeepAliveStream, and if successful puts the connection in the KeepAliveCache.

Summary

Constants
int TIMEOUT
Fields
protected static int MAX_CAPACITY
protected static int MAX_DATA_REMAINING
Public Constructors
KeepAliveStreamCleaner()
KeepAliveStreamCleaner(int capacity)
Public Methods
void run()
When an object implementing interface Runnable is used to create a thread, starting the thread causes the object's run method to be called in that separately executing thread.
[Expand]
Inherited Methods
From class java.util.concurrent.LinkedBlockingQueue
From class java.util.AbstractQueue
From class java.util.AbstractCollection
From class java.lang.Object
From interface java.lang.Iterable
From interface java.lang.Runnable
From interface java.util.Collection
From interface java.util.Queue
From interface java.util.concurrent.BlockingQueue

Constants

protected static final int TIMEOUT

Constant Value: 5000 (0x00001388)

Fields

protected static int MAX_CAPACITY

protected static int MAX_DATA_REMAINING

Public Constructors

public KeepAliveStreamCleaner ()

public KeepAliveStreamCleaner (int capacity)

Public Methods

public void run ()

When an object implementing interface Runnable is used to create a thread, starting the thread causes the object's run method to be called in that separately executing thread.

The general contract of the method run is that it may take any action whatsoever.