public class NetworkChannelReference extends Object
Modifier and Type | Field and Description |
---|---|
protected io.netty.channel.Channel |
channel
Network Channel
|
protected ClientNetworkChannels |
clientNetworkChannels
ClientNetworkChannels object that contains this NetworkChannelReference
|
protected boolean |
isShuttingDown
Does this Network Channel is in shutdown
|
protected WaarpLock |
lock
Associated lock
|
protected static WaarpLogger |
logger
Internal Logger
|
protected SocketAddress |
networkAddress
Remote network address (when valid)
|
Constructor and Description |
---|
NetworkChannelReference(io.netty.channel.Channel networkChannel,
WaarpLock lock,
boolean isSSL) |
NetworkChannelReference(SocketAddress address,
WaarpLock lock,
boolean isSSL) |
Modifier and Type | Method and Description |
---|---|
void |
add(LocalChannelReference localChannel) |
io.netty.channel.Channel |
channel() |
long |
checkLastTime(long delay)
Check if the last time used is ok with a delay applied to the current
time
(timeout)
|
void |
closeAndRemove(LocalChannelReference localChannel)
Remove one LocalChanelReference, closing it if necessary.
|
boolean |
equals(Object obj) |
int |
getAddressHashCode()
Used for BlackList
|
String |
getHostId() |
long |
getLastTimeUsed() |
WaarpLock |
getLock() |
int |
getSocketHashCode() |
int |
hashCode() |
boolean |
isShuttingDown() |
boolean |
isSSL() |
int |
nbLocalChannels() |
void |
remove(LocalChannelReference localChannel)
Remove one LocalChanelReference
|
void |
setHostId(String hostId) |
void |
shutdownAllLocalChannels()
Shutdown All Local Channels associated with this NCR
|
String |
toString() |
void |
use()
To set the last time used
|
boolean |
useIfUsed()
To set the last time used when correct
|
protected static final WaarpLogger logger
protected volatile boolean isShuttingDown
protected final io.netty.channel.Channel channel
protected final SocketAddress networkAddress
protected ClientNetworkChannels clientNetworkChannels
protected final WaarpLock lock
public NetworkChannelReference(io.netty.channel.Channel networkChannel, WaarpLock lock, boolean isSSL)
public NetworkChannelReference(SocketAddress address, WaarpLock lock, boolean isSSL)
public boolean isSSL()
public void add(LocalChannelReference localChannel) throws OpenR66ProtocolRemoteShutdownException
public void use()
public boolean useIfUsed()
public void closeAndRemove(LocalChannelReference localChannel)
localChannel
- public void remove(LocalChannelReference localChannel)
localChannel
- public void shutdownAllLocalChannels()
public int nbLocalChannels()
public int getSocketHashCode()
public int getAddressHashCode()
public long checkLastTime(long delay)
delay
- public boolean isShuttingDown()
public io.netty.channel.Channel channel()
public String getHostId()
public void setHostId(String hostId)
hostId
- the hostId to setpublic WaarpLock getLock()
public long getLastTimeUsed()
Copyright © 2009–2020 Waarp. All rights reserved.