public class NetworkTransaction extends Object
Constructor and Description |
---|
NetworkTransaction() |
Modifier and Type | Method and Description |
---|---|
static void |
addClient(NetworkChannelReference networkChannelReference,
String requester)
Add a requester channel
|
static NetworkChannelReference |
addNetworkChannel(io.netty.channel.Channel channel,
boolean isSsl)
Add a new NetworkChannel from connection
|
static int |
checkClosingNetworkChannel(NetworkChannelReference networkChannelReference,
LocalChannelReference localChannelReference)
Check if closing of the localChannel will bring future closing of
NetworkChannel
|
void |
closeAll()
Close all Network Ttransaction
|
void |
closeAll(boolean quickShutdown)
Close all Network Ttransaction
|
static void |
closedNetworkChannel(NetworkChannelReference networkChannelReference)
Force remove of NetworkChannelReference when it is closed
|
static void |
closedNetworkChannel(SocketAddress address)
Force remove of NetworkChannelReference when it is closed
|
static LocalChannelReference |
createConnectionFromNetworkChannelStartup(NetworkChannelReference networkChannelReference,
NetworkPacket startupPacket,
boolean fromSsl)
Create the LocalChannelReference when a remote local channel starts its
connection
|
LocalChannelReference |
createConnectionWithRetry(SocketAddress socketAddress,
boolean isSSL,
R66Future futureRequest)
Create a connection to the specified socketAddress with multiple retries
|
LocalChannelReference |
createConnectionWithRetryWithAuthenticationException(SocketAddress socketAddress,
boolean isSSL,
R66Future futureRequest)
Create a connection to the specified socketAddress with multiple retries
|
static NetworkChannelReference |
getImmediateNetworkChannel(io.netty.channel.Channel channel) |
static int |
getNumberClients(String requester) |
static int |
getRetrieveRunnerActive() |
static String |
hashStatus() |
static boolean |
isBlacklisted(io.netty.channel.Channel channel) |
static boolean |
isShuttingdownNetworkChannel(SocketAddress address) |
static int |
nbAttachedConnection(SocketAddress address,
String host) |
static void |
normalEndRetrieve(LocalChannelReference localChannelReference)
Normal end of a Retrieve Operation
|
static void |
proposeShutdownNetworkChannel(SocketAddress socketAddress,
boolean isSSL)
To be called when a remote server seems to be down for a while, so to not
retry immediately
|
static void |
runRetrieve(R66Session session)
Start retrieve operation
|
static void |
shuttingDownNetworkChannel(NetworkChannelReference networkChannelReference)
Shutdown one Network Channel
|
static boolean |
shuttingDownNetworkChannelBlackList(NetworkChannelReference networkChannelReference)
Shutdown a NetworkChannel and add it to BlaclList
|
static boolean |
shuttingdownNetworkChannelsPerHostID(String requester)
Shutdown NetworkChannelReference as client
|
static void |
stopAllEndRetrieve() |
static void |
stopRetrieve(LocalChannelReference localChannelReference)
Stop a retrieve operation
|
public static String hashStatus()
public LocalChannelReference createConnectionWithRetry(SocketAddress socketAddress, boolean isSSL, R66Future futureRequest)
socketAddress
- isSSL
- futureRequest
- public LocalChannelReference createConnectionWithRetryWithAuthenticationException(SocketAddress socketAddress, boolean isSSL, R66Future futureRequest) throws OpenR66ProtocolNotAuthenticatedException
socketAddress
- isSSL
- futureRequest
- OpenR66ProtocolNotAuthenticatedException
public static LocalChannelReference createConnectionFromNetworkChannelStartup(NetworkChannelReference networkChannelReference, NetworkPacket startupPacket, boolean fromSsl)
networkChannelReference
- startupPacket
- public static NetworkChannelReference addNetworkChannel(io.netty.channel.Channel channel, boolean isSsl) throws OpenR66ProtocolRemoteShutdownException
channel
- isSsl
- OpenR66ProtocolRemoteShutdownException
public static void proposeShutdownNetworkChannel(SocketAddress socketAddress, boolean isSSL)
socketAddress
- public static void shuttingDownNetworkChannel(NetworkChannelReference networkChannelReference)
networkChannelReference
- public static boolean shuttingDownNetworkChannelBlackList(NetworkChannelReference networkChannelReference)
networkChannelReference
- public static boolean isBlacklisted(io.netty.channel.Channel channel)
channel
- public static boolean isShuttingdownNetworkChannel(SocketAddress address)
address
- public static boolean shuttingdownNetworkChannelsPerHostID(String requester)
requester
- public static void addClient(NetworkChannelReference networkChannelReference, String requester)
networkChannelReference
- requester
- public static int getNumberClients(String requester)
requester
- public static void closedNetworkChannel(NetworkChannelReference networkChannelReference)
networkChannelReference
- public static void closedNetworkChannel(SocketAddress address)
address
- public static int checkClosingNetworkChannel(NetworkChannelReference networkChannelReference, LocalChannelReference localChannelReference)
networkChannelReference
- localChannelReference
- public static int nbAttachedConnection(SocketAddress address, String host)
address
- host
- public static final NetworkChannelReference getImmediateNetworkChannel(io.netty.channel.Channel channel)
channel
- public static int getRetrieveRunnerActive()
public static void runRetrieve(R66Session session)
session
- public static void stopRetrieve(LocalChannelReference localChannelReference)
localChannelReference
- public static void normalEndRetrieve(LocalChannelReference localChannelReference)
localChannelReference
- public void closeAll()
public void closeAll(boolean quickShutdown)
public static void stopAllEndRetrieve()
Copyright © 2009–2020 Waarp. All rights reserved.