Top Description Fields Constructors Methods
io.undertow.util

public abstract Class StringReadChannelListener

extends Object
implements ChannelListener<StreamSourceChannel>
Class Inheritance
All Implemented Interfaces
org.xnio.ChannelListener, java.util.EventListener
Imports
java.io.IOException, java.nio.ByteBuffer, io.undertow.connector.PooledByteBuffer, .ByteBufferPool, io.undertow.server.XnioByteBufferPool, io.undertow.websockets.core.UTF8Output, org.xnio.ChannelListener, .IoUtils, .Pool, org.xnio.channels.StreamSourceChannel

Simple utility class for reading a string

Todo

handle unicode properly

Author
Stuart Douglas

Field Summary

Modifier and TypeField and Description
private final ByteBufferPool
private final UTF8Output

Constructor Summary

AccessConstructor and Description
public
public
StringReadChannelListener(final Pool<ByteBuffer> bufferPool)
Deprecated

Method Summary

Modifier and TypeMethod and Description
protected abstract void
public void
handleEvent(final StreamSourceChannel
the channel event
channel
)

Implements org.xnio.ChannelListener.handleEvent.

Handle the event on this channel.

public void
setup(final StreamSourceChannel channel)

protected abstract void
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

bufferPoolback to summary
private final ByteBufferPool bufferPool
stringback to summary
private final UTF8Output string

Constructor Detail

StringReadChannelListenerback to summary
public StringReadChannelListener(final ByteBufferPool bufferPool)
StringReadChannelListenerback to summary
public StringReadChannelListener(final Pool<ByteBuffer> bufferPool)

Deprecated

Annotations
@Deprecated

Method Detail

errorback to summary
protected abstract void error(IOException e)
handleEventback to summary
public void handleEvent(final StreamSourceChannel channel)

Implements org.xnio.ChannelListener.handleEvent.

Doc from org.xnio.ChannelListener.handleEvent.

Handle the event on this channel.

Parameters
channel:StreamSourceChannel

the channel event

Annotations
@Override
setupback to summary
public void setup(final StreamSourceChannel channel)
stringDoneback to summary
protected abstract void stringDone(String string)