com.sun.enterprise.web.connector.grizzly.blocking
Class ReadBlockingTask

java.lang.Object
  extended by com.sun.enterprise.web.connector.grizzly.TaskBase
      extended by com.sun.enterprise.web.connector.grizzly.DefaultReadTask
          extended by com.sun.enterprise.web.connector.grizzly.blocking.ReadBlockingTask
All Implemented Interfaces:
ReadTask, Task, TaskListener, Runnable, Callable

public class ReadBlockingTask
extends DefaultReadTask

Process a blocking socket. By default, SSL is using blocking mode.

Author:
Jean-Francois Arcand

Field Summary
protected  boolean isSecure
          If the Task handling an SSL based request.
protected  PipelineStatistic pipelineStat
          The PipelineStatistic objects used when gathering statistics.
 
Fields inherited from class com.sun.enterprise.web.connector.grizzly.DefaultReadTask
algorithm, byteBuffer, bytesAvailable, inputStream, maxPostSize, processorTask, taskContext, taskEvent, useByteBufferView, useDirectByteBuffer
 
Fields inherited from class com.sun.enterprise.web.connector.grizzly.TaskBase
key, listeners, pipeline, recycle, selectorThread, type
 
Fields inherited from interface com.sun.enterprise.web.connector.grizzly.Task
ACCEPT_TASK, PROCESSOR_TASK, READ_TASK
 
Constructor Summary
ReadBlockingTask()
           
 
Method Summary
 void attachProcessor(DefaultProcessorTask processorTask)
          Force this task to always use the same ProcessorTask instance.
 void doTask()
          Dispatch an Http request to a ProcessorTask
protected  void finishConnection()
          Gracefully close the blocking socket.
 PipelineStatistic getPipelineStatistic()
          Return the PipelineStatistic object used to gather statistic;
 boolean getSecure()
          Return the isSecure.
 Socket getSocket()
          Return the current Socket used by this instance
 void recycle()
          Clear the current state and make this object ready for another request.
 void setPipelineStatistic(PipelineStatistic pipelineStatistic)
          Set the PipelineStatistic object used to gather statistic;
 void setSecure(boolean isSecure)
          Set the isSecure attribute.
 void taskEvent(TaskEvent event)
          Receive notification from other Task and recycle this task.
 
Methods inherited from class com.sun.enterprise.web.connector.grizzly.DefaultReadTask
attachProcessor, configureProcessorTask, detachProcessor, doTask, executeProcessorTask, getByteBuffer, getIdleTime, getProcessorTask, initialize, manageKeepAlive, registerKey, returnTask, setByteBuffer, setBytesAvailable, setIdleTime, terminate
 
Methods inherited from class com.sun.enterprise.web.connector.grizzly.TaskBase
addTaskListener, call, cancelTask, clearTaskListeners, execute, fireTaskEvent, getKeepAliveStats, getPipeline, getRecycle, getRequestGroupInfo, getSelectionKey, getSelectorThread, getTaskListeners, getType, isMonitoringEnabled, removeTaskListener, run, setPipeline, setRecycle, setSelectionKey, setSelectorThread
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.sun.enterprise.web.connector.grizzly.Task
addTaskListener, cancelTask, clearTaskListeners, execute, getKeepAliveStats, getPipeline, getRecycle, getRequestGroupInfo, getSelectionKey, getSelectorThread, getTaskListeners, getType, isMonitoringEnabled, removeTaskListener, setPipeline, setRecycle, setSelectionKey, setSelectorThread
 
Methods inherited from interface java.lang.Runnable
run
 
Methods inherited from interface java.util.concurrent.Callable
call
 

Field Detail

pipelineStat

protected PipelineStatistic pipelineStat
The PipelineStatistic objects used when gathering statistics.


isSecure

protected boolean isSecure
If the Task handling an SSL based request.

Constructor Detail

ReadBlockingTask

public ReadBlockingTask()
Method Detail

attachProcessor

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


doTask

public void doTask()
            throws IOException
Dispatch an Http request to a ProcessorTask

Specified by:
doTask in interface Task
Overrides:
doTask in class DefaultReadTask
Throws:
IOException

recycle

public void recycle()
Clear the current state and make this object ready for another request.

Specified by:
recycle in interface Task
Overrides:
recycle in class DefaultReadTask

finishConnection

protected void finishConnection()
Gracefully close the blocking socket.

Overrides:
finishConnection in class DefaultReadTask

taskEvent

public void taskEvent(TaskEvent event)
Receive notification from other Task and recycle this task.

Specified by:
taskEvent in interface TaskListener
Overrides:
taskEvent in class DefaultReadTask

getSocket

public Socket getSocket()
Return the current Socket used by this instance

Overrides:
getSocket in class TaskBase
Returns:
socket the current Socket used by this instance

setPipelineStatistic

public void setPipelineStatistic(PipelineStatistic pipelineStatistic)
Set the PipelineStatistic object used to gather statistic;


getPipelineStatistic

public PipelineStatistic getPipelineStatistic()
Return the PipelineStatistic object used to gather statistic;


setSecure

public void setSecure(boolean isSecure)
Set the isSecure attribute.


getSecure

public boolean getSecure()
Return the isSecure.



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