类 NettyChannel
java.lang.Object
com.aizuda.easy.retry.client.common.netty.NettyChannel
- 从以下版本开始:
- 1.3.0
- 作者:
- www.byteblogs.com
-
方法概要
修饰符和类型方法说明static String获取指定的客户IPstatic Integer获取客户端端口static String获取服务端hoststatic int获取服务端端口static void发送数据static voidsetChannel(io.netty.channel.Channel channel)
-
方法详细资料
-
getServerPort
public static int getServerPort()获取服务端端口- 返回:
- port
-
getServerHost
获取服务端host- 返回:
- host
-
getClientHost
获取指定的客户IP- 返回:
- 客户端IP
-
getClientPort
获取客户端端口- 返回:
- port 端口
-
setChannel
public static void setChannel(io.netty.channel.Channel channel) -
send
public static void send(io.netty.handler.codec.http.HttpMethod method, String url, String body) throws InterruptedException 发送数据- 参数:
method- 请求方式url- url地址body- 请求的消息体- 抛出:
InterruptedException
-