channelRead0() — netty Function Reference
Architecture documentation for the channelRead0() function in OcspHttpHandler.java from the netty codebase.
Entity Profile
Dependency Diagram
graph TD 3a0bac3d_54dc_6e79_a5a2_b982cfbdf22e["channelRead0()"] cba3eeb4_dd5c_095e_3acf_4cabb8ff9203["OcspHttpHandler"] 3a0bac3d_54dc_6e79_a5a2_b982cfbdf22e -->|defined in| cba3eeb4_dd5c_095e_3acf_4cabb8ff9203 style 3a0bac3d_54dc_6e79_a5a2_b982cfbdf22e fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
handler-ssl-ocsp/src/main/java/io/netty/handler/ssl/ocsp/OcspHttpHandler.java lines 50–80
@Override
protected void channelRead0(ChannelHandlerContext ctx, FullHttpResponse response) throws Exception {
try {
// If DEBUG is enabled then log the response
if (LOGGER.isDebugEnabled()) {
LOGGER.debug("Received OCSP HTTP Response: {}", response);
}
// Response headers must contain 'Content-Type'
String contentType = response.headers().get(HttpHeaderNames.CONTENT_TYPE);
if (contentType == null) {
throw new OCSPException("HTTP Response does not contain 'CONTENT-TYPE' header");
}
// Response headers must contain 'application/ocsp-response'
if (!contentType.equalsIgnoreCase(OCSP_RESPONSE_TYPE)) {
throw new OCSPException("Response Content-Type was: " + contentType +
"; Expected: " + OCSP_RESPONSE_TYPE);
}
// Status must be OK for successful lookup
if (response.status() != OK) {
throw new IllegalArgumentException("HTTP Response Code was: " + response.status().code() +
"; Expected: 200");
}
responseFuture.trySuccess(new OCSPResp(ByteBufUtil.getBytes(response.content())));
} finally {
ctx.channel().close();
}
}
Domain
Subdomains
Source
Frequently Asked Questions
What does channelRead0() do?
channelRead0() is a function in the netty codebase, defined in handler-ssl-ocsp/src/main/java/io/netty/handler/ssl/ocsp/OcspHttpHandler.java.
Where is channelRead0() defined?
channelRead0() is defined in handler-ssl-ocsp/src/main/java/io/netty/handler/ssl/ocsp/OcspHttpHandler.java at line 50.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free