public class Connection
extends io.netty.util.AbstractReferenceCounted
implements io.netty.util.ReferenceCounted
| 限定符和类型 | 字段和说明 |
|---|---|
static io.netty.util.AttributeKey<Connection> |
CONNECTION |
| 构造器和说明 |
|---|
Connection(URL url) |
| 限定符和类型 | 方法和说明 |
|---|---|
void |
close() |
io.netty.channel.ChannelFuture |
connect() |
void |
connectSync() |
io.netty.channel.Channel |
getChannel() |
io.netty.util.concurrent.Promise<Void> |
getCloseFuture() |
static Connection |
getConnectionFromChannel(io.netty.channel.Channel channel) |
InetSocketAddress |
getRemote() |
URL |
getUrl()
get url.
|
boolean |
isAvailable() |
boolean |
isClosed() |
void |
onConnected(io.netty.channel.Channel channel) |
void |
onGoaway(io.netty.channel.Channel channel) |
String |
toString() |
io.netty.util.ReferenceCounted |
touch(Object hint) |
io.netty.channel.ChannelFuture |
write(Object request) |
public static final io.netty.util.AttributeKey<Connection> CONNECTION
public Connection(URL url)
public static Connection getConnectionFromChannel(io.netty.channel.Channel channel)
public io.netty.util.concurrent.Promise<Void> getCloseFuture()
public io.netty.channel.ChannelFuture connect()
public io.netty.channel.Channel getChannel()
public void onGoaway(io.netty.channel.Channel channel)
public void onConnected(io.netty.channel.Channel channel)
public void connectSync()
throws InterruptedException,
ExecutionException,
TimeoutException
public boolean isAvailable()
public boolean isClosed()
public io.netty.channel.ChannelFuture write(Object request) throws RemotingException
public InetSocketAddress getRemote()
public void close()
public io.netty.util.ReferenceCounted touch(Object hint)
touch 在接口中 io.netty.util.ReferenceCountedpublic URL getUrl()
Copyright © 2011–2021 The Apache Software Foundation. All rights reserved.