Package org.xnio

# Class ChannelListener.SimpleSetter<T extends Channel>

java.lang.Object
org.xnio.ChannelListener.SimpleSetter<T>

Type Parameters:
  `T` - the channel type

All Implemented Interfaces:
  `ChannelListener.Setter<T>`

Enclosing interface:
  `ChannelListener<T extends Channel>`

public static class ChannelListener.SimpleSetter<T extends Channel> extends Object implements ChannelListener.Setter<T>
A simple implementation of `ChannelListener.Setter`.

Since:
  3.0

## Constructor Summary

Constructors
Constructor
Description
`SimpleSetter()`

## Method Summary

Modifier and Type
Method
Description
`ChannelListener<? super T>`
`get()`
Get the channel listener set on this setter.
`void`
`set(ChannelListener<? super T> listener)`
Set the listener, or `null` to ignore the associated event type.
`String`
`toString()`

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

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

## Constructor Details

### SimpleSetter

public SimpleSetter()

## Method Details

### set

public void set(ChannelListener<? super T> listener)
Set the listener, or `null` to ignore the associated event type.

Specified by:
  `set` in interface `ChannelListener.Setter<T extends Channel>`
Parameters:
  `listener` - the new listener

### get

public ChannelListener<? super T> get()
Get the channel listener set on this setter.

Returns:
  the channel listener

### toString

public String toString()

Overrides:
  `toString` in class `Object`