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 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() |
int |
getSocketHashCode() |
int |
hashCode() |
boolean |
isLastLocalChannelActive(LocalChannelReference localChannelReference) |
boolean |
isShuttingDown() |
boolean |
isSomeLocalChannelsActive() |
boolean |
isSSL() |
void |
lockNetwork() |
int |
nbLocalChannels() |
void |
remove(LocalChannelReference localChannel)
Remove one LocalChanelReference
|
void |
setHostId(String hostId) |
void |
shutdownAllLocalChannels()
Shutdown All Local Channels associated with this NCR
|
long |
shutdownAllowed() |
String |
toString() |
void |
unlockNetwork() |
void |
use()
To set the last time used
|
boolean |
useIfUsed()
To set the last time used when correct
|
protected 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 final boolean isSSL()
public final void add(LocalChannelReference localChannel) throws OpenR66ProtocolRemoteShutdownException
public final void use()
public final boolean useIfUsed()
public final void closeAndRemove(LocalChannelReference localChannel)
localChannel
- public final void remove(LocalChannelReference localChannel)
localChannel
- public final void shutdownAllLocalChannels()
public final boolean isLastLocalChannelActive(LocalChannelReference localChannelReference)
localChannelReference
- the localChannelReference to be closedpublic final long shutdownAllowed()
public final void lockNetwork()
public final void unlockNetwork()
public final int nbLocalChannels()
public final boolean isSomeLocalChannelsActive()
public final int getSocketHashCode()
public final int getAddressHashCode()
public final long checkLastTime(long delay)
delay
- public final boolean isShuttingDown()
public final io.netty.channel.Channel channel()
public final String getHostId()
public final void setHostId(String hostId)
hostId
- the hostId to setpublic final long getLastTimeUsed()
Copyright © 2009–2022 Waarp. All rights reserved.