本文整理了Java中com.alibaba.dubbo.common.URL.toInetSocketAddress()
方法的一些代码示例,展示了URL.toInetSocketAddress()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。URL.toInetSocketAddress()
方法的具体详情如下:
包路径:com.alibaba.dubbo.common.URL
类名称:URL
方法名:toInetSocketAddress
暂无
代码示例来源:origin: com.alibaba/dubbo
@Override
public InetSocketAddress getLocalAddress() {
return url.toInetSocketAddress();
}
代码示例来源:origin: com.alibaba/dubbo-remoting-http
@Override
public InetSocketAddress getLocalAddress() {
return url.toInetSocketAddress();
}
代码示例来源:origin: remoting/dubbox
public InetSocketAddress getLocalAddress() {
return url.toInetSocketAddress();
}
代码示例来源:origin: remoting/dubbox
public InetSocketAddress getLocalAddress() {
return url.toInetSocketAddress();
}
代码示例来源:origin: net.jahhan/dubbo-remoting-http
public InetSocketAddress getLocalAddress() {
return url.toInetSocketAddress();
}
代码示例来源:origin: com.alibaba/dubbo
@Override
public InetSocketAddress getRemoteAddress() {
Channel channel = getChannel();
if (channel == null)
return getUrl().toInetSocketAddress();
return channel.getRemoteAddress();
}
代码示例来源:origin: net.jahhan/dubbo-remoting-api
public InetSocketAddress getRemoteAddress() {
Channel channel = getChannel();
if (channel == null)
return getUrl().toInetSocketAddress();
return channel.getRemoteAddress();
}
代码示例来源:origin: com.alibaba/dubbo-remoting-p2p
private void changed() throws RemotingException {
try {
String[] lines = IOUtils.readLines(file);
for (String line : lines) {
connect(URL.valueOf(line));
}
} catch (IOException e) {
throw new RemotingException(new InetSocketAddress(NetUtils.getLocalHost(), 0), getUrl().toInetSocketAddress(), e.getMessage(), e);
}
}
代码示例来源:origin: com.alibaba/dubbo
private void changed() throws RemotingException {
try {
String[] lines = IOUtils.readLines(file);
for (String line : lines) {
connect(URL.valueOf(line));
}
} catch (IOException e) {
throw new RemotingException(new InetSocketAddress(NetUtils.getLocalHost(), 0), getUrl().toInetSocketAddress(), e.getMessage(), e);
}
}
代码示例来源:origin: remoting/dubbox
private void changed() throws RemotingException {
try {
String[] lines = IOUtils.readLines(file);
for (String line : lines) {
connect(URL.valueOf(line));
}
} catch (IOException e) {
throw new RemotingException(new InetSocketAddress(NetUtils.getLocalHost(), 0), getUrl().toInetSocketAddress(), e.getMessage(), e);
}
}
代码示例来源:origin: com.alibaba/dubbo-remoting-p2p
private void changed() throws RemotingException {
try {
String[] lines = IOUtils.readLines(file);
for (String line : lines) {
connect(URL.valueOf(line));
}
} catch (IOException e) {
throw new RemotingException(new InetSocketAddress(NetUtils.getLocalHost(), 0), getUrl().toInetSocketAddress(), e.getMessage(), e);
}
}
代码示例来源:origin: com.alibaba/dubbo
private void changed() throws RemotingException {
try {
String[] lines = IOUtils.readLines(file);
for (String line : lines) {
connect(URL.valueOf(line));
}
} catch (IOException e) {
throw new RemotingException(new InetSocketAddress(NetUtils.getLocalHost(), 0), getUrl().toInetSocketAddress(), e.getMessage(), e);
}
}
代码示例来源:origin: remoting/dubbox
private void changed() throws RemotingException {
try {
String[] lines = IOUtils.readLines(file);
for (String line : lines) {
connect(URL.valueOf(line));
}
} catch (IOException e) {
throw new RemotingException(new InetSocketAddress(NetUtils.getLocalHost(), 0), getUrl().toInetSocketAddress(), e.getMessage(), e);
}
}
代码示例来源:origin: remoting/dubbox
public InetSocketAddress getRemoteAddress() {
Channel channel = getChannel();
if (channel == null)
return getUrl().toInetSocketAddress();
return channel.getRemoteAddress();
}
代码示例来源:origin: remoting/dubbox
private void changed() throws RemotingException {
try {
String[] lines = IOUtils.readLines(file);
for (String line : lines) {
connect(URL.valueOf(line));
}
} catch (IOException e) {
throw new RemotingException(new InetSocketAddress(NetUtils.getLocalHost(), 0), getUrl().toInetSocketAddress(), e.getMessage(), e);
}
}
代码示例来源:origin: remoting/dubbox
public InetSocketAddress getRemoteAddress() {
Channel channel = getChannel();
if (channel == null)
return getUrl().toInetSocketAddress();
return channel.getRemoteAddress();
}
代码示例来源:origin: com.alibaba/dubbo-remoting-api
@Override
public InetSocketAddress getRemoteAddress() {
Channel channel = getChannel();
if (channel == null)
return getUrl().toInetSocketAddress();
return channel.getRemoteAddress();
}
代码示例来源:origin: remoting/dubbox
private void changed() throws RemotingException {
try {
String[] lines = IOUtils.readLines(file);
for (String line : lines) {
connect(URL.valueOf(line));
}
} catch (IOException e) {
throw new RemotingException(new InetSocketAddress(NetUtils.getLocalHost(), 0), getUrl().toInetSocketAddress(), e.getMessage(), e);
}
}
代码示例来源:origin: com.alibaba/dubbo
public ExchangePeer joinExchange(URL url, ExchangeHandler handler) throws RemotingException {
ExchangePeer peer = super.join(url, handler);
try {
String full = url.toFullString();
String[] lines = IOUtils.readLines(file);
for (String line : lines) {
if (full.equals(line)) {
return peer;
}
}
IOUtils.appendLines(file, new String[]{full});
} catch (IOException e) {
throw new RemotingException(new InetSocketAddress(NetUtils.getLocalHost(), 0), getUrl().toInetSocketAddress(), e.getMessage(), e);
}
return peer;
}
代码示例来源:origin: com.alibaba/dubbo
@Override
public Peer join(URL url, ChannelHandler handler) throws RemotingException {
Peer peer = super.join(url, handler);
try {
String full = url.toFullString();
String[] lines = IOUtils.readLines(file);
for (String line : lines) {
if (full.equals(line)) {
return peer;
}
}
IOUtils.appendLines(file, new String[]{full});
} catch (IOException e) {
throw new RemotingException(new InetSocketAddress(NetUtils.getLocalHost(), 0), getUrl().toInetSocketAddress(), e.getMessage(), e);
}
return peer;
}
内容来源于网络,如有侵权,请联系作者删除!