AsyncReceiverImpl
, BlockingReceiverImpl
public interface Receiver
Modifier and Type | Interface | Description |
---|---|---|
static interface |
Receiver.ErrorCallback |
|
static interface |
Receiver.FullBytesCallback |
|
static interface |
Receiver.FullStringCallback |
|
static interface |
Receiver.PartialBytesCallback |
|
static interface |
Receiver.PartialStringCallback |
|
static class |
Receiver.RequestToLargeException |
Modifier and Type | Method | 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,
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,
java.nio.charset.Charset charset) |
Reads the request and invokes the callback when the request body has been fully read.
|
void |
receiveFullString(Receiver.FullStringCallback callback,
java.nio.charset.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,
Receiver.ErrorCallback errorCallback) |
Reads the request and invokes the callback with request data.
|
void |
receivePartialString(Receiver.PartialStringCallback callback,
Receiver.ErrorCallback errorCallback,
java.nio.charset.Charset charset) |
Reads the request and invokes the callback with request data.
|
void |
receivePartialString(Receiver.PartialStringCallback callback,
java.nio.charset.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.
|
void setMaxBufferSize(int maxBufferSize)
RequestTooBigException
.maxBufferSize
- The maximum amount of data to be bufferedvoid receiveFullString(Receiver.FullStringCallback callback, Receiver.ErrorCallback errorCallback)
StandardCharsets.ISO_8859_1
.
If there is an error reading the request the error callback will be invoked.callback
- The callback to invoke with the requesterrorCallback
- The callback that is invoked on errorvoid receiveFullString(Receiver.FullStringCallback callback)
StandardCharsets.ISO_8859_1
.
If there is an error the exchange will be ended.callback
- The callback to invoke with the requestvoid receivePartialString(Receiver.PartialStringCallback callback, Receiver.ErrorCallback errorCallback)
StandardCharsets.ISO_8859_1
.
If there is an error reading the request the error callback will be invoked.callback
- The callback to invoke with the requesterrorCallback
- The callback that is invoked on errorvoid receivePartialString(Receiver.PartialStringCallback callback)
StandardCharsets.ISO_8859_1
.
If there is an error the exchange will be ended.callback
- The callback to invoke with the requestvoid receiveFullString(Receiver.FullStringCallback callback, Receiver.ErrorCallback errorCallback, java.nio.charset.Charset charset)
callback
- The callback to invoke with the requesterrorCallback
- The callback that is invoked on errorcharset
- The charset that is used to interpret the stringvoid receiveFullString(Receiver.FullStringCallback callback, java.nio.charset.Charset charset)
callback
- The callback to invoke with the requestcharset
- The charset that is used to interpret the stringvoid receivePartialString(Receiver.PartialStringCallback callback, Receiver.ErrorCallback errorCallback, java.nio.charset.Charset charset)
callback
- The callback to invoke with the requesterrorCallback
- The callback that is invoked on errorcharset
- The charset that is used to interpret the stringvoid receivePartialString(Receiver.PartialStringCallback callback, java.nio.charset.Charset charset)
callback
- The callback to invoke with the requestcharset
- The charset that is used to interpret the stringvoid receiveFullBytes(Receiver.FullBytesCallback callback, Receiver.ErrorCallback errorCallback)
callback
- The callback to invoke with the requesterrorCallback
- The callback that is invoked on errorvoid receiveFullBytes(Receiver.FullBytesCallback callback)
callback
- The callback to invoke with the requestvoid receivePartialBytes(Receiver.PartialBytesCallback callback, Receiver.ErrorCallback errorCallback)
callback
- The callback to invoke with the requesterrorCallback
- The callback that is invoked on errorvoid receivePartialBytes(Receiver.PartialBytesCallback callback)
callback
- The callback to invoke with the requestvoid pause()
resume()
has been called.void resume()
Copyright © 2018. All rights reserved.