Module 
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 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