Top Description Inners Methods
io.undertow.io

public Interface Receiver

Known Direct Implementers
io.undertow.io.AsyncReceiverImpl, io.undertow.io.BlockingReceiverImpl
Imports
io.undertow.server.HttpServerExchange, .RequestTooBigException, java.io.IOException, java.nio.charset.Charset

Interface that provides an easy way to read data from the request. It is lambda compatible.
Author
Stuart Douglas

Nested and Inner Type Summary

Modifier and TypeClass and Description
public static interface
public static interface
public static interface
public static interface
public static interface
public static class

Method Summary

Modifier and TypeMethod and Description
public void
pause()

When receiving partial data calling this method will pause the callbacks.

public void
receiveFullBytes(Receiver.FullBytesCallback
The callback to invoke with the request
callback
,
Receiver.ErrorCallback
The callback that is invoked on error
errorCallback
)

Reads the request and invokes the callback when the request body has been fully read.

public void
receiveFullBytes(Receiver.FullBytesCallback
The callback to invoke with the request
callback
)

Reads the request and invokes the callback when the request body has been fully read.

public void
receiveFullString(Receiver.FullStringCallback
The callback to invoke with the request
callback
,
Receiver.ErrorCallback
The callback that is invoked on error
errorCallback
)

Reads the request and invokes the callback when the request body has been fully read.

public void
receiveFullString(Receiver.FullStringCallback
The callback to invoke with the request
callback
)

Reads the request and invokes the callback when the request body has been fully read.

public void
receiveFullString(Receiver.FullStringCallback
The callback to invoke with the request
callback
,
Receiver.ErrorCallback
The callback that is invoked on error
errorCallback
,
Charset
The charset that is used to interpret the string
charset
)

Reads the request and invokes the callback when the request body has been fully read.

public void
receiveFullString(Receiver.FullStringCallback
The callback to invoke with the request
callback
,
Charset
The charset that is used to interpret the string
charset
)

Reads the request and invokes the callback when the request body has been fully read.

public void
receivePartialBytes(Receiver.PartialBytesCallback
The callback to invoke with the request
callback
,
Receiver.ErrorCallback
The callback that is invoked on error
errorCallback
)

Reads the request and invokes the callback with request data.

public void
receivePartialBytes(Receiver.PartialBytesCallback
The callback to invoke with the request
callback
)

Reads the request and invokes the callback with request data.

public void
receivePartialString(Receiver.PartialStringCallback
The callback to invoke with the request
callback
,
Receiver.ErrorCallback
The callback that is invoked on error
errorCallback
)

Reads the request and invokes the callback with request data.

public void
receivePartialString(Receiver.PartialStringCallback
The callback to invoke with the request
callback
)

Reads the request and invokes the callback with request data.

public void
receivePartialString(Receiver.PartialStringCallback
The callback to invoke with the request
callback
,
Receiver.ErrorCallback
The callback that is invoked on error
errorCallback
,
Charset
The charset that is used to interpret the string
charset
)

Reads the request and invokes the callback with request data.

public void
receivePartialString(Receiver.PartialStringCallback
The callback to invoke with the request
callback
,
Charset
The charset that is used to interpret the string
charset
)

Reads the request and invokes the callback with request data.

public void
resume()

Resumes paused callbacks.

public void
setMaxBufferSize(int
The maximum amount of data to be buffered
maxBufferSize
)

Sets the maximum amount of data that will be buffered in memory.

Method Detail

pauseback to summary
public void pause()

When receiving partial data calling this method will pause the callbacks. Callbacks will not resume until resume() has been called.

receiveFullBytesback to summary
public void receiveFullBytes(Receiver.FullBytesCallback callback, Receiver.ErrorCallback errorCallback)

Reads the request and invokes the callback when the request body has been fully read. If there is an error reading the request the error callback will be invoked.

Parameters
callback:Receiver.FullBytesCallback

The callback to invoke with the request

errorCallback:Receiver.ErrorCallback

The callback that is invoked on error

receiveFullBytesback to summary
public void receiveFullBytes(Receiver.FullBytesCallback callback)

Reads the request and invokes the callback when the request body has been fully read. If there is an error the exchange will be ended.

Parameters
callback:Receiver.FullBytesCallback

The callback to invoke with the request

receiveFullStringback to summary
public void receiveFullString(Receiver.FullStringCallback callback, Receiver.ErrorCallback errorCallback)

Reads the request and invokes the callback when the request body has been fully read. This string will be interpreted according to java.nio.charset.StandardCharsets#ISO_8859_1. If there is an error reading the request the error callback will be invoked.

Parameters
callback:Receiver.FullStringCallback

The callback to invoke with the request

errorCallback:Receiver.ErrorCallback

The callback that is invoked on error

receiveFullStringback to summary
public void receiveFullString(Receiver.FullStringCallback callback)

Reads the request and invokes the callback when the request body has been fully read. This string will be interpreted according to java.nio.charset.StandardCharsets#ISO_8859_1. If there is an error the exchange will be ended.

Parameters
callback:Receiver.FullStringCallback

The callback to invoke with the request

receiveFullStringback to summary
public void receiveFullString(Receiver.FullStringCallback callback, Receiver.ErrorCallback errorCallback, Charset charset)

Reads the request and invokes the callback when the request body has been fully read. This string will be interpreted according to the specified charset. If there is an error reading the request the error callback will be invoked.

