com.sun.enterprise.web.connector.grizzly
Interface ReadTask

All Superinterfaces:
Callable, Runnable, Task
All Known Implementing Classes:
AsyncReadTask, DefaultReadTask, ReadBlockingTask, SSLAsyncReadTask, SSLReadTask, XAReadTask

public interface ReadTask
extends Task

Main Task to handle OP_READ.

Author:
Jeanfrancois Arcand

Field Summary
 
Fields inherited from interface com.sun.enterprise.web.connector.grizzly.Task
ACCEPT_TASK, PROCESSOR_TASK, READ_TASK
 
Method Summary
 void attachProcessor(ProcessorTask processorTask)
          Force this task to always use the same ProcessorTask instance.
 void detachProcessor()
          Return the ProcessorTask to the pool.
 ByteBuffer getByteBuffer()
          Return the underlying ByteBuffer used by this class.
 long getIdleTime()
          Return the time in milliseconds this Task is allowed to be idle.
 void initialize(StreamAlgorithm algorithm, boolean useDirectByteBuffer, boolean useByteBufferView)
           
 void setBytesAvailable(boolean bytesAvailable)
          If the attached byteBuffer was already filled, tell the Algorithm to re-use the bytes.
 void setIdleTime(long time)
          Set the time in milliseconds this Task is allowed to be idle.
 void terminate(boolean keepAlive)
          Complete the processing.
 
Methods inherited from interface com.sun.enterprise.web.connector.grizzly.Task
addTaskListener, cancelTask, clearTaskListeners, doTask, execute, getKeepAliveStats, getPipeline, getRecycle, getRequestGroupInfo, getSelectionKey, getSelectorThread, getTaskListeners, getType, isMonitoringEnabled, recycle, removeTaskListener, setPipeline, setRecycle, setSelectionKey, setSelectorThread
 
Methods inherited from interface java.lang.Runnable
run
 
Methods inherited from interface java.util.concurrent.Callable
call
 

Method Detail

attachProcessor

void attachProcessor(ProcessorTask processorTask)
Force this task to always use the same ProcessorTask instance.


detachProcessor

void detachProcessor()
Return the ProcessorTask to the pool.


getByteBuffer

ByteBuffer getByteBuffer()
Return the underlying ByteBuffer used by this class.


initialize

void initialize(StreamAlgorithm algorithm,
                boolean useDirectByteBuffer,
                boolean useByteBufferView)

setBytesAvailable

void setBytesAvailable(boolean bytesAvailable)
If the attached byteBuffer was already filled, tell the Algorithm to re-use the bytes.


terminate

void terminate(boolean keepAlive)
Complete the processing.


setIdleTime

void setIdleTime(long time)
Set the time in milliseconds this Task is allowed to be idle.


getIdleTime

long getIdleTime()
Return the time in milliseconds this Task is allowed to be idle.



Copyright © 2005-2015 Oracle Corporation. All Rights Reserved.