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

字段摘要
static String OS_NAME
           
 
构造方法摘要
RemotingUtil()
           
 
方法摘要
static void closeChannel(io.netty.channel.Channel channel)
           
static SocketChannel connect(SocketAddress remote)
           
static SocketChannel connect(SocketAddress remote, int timeoutMillis)
           
static String getLocalAddress()
           
static boolean isLinuxPlatform()
           
static boolean isWindowsPlatform()
           
static String normalizeHostAddress(InetAddress localHost)
           
static Selector openSelector()
           
static String socketAddress2String(SocketAddress addr)
           
static SocketAddress string2SocketAddress(String addr)
          IP:PORT
 
从类 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.