com.alibaba.rocketmq.remoting.common
类 RemotingUtil
java.lang.Object
com.alibaba.rocketmq.remoting.common.RemotingUtil
public class RemotingUtil
- extends Object
网络相关方法
- 从以下版本开始:
- 2013-7-13
- 作者:
- shijia.wxr
| 从类 java.lang.Object 继承的方法 |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
OS_NAME
public static final String OS_NAME
RemotingUtil
public RemotingUtil()
isLinuxPlatform
public static boolean isLinuxPlatform()
isWindowsPlatform
public static boolean isWindowsPlatform()
openSelector
public static Selector openSelector()
throws IOException
- 抛出:
IOException
getLocalAddress
public static String getLocalAddress()
normalizeHostAddress
public static String normalizeHostAddress(InetAddress localHost)
string2SocketAddress
public static SocketAddress string2SocketAddress(String addr)
- IP:PORT
socketAddress2String
public static String socketAddress2String(SocketAddress addr)
connect
public static SocketChannel connect(SocketAddress remote)
connect
public static SocketChannel connect(SocketAddress remote,
int timeoutMillis)
closeChannel
public static void closeChannel(io.netty.channel.Channel channel)
Copyright © 2012-2015. All Rights Reserved.