Class AbstractRxTask
- java.lang.Object
-
- org.apache.catalina.tribes.transport.AbstractRxTask
-
- All Implemented Interfaces:
java.lang.Runnable
- Direct Known Subclasses:
NioReplicationTask
public abstract class AbstractRxTask extends java.lang.Object implements java.lang.RunnableAbstract base class for receive tasks in the Catalina Tribes framework.
-
-
Field Summary
Fields Modifier and Type Field Description static intOPTION_DIRECT_BUFFEROption flag for using direct buffers.protected booleanuseBufferPoolWhether to use the buffer pool.
-
Constructor Summary
Constructors Constructor Description AbstractRxTask(ListenCallback callback)Constructs a new AbstractRxTask.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclose()Closes this task.ListenCallbackgetCallback()Gets the callback.intgetOptions()Gets the options.RxTaskPoolgetTaskPool()Gets the task pool.booleangetUseBufferPool()Gets whether the buffer pool is being used.voidsetCallback(ListenCallback callback)Sets the callback.voidsetOptions(int options)Sets the options.voidsetTaskPool(RxTaskPool pool)Sets the task pool.voidsetUseBufferPool(boolean usebufpool)Sets whether to use the buffer pool.
-
-
-
Field Detail
-
OPTION_DIRECT_BUFFER
public static final int OPTION_DIRECT_BUFFER
Option flag for using direct buffers.- See Also:
- Constant Field Values
-
useBufferPool
protected boolean useBufferPool
Whether to use the buffer pool.
-
-
Constructor Detail
-
AbstractRxTask
public AbstractRxTask(ListenCallback callback)
Constructs a new AbstractRxTask.- Parameters:
callback- The callback
-
-
Method Detail
-
setTaskPool
public void setTaskPool(RxTaskPool pool)
Sets the task pool.- Parameters:
pool- The task pool
-
setOptions
public void setOptions(int options)
Sets the options.- Parameters:
options- The options
-
setCallback
public void setCallback(ListenCallback callback)
Sets the callback.- Parameters:
callback- The callback
-
getTaskPool
public RxTaskPool getTaskPool()
Gets the task pool.- Returns:
- The task pool
-
getOptions
public int getOptions()
Gets the options.- Returns:
- The options
-
getCallback
public ListenCallback getCallback()
Gets the callback.- Returns:
- The callback
-
close
public void close()
Closes this task.
-
setUseBufferPool
public void setUseBufferPool(boolean usebufpool)
Sets whether to use the buffer pool.- Parameters:
usebufpool-trueto use the buffer pool
-
getUseBufferPool
public boolean getUseBufferPool()
Gets whether the buffer pool is being used.- Returns:
trueif the buffer pool is being used
-
-