Class ClusterRequest
java.lang.Object
com.codingchili.core.listener.transport.ClusterRequest
- All Implemented Interfaces:
Messageable
,Request
- Direct Known Subclasses:
RequestMock.ClusterRequestMock
A request in the cluster.
Size does not apply to these requests.
-
Field Summary
Fields inherited from interface com.codingchili.core.listener.Request
TARGET_UNDEFINED
-
Constructor Summary
ConstructorDescriptionClusterRequest(io.vertx.core.eventbus.Message message)
Creates a cluster request from an eventbus message. -
Method Summary
Modifier and TypeMethodDescriptionio.vertx.core.buffer.Buffer
buffer()
io.vertx.core.json.JsonObject
data()
Get the raw data of the request as a json objectint
maxSize()
defaults to #ListenerSettings.DEFAULT_MAX_REQUEST_BYTES
int
size()
int
timeout()
Get the request timeout which indicates how long the sender is waiting until the request is considered to have timed out.void
Writes an object to the connection that backs the current request.
-
Constructor Details
-
ClusterRequest
public ClusterRequest(io.vertx.core.eventbus.Message message)Creates a cluster request from an eventbus message.- Parameters:
message
- the eventbus message
-
-
Method Details
-
write
Description copied from interface:Messageable
Writes an object to the connection that backs the current request.- Specified by:
write
in interfaceMessageable
- Parameters:
msg
- the object to be written.
-
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 -
buffer
public io.vertx.core.buffer.Buffer buffer()- Returns:
- the buffer attached to the requests when sending files.
-
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
-