StompWebSocketClientPageHandler.java — netty Source File
Architecture documentation for StompWebSocketClientPageHandler.java, a java file in the netty codebase.
Entity Profile
Relationship Graph
Source Code
/*
* Copyright 2020 The Netty Project
*
* The Netty Project licenses this file to you under the Apache License,
* version 2.0 (the "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at:
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations
* under the License.
*/
package io.netty.example.stomp.websocket;
import io.netty.channel.ChannelFutureListener;
import io.netty.channel.ChannelHandler.Sharable;
import io.netty.channel.ChannelHandlerContext;
import io.netty.channel.DefaultFileRegion;
import io.netty.channel.SimpleChannelInboundHandler;
import io.netty.handler.codec.http.DefaultFullHttpResponse;
import io.netty.handler.codec.http.DefaultHttpResponse;
import io.netty.handler.codec.http.FullHttpRequest;
import io.netty.handler.codec.http.FullHttpResponse;
import io.netty.handler.codec.http.HttpHeaderNames;
import io.netty.handler.codec.http.HttpHeaderValues;
import io.netty.handler.codec.http.HttpResponse;
import io.netty.handler.codec.http.HttpUtil;
import io.netty.handler.codec.http.LastHttpContent;
import io.netty.util.CharsetUtil;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.io.RandomAccessFile;
import java.net.URL;
import static io.netty.handler.codec.http.HttpHeaderNames.*;
import static io.netty.handler.codec.http.HttpHeaderValues.KEEP_ALIVE;
import static io.netty.handler.codec.http.HttpHeaderValues.*;
import static io.netty.handler.codec.http.HttpResponseStatus.*;
import static io.netty.handler.codec.http.HttpVersion.*;
@Sharable
public final class StompWebSocketClientPageHandler extends SimpleChannelInboundHandler<FullHttpRequest> {
static final StompWebSocketClientPageHandler INSTANCE = new StompWebSocketClientPageHandler();
private StompWebSocketClientPageHandler() {
}
@Override
protected void channelRead0(ChannelHandlerContext ctx, FullHttpRequest request) {
if (request.headers().contains(HttpHeaderNames.UPGRADE, HttpHeaderValues.WEBSOCKET, true)) {
ctx.fireChannelRead(request.retain());
return;
}
if (request.decoderResult().isFailure()) {
// ... (87 more lines)
Domain
Subdomains
Classes
Source
Frequently Asked Questions
What does StompWebSocketClientPageHandler.java do?
StompWebSocketClientPageHandler.java is a source file in the netty codebase, written in java. It belongs to the Buffer domain, Allocators subdomain.
Where is StompWebSocketClientPageHandler.java in the architecture?
StompWebSocketClientPageHandler.java is located at example/src/main/java/io/netty/example/stomp/websocket/StompWebSocketClientPageHandler.java (domain: Buffer, subdomain: Allocators, directory: example/src/main/java/io/netty/example/stomp/websocket).
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free