Class TcpRequest
java.lang.Object
com.codingchili.core.listener.transport.TcpRequest
- All Implemented Interfaces:
Messageable
,Request
TCP request implementation.
-
Field Summary
Fields inherited from interface com.codingchili.core.listener.Request
TARGET_UNDEFINED
-
Constructor Summary
ConstructorDescriptionTcpRequest(Connection connection, io.vertx.core.buffer.Buffer buffer, ListenerSettings settings)
-
Method Summary
Modifier and TypeMethodDescriptionio.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
-
TcpRequest
public TcpRequest(Connection connection, io.vertx.core.buffer.Buffer buffer, ListenerSettings settings)
-
-
Method Details
-
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.
-
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.
-
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
-