All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.github.linyuzai.connection.loadbalance.netty.websocket.WebSocketNettyLoadBalanceHandler Maven / Gradle / Ivy

There is a newer version: 2.7.1
Show newest version
package com.github.linyuzai.connection.loadbalance.netty.websocket;

import com.github.linyuzai.connection.loadbalance.core.concept.Connection;
import com.github.linyuzai.connection.loadbalance.netty.concept.NettyConnection;
import com.github.linyuzai.connection.loadbalance.netty.concept.NettyLoadBalanceConcept;
import com.github.linyuzai.connection.loadbalance.netty.concept.NettyLoadBalanceHandler;
import io.netty.channel.ChannelHandlerContext;

import java.util.Map;

public class WebSocketNettyLoadBalanceHandler extends NettyLoadBalanceHandler {

    public WebSocketNettyLoadBalanceHandler(NettyLoadBalanceConcept concept, Map metadata) {
        super(concept, metadata);
    }

    public WebSocketNettyLoadBalanceHandler(NettyLoadBalanceConcept concept) {
        super(concept);
    }

    public WebSocketNettyLoadBalanceHandler(NettyLoadBalanceConcept concept, String group) {
        super(concept, group);
    }

    @Override
    protected Connection create(ChannelHandlerContext ctx, Map metadata) {
        Connection connection = super.create(ctx, metadata);
        return new WebSocketNettyConnection((NettyConnection) connection);
    }

    @Override
    public void channelRead(ChannelHandlerContext ctx, Object msg) throws Exception {
        //TODO ContinuationWebSocketFrame
        super.channelRead(ctx, msg);
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy