- java.lang.Object
-
- org.xnio.DelegatingChannelListener<T>
-
- All Implemented Interfaces:
java.util.EventListener
,ChannelListener<T>
public abstract class DelegatingChannelListener<T extends java.nio.channels.Channel> extends java.lang.Object implements ChannelListener<T>
A base class for a channel listener which performs an action and then calls a delegate listener.- Author:
- David M. Lloyd
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.xnio.ChannelListener
ChannelListener.Setter<T extends java.nio.channels.Channel>, ChannelListener.SimpleSetter<T extends java.nio.channels.Channel>
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
DelegatingChannelListener(ChannelListener<? super T> next)
Construct a new instance.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
callNext(T channel)
Call the next listener.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.xnio.ChannelListener
handleEvent
-
-
-
-
Constructor Detail
-
DelegatingChannelListener
protected DelegatingChannelListener(ChannelListener<? super T> next)
Construct a new instance. The next listener must be for the same type as, or a supertype of, the channel type handleable by this listener.- Parameters:
next
- the next listener
-
-
Method Detail
-
callNext
protected void callNext(T channel)
Call the next listener. Does not throw exceptions.- Parameters:
channel
- the channel to pass to the next listener
-
-