io.undertow.util

## Class ImmediatePooled<T>

- java.lang.Object
- - io.undertow.util.ImmediatePooled<T>

All Implemented Interfaces:
  AutoCloseable, org.xnio.Pooled<T>

    public class ImmediatePooled<T>
    extends Object
    implements org.xnio.Pooled<T>

Wrapper that allows you to use a non-pooed item as a pooled value

Author:
  Stuart Douglas

### Constructor Summary

Constructors
Constructor and Description
`ImmediatePooled(T value)`

### Method Summary

All Methods Instance Methods Concrete Methods
`void` `close()`
`void` `discard()`
`void` `free()`
`T` `getResource()`

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

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

### Constructor Detail

#### ImmediatePooled

    public ImmediatePooled(T value)

### Method Detail

#### discard

    public void discard()

Specified by:
  `discard` in interface `org.xnio.Pooled<T>`

#### free

    public void free()

Specified by:
  `free` in interface `org.xnio.Pooled<T>`

#### getResource

    public T getResource()
                  throws IllegalStateException

Specified by:
  `getResource` in interface `org.xnio.Pooled<T>`
Throws:
  `IllegalStateException`

#### close

    public void close()

Specified by:
  `close` in interface `AutoCloseable`
Specified by:
  `close` in interface `org.xnio.Pooled<T>`