Receiver.ErrorCallback, Receiver.FullBytesCallback, Receiver.FullStringCallback, Receiver.PartialBytesCallback, Receiver.PartialStringCallback, Receiver.RequestToLargeException
Modifier and Type | Field and Description |
---|---|
static byte[] | EMPTY_BYTE_ARRAY |
Constructor and Description |
---|
AsyncReceiverImpl(HttpServerExchange exchange) |
Modifier and Type | Method and Description |
---|---|
void | pause() When receiving partial data calling this method will pause the callbacks. |
void | receiveFullBytes(Receiver.FullBytesCallback callback) Reads the request and invokes the callback when the request body has been fully read. |
void | receiveFullBytes(Receiver.FullBytesCallback callback, Receiver.ErrorCallback errorCallback) Reads the request and invokes the callback when the request body has been fully read. |
void | receiveFullString(Receiver.FullStringCallback callback) Reads the request and invokes the callback when the request body has been fully read. |
void | receiveFullString(Receiver.FullStringCallback callback, Charset charset) Reads the request and invokes the callback when the request body has been fully read. |
void | receiveFullString(Receiver.FullStringCallback callback, Receiver.ErrorCallback errorCallback) Reads the request and invokes the callback when the request body has been fully read. |
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. |
void | receivePartialBytes(Receiver.PartialBytesCallback callback) Reads the request and invokes the callback with request data. |
void | receivePartialBytes(Receiver.PartialBytesCallback callback, Receiver.ErrorCallback errorCallback) Reads the request and invokes the callback with request data. |
void | receivePartialString(Receiver.PartialStringCallback callback) Reads the request and invokes the callback with request data. |
void | receivePartialString(Receiver.PartialStringCallback callback, Charset charset) Reads the request and invokes the callback with request data. |
void | receivePartialString(Receiver.PartialStringCallback callback, Receiver.ErrorCallback errorCallback) Reads the request and invokes the callback with request data. |
void | receivePartialString(Receiver.PartialStringCallback callback, Receiver.ErrorCallback errorCallback, Charset charset) Reads the request and invokes the callback with request data. |
void | resume() Resumes paused callbacks. |
void | setMaxBufferSize(int maxBufferSize) Sets the maximum amount of data that will be buffered in memory. |
public AsyncReceiverImpl(HttpServerExchange exchange)
public void setMaxBufferSize(int maxBufferSize)
Receiver
RequestTooBigException
.setMaxBufferSize
in interface Receiver
maxBufferSize
- The maximum amount of data to be bufferedpublic void receiveFullString(Receiver.FullStringCallback callback, Receiver.ErrorCallback errorCallback)
Receiver
StandardCharsets.ISO_8859_1
. If there is an error reading the request the error callback will be invoked.receiveFullString
in interface Receiver
callback
- The callback to invoke with the requesterrorCallback
- The callback that is invoked on errorpublic void receiveFullString(Receiver.FullStringCallback callback)
Receiver
StandardCharsets.ISO_8859_1
. If there is an error the exchange will be ended.receiveFullString
in interface Receiver
callback
- The callback to invoke with the requestpublic void receivePartialString(Receiver.PartialStringCallback callback, Receiver.ErrorCallback errorCallback)
Receiver
StandardCharsets.ISO_8859_1
. If there is an error reading the request the error callback will be invoked.receivePartialString
in interface Receiver
callback
- The callback to invoke with the requesterrorCallback
- The callback that is invoked on errorpublic void receivePartialString(Receiver.PartialStringCallback callback)
Receiver
StandardCharsets.ISO_8859_1
. If there is an error the exchange will be ended.receivePartialString
in interface Receiver
callback
- The callback to invoke with the requestpublic void receiveFullString(Receiver.FullStringCallback callback, Receiver.ErrorCallback errorCallback, Charset charset)
Receiver
receiveFullString
in interface Receiver
callback
- The callback to invoke with the requesterrorCallback
- The callback that is invoked on errorcharset
- The charset that is used to interpret the stringpublic void receiveFullString(Receiver.FullStringCallback callback, Charset charset)
Receiver
receiveFullString
in interface Receiver
callback
- The callback to invoke with the requestcharset
- The charset that is used to interpret the stringpublic void receivePartialString(Receiver.PartialStringCallback callback, Receiver.ErrorCallback errorCallback, Charset charset)
Receiver
receivePartialString
in interface Receiver
callback
- The callback to invoke with the requesterrorCallback
- The callback that is invoked on errorcharset
- The charset that is used to interpret the stringpublic void receivePartialString(Receiver.PartialStringCallback callback, Charset charset)
Receiver
receivePartialString
in interface Receiver
callback
- The callback to invoke with the requestcharset
- The charset that is used to interpret the stringpublic void receiveFullBytes(Receiver.FullBytesCallback callback, Receiver.ErrorCallback errorCallback)
Receiver
receiveFullBytes
in interface Receiver
callback
- The callback to invoke with the requesterrorCallback
- The callback that is invoked on errorpublic void receiveFullBytes(Receiver.FullBytesCallback callback)
Receiver
receiveFullBytes
in interface Receiver
callback
- The callback to invoke with the requestpublic void receivePartialBytes(Receiver.PartialBytesCallback callback, Receiver.ErrorCallback errorCallback)
Receiver
receivePartialBytes
in interface Receiver
callback
- The callback to invoke with the requesterrorCallback
- The callback that is invoked on errorpublic void receivePartialBytes(Receiver.PartialBytesCallback callback)
Receiver
receivePartialBytes
in interface Receiver
callback
- The callback to invoke with the requestpublic void pause()
Receiver
Receiver.resume()
has been called.Copyright © 2020 JBoss by Red Hat. All rights reserved.