TransportRequestHandler
TransportRequestHandler
is a MessageHandler of RequestMessage messages from Netty’s Channel.
TransportRequestHandler
is created exclusively when TransportContext
is requested to createChannelHandler.
Tip
|
Enable Add the following line to
Refer to Logging. |
processRpcRequest
Internal Method
1 2 3 4 5 |
void processRpcRequest(final RpcRequest req) |
processRpcRequest
…FIXME
Note
|
processRpcRequest is used exclusively when TransportRequestHandler is requested to handle a RpcRequest request.
|
processFetchRequest
Internal Method
1 2 3 4 5 |
void processFetchRequest(final ChunkFetchRequest req) |
processFetchRequest
…FIXME
Note
|
processFetchRequest is used exclusively when TransportRequestHandler is requested to handle a ChunkFetchRequest request.
|
processOneWayMessage
Internal Method
1 2 3 4 5 |
void processOneWayMessage(OneWayMessage req) |
processOneWayMessage
…FIXME
Note
|
processOneWayMessage is used exclusively when TransportRequestHandler is requested to handle a OneWayMessage request.
|
processStreamRequest
Internal Method
1 2 3 4 5 |
void processStreamRequest(final StreamRequest req) |
processStreamRequest
…FIXME
Note
|
processStreamRequest is used exclusively when TransportRequestHandler is requested to handle a StreamRequest request.
|
Handling RequestMessages — handle
Method
1 2 3 4 5 |
void handle(RequestMessage request) |
Note
|
handle is part of MessageHandler Contract to handle messages (aka requests).
|
handle
branches off per the type of the input RequestMessage
:
-
For
ChunkFetchRequest
requests,handle
processFetchRequest -
For
RpcRequest
requests,handle
processRpcRequest -
For
OneWayMessage
requests,handle
processOneWayMessage -
For
StreamRequest
requests,handle
processStreamRequest
For unknown requests, handle
simply throws a IllegalArgumentException
.
1 2 3 4 5 |
Unknown request type: [request] |
Creating TransportRequestHandler Instance
TransportRequestHandler
takes the following when created:
-
Netty’s Channel
-
Maximum number of chunks allowed to be transferred at the same time
TransportRequestHandler
initializes the internal registries and counters.