|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectopenr66.protocol.networkhandler.NetworkTransaction
public class NetworkTransaction
This class handles Network Transaction connections
Constructor Summary | |
---|---|
NetworkTransaction()
|
Method Summary | |
---|---|
static void |
addClient(org.jboss.netty.channel.Channel channel,
String requester)
Add a requester channel (so call only by requested host) |
static void |
addLocalChannelToNetworkChannel(org.jboss.netty.channel.Channel networkChannel,
org.jboss.netty.channel.Channel localChannel)
Add a LocalChannel to a NetworkChannel |
static void |
addNetworkChannel(org.jboss.netty.channel.Channel channel)
|
void |
closeAll()
Close all Network Ttransaction |
static void |
closeRetrieveExecutors()
Stop all Retrieve Executors |
LocalChannelReference |
createConnection(SocketAddress socketAddress,
boolean isSSL,
R66Future futureRequest)
Create a connection to the specified socketAddress |
static LocalChannelReference |
createConnectionFromNetworkChannelStartup(org.jboss.netty.channel.Channel channel,
NetworkPacket packet)
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 |
static int |
existConnection(SocketAddress address,
String host)
|
static int |
getNbLocalChannel(org.jboss.netty.channel.Channel channel)
|
static NetworkChannel |
getNetworkChannel(org.jboss.netty.channel.Channel channel)
|
static int |
getNumberClients(String requester)
|
static ExecutorService |
getRetrieveExecutor()
|
static ConcurrentHashMap<Integer,RetrieveRunner> |
getRetrieveRunnerConcurrentHashMap()
|
static boolean |
isShuttingdownNetworkChannel(SocketAddress address)
|
static void |
normalEndRetrieve(LocalChannelReference localChannelReference)
Normal end of a Retrieve Operation |
static void |
removeClient(String requester,
NetworkChannel networkChannel)
Remove of requester |
static int |
removeForceNetworkChannel(SocketAddress address)
Force remove of NetworkChannel when it is closed |
static int |
removeNetworkChannel(org.jboss.netty.channel.Channel channel,
org.jboss.netty.channel.Channel localChannel,
String requester)
|
static void |
runRetrieve(R66Session session,
org.jboss.netty.channel.Channel channel)
Start retrieve operation |
static void |
shuttingdownNetworkChannel(org.jboss.netty.channel.Channel channel)
Shutdown one Network Channel |
static boolean |
shuttingdownNetworkChannel(SocketAddress address,
org.jboss.netty.channel.Channel channel)
Shutdown one Network Channel according to its SocketAddress |
static boolean |
shuttingdownNetworkChannels(String requester)
Get NetworkChannel as client |
static void |
stopRetrieve(LocalChannelReference localChannelReference)
Stop a retrieve operation |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public NetworkTransaction()
Method Detail |
---|
public LocalChannelReference createConnectionWithRetry(SocketAddress socketAddress, boolean isSSL, R66Future futureRequest)
socketAddress
- isSSL
- futureRequest
-
public LocalChannelReference createConnection(SocketAddress socketAddress, boolean isSSL, R66Future futureRequest) throws OpenR66ProtocolNetworkException, OpenR66ProtocolRemoteShutdownException, OpenR66ProtocolNoConnectionException
socketAddress
- isSSL
- futureRequest
-
OpenR66ProtocolNetworkException
OpenR66ProtocolRemoteShutdownException
OpenR66ProtocolNoConnectionException
public static LocalChannelReference createConnectionFromNetworkChannelStartup(org.jboss.netty.channel.Channel channel, NetworkPacket packet) throws OpenR66ProtocolRemoteShutdownException, OpenR66ProtocolSystemException
channel
- packet
-
OpenR66ProtocolRemoteShutdownException
OpenR66ProtocolSystemException
public static ExecutorService getRetrieveExecutor()
public static ConcurrentHashMap<Integer,RetrieveRunner> getRetrieveRunnerConcurrentHashMap()
public static void runRetrieve(R66Session session, org.jboss.netty.channel.Channel channel)
session
- channel
- public static void stopRetrieve(LocalChannelReference localChannelReference)
localChannelReference
- public static void normalEndRetrieve(LocalChannelReference localChannelReference)
localChannelReference
- public static void closeRetrieveExecutors()
public void closeAll()
public static void addNetworkChannel(org.jboss.netty.channel.Channel channel) throws OpenR66ProtocolRemoteShutdownException
channel
-
OpenR66ProtocolRemoteShutdownException
public static void addLocalChannelToNetworkChannel(org.jboss.netty.channel.Channel networkChannel, org.jboss.netty.channel.Channel localChannel) throws OpenR66ProtocolRemoteShutdownException
networkChannel
- localChannel
-
OpenR66ProtocolRemoteShutdownException
public static void shuttingdownNetworkChannel(org.jboss.netty.channel.Channel channel)
channel
- public static boolean shuttingdownNetworkChannel(SocketAddress address, org.jboss.netty.channel.Channel channel)
address
- channel
- (can be null)
public static boolean isShuttingdownNetworkChannel(SocketAddress address)
address
-
public static void removeClient(String requester, NetworkChannel networkChannel)
requester
- networkChannel
- public static boolean shuttingdownNetworkChannels(String requester)
requester
-
public static void addClient(org.jboss.netty.channel.Channel channel, String requester)
channel
- (network channel)requester
- public static int getNumberClients(String requester)
requester
-
public static int removeForceNetworkChannel(SocketAddress address)
address
-
public static int removeNetworkChannel(org.jboss.netty.channel.Channel channel, org.jboss.netty.channel.Channel localChannel, String requester)
channel
- networkChannellocalChannel
- localChannelrequester
- Requester since call from LocalChannel close (might be null)
public static int existConnection(SocketAddress address, String host)
address
- host
-
public static int getNbLocalChannel(org.jboss.netty.channel.Channel channel)
channel
-
public static NetworkChannel getNetworkChannel(org.jboss.netty.channel.Channel channel)
channel
-
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |