Package com.codingchili.core.listener
Interface RequestWrapper
- All Superinterfaces:
Messageable
,Request
Wraps a request to allow decorating request objects without re-initializing
the source request. Implement by handler-specific request classes.
-
Field Summary
Fields inherited from interface com.codingchili.core.listener.Request
TARGET_UNDEFINED
-
Method Summary
Modifier and TypeMethodDescriptiondefault void
accept()
Accepts the request indicating that it was processed successfully but that there is no response.default Connection
default io.vertx.core.json.JsonObject
data()
Get the raw data of the request as a json objectdefault void
Write an error and code to the response.default int
maxSize()
defaults to #ListenerSettings.DEFAULT_MAX_REQUEST_BYTES
request()
default String
route()
Get the route from the request, the route specifies with method that should be invoked.default int
size()
default String
target()
The target node of the request.default int
timeout()
Get the request timeout which indicates how long the sender is waiting until the request is considered to have timed out.default Token
token()
Get the request token sent with the request.default void
Writes an object to the connection that backs the current request.
-
Method Details
-
request
Request request()- Returns:
- the wrapped request.
-
write
Description copied from interface:Messageable
Writes an object to the connection that backs the current request.- Specified by:
write
in interfaceMessageable
- Parameters:
object
- the object to be written.
-
accept
default void accept()Description copied from interface:Request
Accepts the request indicating that it was processed successfully but that there is no response. -
error
Description copied from interface:Request
Write an error and code to the response. -
route
Description copied from interface:Request
Get the route from the request, the route specifies with method that should be invoked. -
target
Description copied from interface:Request
The target node of the request. The target specifies which service or which sub-service that the requested route resides in. -
token
Description copied from interface:Request
Get the request token sent with the request. -
connection
- Specified by:
connection
in interfaceRequest
- Returns:
- the underlying connection of the request, may be called multiple times per request returning the same connection object.
-
data
default io.vertx.core.json.JsonObject data()Description copied from interface:Request
Get the raw data of the request as a json object -
timeout
default int timeout()Description copied from interface:Request
Get the request timeout which indicates how long the sender is waiting until the request is considered to have timed out.defaults to #
ListenerSettings.DEFAULT_TIMEOUT
-
size
default int size() -
maxSize
default int maxSize()Description copied from interface:Request
defaults to #ListenerSettings.DEFAULT_MAX_REQUEST_BYTES
-