# Class AbstractRxTask

java.lang.Object
org.apache.catalina.tribes.transport.AbstractRxTask

All Implemented Interfaces:
  `Runnable`

Direct Known Subclasses:
  `NioReplicationTask`

public abstract class AbstractRxTask extends Object implements Runnable
Abstract base class for receive tasks in the Catalina Tribes framework.

## Field Summary

Fields
Modifier and Type
Field
Description
`static final int`
`OPTION_DIRECT_BUFFER`
Option flag for using direct buffers.
`protected boolean`
`useBufferPool`
Whether to use the buffer pool.

## Constructor Summary

Constructors
Constructor
Description
`AbstractRxTask(ListenCallback callback)`
Constructs a new AbstractRxTask.

## Method Summary

Modifier and Type
Method
Description
`void`
`close()`
Closes this task.
`ListenCallback`
`getCallback()`
Gets the callback.
`int`
`getOptions()`
Gets the options.
`RxTaskPool`
`getTaskPool()`
Gets the task pool.
`boolean`
`getUseBufferPool()`
Gets whether the buffer pool is being used.
`void`
`setCallback(ListenCallback callback)`
Sets the callback.
`void`
`setOptions(int options)`
Sets the options.
`void`
`setTaskPool(RxTaskPool pool)`
Sets the task pool.
`void`
`setUseBufferPool(boolean usebufpool)`
Sets whether to use the buffer pool.

### Methods inherited from class Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Methods inherited from interface Runnable

`run`

## Field Details

### 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 Details

### AbstractRxTask

public AbstractRxTask(ListenCallback callback)
Constructs a new AbstractRxTask.

Parameters:
  `callback` - The callback

## Method Details

### 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` - `true` to use the buffer pool

### getUseBufferPool

public boolean getUseBufferPool()
Gets whether the buffer pool is being used.

Returns:
  `true` if the buffer pool is being used