com.sun.grizzly
Class ContextTask

java.lang.Object
  extended by com.sun.grizzly.ContextTask
All Implemented Interfaces:
Callable
Direct Known Subclasses:
SelectionKeyContextTask

public abstract class ContextTask
extends Object
implements Callable

Task, which will be executed by Context, when Context.execute(ContextTask) is called.

Author:
Alexey Stashok

Nested Class Summary
protected static class ContextTask.TaskPool<E extends ContextTask>
           
 
Field Summary
protected  Context context
           
 
Constructor Summary
ContextTask()
           
 
Method Summary
 Context getContext()
           
abstract  void offer()
          Return instance to the pool WARN: Do not call super.offer(), as it can lead to multiple offer call
 void recycle()
           
 void setContext(Context context)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface java.util.concurrent.Callable
call
 

Field Detail

context

protected Context context
Constructor Detail

ContextTask

public ContextTask()
Method Detail

getContext

public Context getContext()

setContext

public void setContext(Context context)

recycle

public void recycle()

offer

public abstract void offer()
Return instance to the pool WARN: Do not call super.offer(), as it can lead to multiple offer call



Copyright © 2008 SUN Microsystems. All Rights Reserved.