Parameters
callback:Receiver.FullStringCallback

The callback to invoke with the request

errorCallback:Receiver.ErrorCallback

The callback that is invoked on error

charset:Charset

The charset that is used to interpret the string

receiveFullStringback to summary
public void receiveFullString(Receiver.FullStringCallback callback, Charset charset)

Reads the request and invokes the callback when the request body has been fully read. This string will be interpreted according to the specified charset. If there is an error the exchange will be ended.

Parameters
callback:Receiver.FullStringCallback

The callback to invoke with the request

charset:Charset

The charset that is used to interpret the string

receivePartialBytesback to summary
public void receivePartialBytes(Receiver.PartialBytesCallback callback, Receiver.ErrorCallback errorCallback)

Reads the request and invokes the callback with request data. The callback may be invoked multiple times, and on the last time the last parameter will be true. If there is an error reading the request the error callback will be invoked.

Parameters
callback:Receiver.PartialBytesCallback

The callback to invoke with the request

errorCallback:Receiver.ErrorCallback

The callback that is invoked on error

receivePartialBytesback to summary
public void receivePartialBytes(Receiver.PartialBytesCallback callback)

Reads the request and invokes the callback with request data. The callback may be invoked multiple times, and on the last time the last parameter will be true. If there is an error the exchange will be ended.

Parameters
callback:Receiver.PartialBytesCallback

The callback to invoke with the request

receivePartialStringback to summary
public void receivePartialString(Receiver.PartialStringCallback callback, Receiver.ErrorCallback errorCallback)

Reads the request and invokes the callback with request data. The callback may be invoked multiple times, and on the last time the last parameter will be true. This string will be interpreted according to java.nio.charset.StandardCharsets#ISO_8859_1. If there is an error reading the request the error callback will be invoked.

Parameters
callback:Receiver.PartialStringCallback

The callback to invoke with the request

errorCallback:Receiver.ErrorCallback

The callback that is invoked on error

receivePartialStringback to summary
public void receivePartialString(Receiver.PartialStringCallback callback)

Reads the request and invokes the callback with request data. The callback may be invoked multiple times, and on the last time the last parameter will be true. This string will be interpreted according to java.nio.charset.StandardCharsets#ISO_8859_1. If there is an error the exchange will be ended.

Parameters
callback:Receiver.PartialStringCallback

The callback to invoke with the request

receivePartialStringback to summary
public void receivePartialString(Receiver.PartialStringCallback callback, Receiver.ErrorCallback errorCallback, Charset charset)

Reads the request and invokes the callback with request data. The callback may be invoked multiple times, and on the last time the last parameter will be true. This string will be interpreted according to the specified charset. If there is an error reading the request the error callback will be invoked.

Parameters
callback:Receiver.PartialStringCallback

The callback to invoke with the request

errorCallback:Receiver.ErrorCallback

The callback that is invoked on error

charset:Charset

The charset that is used to interpret the string

receivePartialStringback to summary
public void receivePartialString(Receiver.PartialStringCallback callback, Charset charset)

Reads the request and invokes the callback with request data. The callback may be invoked multiple times, and on the last time the last parameter will be true. This string will be interpreted according to the specified charset. If there is an error the exchange will be ended.

Parameters
callback:Receiver.PartialStringCallback

The callback to invoke with the request

charset:Charset

The charset that is used to interpret the string

resumeback to summary
public void resume()

Resumes paused callbacks.

setMaxBufferSizeback to summary
public void setMaxBufferSize(int maxBufferSize)

Sets the maximum amount of data that will be buffered in memory. If you call a receiveFull* method and the request size is larger than this amount then the error callback with be invoked with a RequestTooBigException.

Parameters
maxBufferSize:int

The maximum amount of data to be buffered

io.undertow.io back to summary

public Interface Receiver.ErrorCallback


Method Summary

Modifier and TypeMethod and Description
public void

Method Detail

errorback to summary
public void error(HttpServerExchange exchange, IOException e)
io.undertow.io back to summary

public Interface Receiver.FullBytesCallback


Method Summary

Modifier and TypeMethod and Description
public void
handle(HttpServerExchange exchange, byte[] message)

Method Detail

handleback to summary
public void handle(HttpServerExchange exchange, byte[] message)
io.undertow.io back to summary

public Interface Receiver.FullStringCallback


Method Summary

Modifier and TypeMethod and Description
public void
handle(HttpServerExchange exchange, String message)

Method Detail

handleback to summary
public void handle(HttpServerExchange exchange, String message)
io.undertow.io back to summary

public Interface Receiver.PartialBytesCallback


Method Summary

Modifier and TypeMethod and Description
public void
handle(HttpServerExchange exchange, byte[] message, boolean last)

Method Detail

handleback to summary
public void handle(HttpServerExchange exchange, byte[] message, boolean last)
io.undertow.io back to summary

public Interface Receiver.PartialStringCallback


Method Summary

Modifier and TypeMethod and Description
public void
handle(HttpServerExchange exchange, String message, boolean last)

Method Detail

handleback to summary
public void handle(HttpServerExchange exchange, String message, boolean last)
io.undertow.io back to summary

public Class Receiver.RequestToLargeException

extends IOException
Class Inheritance

Constructor Summary

AccessConstructor and Description
public

Constructor Detail

RequestToLargeExceptionback to summary
public RequestToLargeException()