org.jboss.netty.channel.socket.nio

## Class ShareableWorkerPool<E extends Worker>

- java.lang.Object
- - org.jboss.netty.channel.socket.nio.ShareableWorkerPool<E>

All Implemented Interfaces:
  WorkerPool<E>

    public final class ShareableWorkerPool<E extends Worker>
    extends Object
    implements WorkerPool<E>

This implementation of a `WorkerPool` should be used if you plan to share a `WorkerPool` between different Factories. You will need to call `destroy()` by your own once you want to release any resources of it.

### Constructor Summary

Constructors
Constructor and Description
`ShareableWorkerPool(WorkerPool<E> wrapped)`

### Method Summary

Methods
`void` `destroy()` Destroy the `ShareableWorkerPool` and release all resources.
`E` `nextWorker()` Return the next `Worker` to use

### Methods inherited from class java.lang.Object

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

### Constructor Detail

#### ShareableWorkerPool

    public ShareableWorkerPool(WorkerPool<E> wrapped)

### Method Detail

#### nextWorker

    public E nextWorker()

Description copied from interface: `WorkerPool`
Return the next `Worker` to use

Specified by:
  `nextWorker` in interface `WorkerPool<E extends Worker>`
Returns:
  worker

#### destroy

    public void destroy()

Destroy the `ShareableWorkerPool` and release all resources. After this is called its not usable anymore