public abstract class AbstractClient extends Object implements Client
| Modifier and Type | Field and Description |
|---|---|
protected Codec |
codec |
protected InetSocketAddress |
localAddress |
protected InetSocketAddress |
remoteAddress |
protected ChannelState |
state |
protected URL |
url |
| Constructor and Description |
|---|
AbstractClient(URL url) |
| Modifier and Type | Method and Description |
|---|---|
InetSocketAddress |
getLocalAddress()
get local socket address.
|
InetSocketAddress |
getRemoteAddress()
get remote socket address
|
void |
heartbeat(Request request)
async send request.
|
void |
setLocalAddress(InetSocketAddress localAddress) |
void |
setRemoteAddress(InetSocketAddress remoteAddress) |
protected InetSocketAddress localAddress
protected InetSocketAddress remoteAddress
protected URL url
protected Codec codec
protected volatile ChannelState state
public AbstractClient(URL url)
public InetSocketAddress getLocalAddress()
ChannelgetLocalAddress in interface Channelpublic InetSocketAddress getRemoteAddress()
ChannelgetRemoteAddress in interface Channelpublic void heartbeat(Request request)
Clientpublic void setLocalAddress(InetSocketAddress localAddress)
public void setRemoteAddress(InetSocketAddress remoteAddress)
Copyright © 2020. All rights reserved.