public class StringWriteChannelListener extends Object implements ChannelListener<StreamSinkChannel>
setup(org.xnio.channels.StreamSinkChannel)
should be called, which will attempt a write, and only add the listener if required.ChannelListener.Setter<T extends Channel>, ChannelListener.SimpleSetter<T extends Channel>
Constructor and Description |
---|
StringWriteChannelListener(String string) |
StringWriteChannelListener(String string,
Charset charset) |
Modifier and Type | Method and Description |
---|---|
protected void |
handleError(StreamSinkChannel channel,
IOException e) |
void |
handleEvent(StreamSinkChannel channel)
Handle the event on this channel.
|
boolean |
hasRemaining() |
void |
setup(StreamSinkChannel channel) |
protected void |
writeDone(StreamSinkChannel channel) |
public StringWriteChannelListener(String string)
public void setup(StreamSinkChannel channel)
protected void handleError(StreamSinkChannel channel, IOException e)
public void handleEvent(StreamSinkChannel channel)
ChannelListener
handleEvent
in interface ChannelListener<StreamSinkChannel>
channel
- the channel eventpublic boolean hasRemaining()
protected void writeDone(StreamSinkChannel channel)
Copyright © 2017 JBoss by Red Hat. All rights reserved.