Netty 组件

Netty网络抽象层组件

  • Channel—Sockets
  • EventLoop—Control flow, multithreading, concurrency
  • ChannelFuture—Asynchronous notification

Interface Channel

Netty’s Channel interface provides an API that greatly reduces the complexity of working directly with Sockets.

Interface EventLoop

The EventLoop defines Netty’s core abstraction for handling events that occur during the lifetime of a connection

Interface ChannelFuture

As we’ve explained, all I/O operations in Netty are asynchronous. Because an opera- tion may not return immediately, we need a way to determine its result at a later time

ChannelHandler and ChannelPipeline

manage the flow of data and execute an application’s processing logic

Interface ChannelHandler
serves as the container for all application logic
Interface ChannelPipeline

A ChannelPipeline provides a container for a chain of ChannelHandlers and defines an API for propagating the flow of inbound and outbound events along the chain

Encoders and decoders

When you send or receive a message with Netty, a data conversion takes place. An inbound message will be decoded; that is, converted from bytes to another format, typi- cally a Java object. If the message is outbound, the reverse will happen: it will be encoded to bytes from its current format.

Bootstrapping

Netty’s bootstrap classes provide containers for the configuration of an application’s network layer


  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值