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

com.github.netty.protocol.nrpc.RpcServerAop Maven / Gradle / Ivy

The newest version!
package com.github.netty.protocol.nrpc;

import com.github.netty.protocol.NRpcProtocol;
import io.netty.util.concurrent.FastThreadLocal;

import java.util.Map;

/**
 * event aop
 *
 * @author wangzihao
 */
public interface RpcServerAop {

    FastThreadLocal> CONTEXT_LOCAL = new FastThreadLocal<>();

    default void onInitAfter(NRpcProtocol protocol) {
    }

    default void onConnectAfter(RpcServerChannelHandler channel) {
    }

    default void onDisconnectAfter(RpcServerChannelHandler channel) {
    }

    default void onDecodeRequestBefore(RpcContext rpcContext, Map params) {
    }

    default void onChunkAfter(RpcContext rpcContext, Object chunk, int chunkIndex, int chunkId, RpcEmitter emitter) {
    }

    default void onResponseAfter(RpcContext rpcContext) {
    }

    default void onTimeout(RpcContext rpcContext) {
    }

    default void onStateUpdate(RpcContext rpcContext, State formState, State toState) {
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy