com.sun.enterprise.web.connector.grizzly.comet
Class CometTask

java.lang.Object
  extended by com.sun.grizzly.util.SelectionKeyAttachment
      extended by com.sun.grizzly.util.SelectedKeyAttachmentLogic
          extended by com.sun.grizzly.comet.CometTask
              extended by com.sun.enterprise.web.connector.grizzly.comet.CometTask
All Implemented Interfaces:
Runnable

Deprecated.

@Deprecated
public class CometTask
extends CometTask

A Task implementation that allow Grizzly ARP to invokeCometHandler CometHandler when new data (bytes) are available from the CometSelector.

Author:
Jeanfrancois Arcand, Gustav Trede

Nested Class Summary
 
Nested classes/interfaces inherited from class com.sun.grizzly.util.SelectionKeyAttachment
SelectionKeyAttachment.KeySelectionListener, SelectionKeyAttachment.TimeOutListener
 
Field Summary
protected  boolean callInterrupt
          Deprecated. true if run() should call comet context.interrupt0
protected  CometContext cometContext
          Deprecated. The CometContext associated with this instance.
protected  CometHandler cometHandler
          Deprecated. The CometHandler associated with this task.
protected  boolean interruptFlushAPT
          Deprecated. true if interrupt should flushAPT
 
Fields inherited from class com.sun.grizzly.comet.CometTask
asyncProcessorTask, cometHandlerIsAsyncRegistered, upcoming_op_isread
 
Fields inherited from class com.sun.grizzly.util.SelectionKeyAttachment
DEREGISTERED, idleTimeoutDelay, keySelectionListener, timeout, timeoutListener, UNLIMITED_TIMEOUT
 
Constructor Summary
CometTask(CometContext cometContext, CometHandler cometHandler)
          Deprecated. New CometTask.
 
Method Summary
 CometContext getCometContext()
          Deprecated. Return the CometContext associated with this instance.
 CometHandler getCometHandler()
          Deprecated. returns the CometHandler
 long getIdleTimeoutDelay()
          Deprecated. Returns the idle timeout delay.
 boolean handleSelectedKey(SelectionKey selectionKey)
          Deprecated. Used for completely custom selector.select logic.
 void release(SelectionKey selectionKey)
          Deprecated. this should never be called for for comet, due to we are nulling the attachment and completely overriding the selector.select logic.
called by grizzly when the selection key is canceled and its socket closed.
 void run()
          Deprecated. performs doTask() or cometContext.interrupt0
 boolean timedOut(SelectionKey key)
          Deprecated. called when idle timeout detected.
 
Methods inherited from class com.sun.grizzly.comet.CometTask
doTask, getAsyncProcessorTask, getSelectionKey, isComethandlerAsyncRegistered, setAsyncProcessorTask, setComethandlerIsAsyncRegistered
 
Methods inherited from class com.sun.grizzly.util.SelectionKeyAttachment
getAttachment, getKeySelectionListener, getTimeout, getTimeoutListener, setIdleTimeoutDelay, setKeySelectionListener, setTimeout, setTimeoutListener
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

cometContext

protected final CometContext cometContext
Deprecated. 
The CometContext associated with this instance.


cometHandler

protected final CometHandler cometHandler
Deprecated. 
The CometHandler associated with this task.


callInterrupt

protected boolean callInterrupt
Deprecated. 
true if run() should call comet context.interrupt0


interruptFlushAPT

protected boolean interruptFlushAPT
Deprecated. 
true if interrupt should flushAPT

Constructor Detail

CometTask

public CometTask(CometContext cometContext,
                 CometHandler cometHandler)
Deprecated. 
New CometTask.

Method Detail

run

public void run()
Deprecated. 
performs doTask() or cometContext.interrupt0

Specified by:
run in interface Runnable
Overrides:
run in class CometTask

getIdleTimeoutDelay

public long getIdleTimeoutDelay()
Deprecated. 
Returns the idle timeout delay. Default it returns UNLIMITED_TIMEOUT, meaning no idle timeout delay.

Overrides:
getIdleTimeoutDelay in class CometTask
Returns:

release

public void release(SelectionKey selectionKey)
Deprecated. 
this should never be called for for comet, due to we are nulling the attachment and completely overriding the selector.select logic.
called by grizzly when the selection key is canceled and its socket closed.

Overrides:
release in class CometTask
Parameters:
selectionKey -

timedOut

public boolean timedOut(SelectionKey key)
Deprecated. 
called when idle timeout detected. return true if key should be canceled.

Overrides:
timedOut in class CometTask
Returns:

handleSelectedKey

public boolean handleSelectedKey(SelectionKey selectionKey)
Deprecated. 
Used for completely custom selector.select logic.

Overrides:
handleSelectedKey in class CometTask
Returns:
true, if we want to continue the default interest processing, or false otherwise.

getCometContext

public CometContext getCometContext()
Deprecated. 
Return the CometContext associated with this instance.

Overrides:
getCometContext in class CometTask
Returns:
CometContext the CometContext associated with this instance.

getCometHandler

public CometHandler getCometHandler()
Deprecated. 
returns the CometHandler

Overrides:
getCometHandler in class CometTask
Returns:
CometHandler


Copyright © 2012 Oracle Corporation. All Rights Reserved.