Package com.codingchili.core.testing
Class EmptyRequest
java.lang.Object
com.codingchili.core.testing.EmptyRequest
- All Implemented Interfaces:
Messageable
,Request
An empty request for testing.
-
Field Summary
Fields inherited from interface com.codingchili.core.listener.Request
TARGET_UNDEFINED
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
accept()
Accepts the request indicating that it was processed successfully but that there is no response.io.vertx.core.json.JsonObject
data()
Get the raw data of the request as a json objectvoid
Write an error and code to the response.int
maxSize()
defaults to #ListenerSettings.DEFAULT_MAX_REQUEST_BYTES
route()
Get the route from the request, the route specifies with method that should be invoked.int
size()
target()
The target node of the request.int
timeout()
Get the request timeout which indicates how long the sender is waiting until the request is considered to have timed out.token()
Get the request token sent with the request.void
Writes an object to the connection that backs the current request.
-
Constructor Details
-
EmptyRequest
public EmptyRequest()
-
-
Method Details
-
error
Description copied from interface:Request
Write an error and code to the response. -
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
public void accept()Description copied from interface:Request
Accepts the request indicating that it was processed successfully but that there is no 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
public io.vertx.core.json.JsonObject data()Description copied from interface:Request
Get the raw data of the request as a json object -
timeout
public 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
public int size() -
maxSize
public int maxSize()Description copied from interface:Request
defaults to #ListenerSettings.DEFAULT_MAX_REQUEST_BYTES
-