openr66.protocol.localhandler
Class LocalTransaction

java.lang.Object
  extended by openr66.protocol.localhandler.LocalTransaction

public class LocalTransaction
extends Object

This class handles Local Transaction connections

Author:
frederic bregier

Constructor Summary
LocalTransaction()
          Constructor
 
Method Summary
 void closeAll()
          Close All Local Channels
 void closeLocalChannelsFromNetworkChannel(org.jboss.netty.channel.Channel networkChannel)
          Close all Local Channels from the NetworkChannel
 LocalChannelReference createNewClient(org.jboss.netty.channel.Channel networkChannel, Integer remoteId, R66Future futureRequest)
          Create a new Client
 void debugPrintActiveLocalChannels()
          Debug function (while shutdown for instance)
 LocalChannelReference getClient(Integer remoteId, Integer localId)
          Get the corresponding LocalChannelReference
 LocalChannelReference getFromId(Integer id)
           
 LocalChannelReference getFromRequest(String key)
           
 int getNumberLocalChannel()
           
 void remove(org.jboss.netty.channel.Channel channel)
          Remove one local channel
 void setFromId(DbTaskRunner runner, LocalChannelReference lcr)
           
 void shutdownLocalChannels()
          Informs all remote client that the server is shutting down
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LocalTransaction

public LocalTransaction()
Constructor

Method Detail

getClient

public LocalChannelReference getClient(Integer remoteId,
                                       Integer localId)
                                throws OpenR66ProtocolSystemException
Get the corresponding LocalChannelReference

Parameters:
remoteId -
localId -
Returns:
the LocalChannelReference
Throws:
OpenR66ProtocolSystemException

createNewClient

public LocalChannelReference createNewClient(org.jboss.netty.channel.Channel networkChannel,
                                             Integer remoteId,
                                             R66Future futureRequest)
                                      throws OpenR66ProtocolSystemException
Create a new Client

Parameters:
networkChannel -
remoteId -
futureRequest -
Returns:
the LocalChannelReference
Throws:
OpenR66ProtocolSystemException

getFromId

public LocalChannelReference getFromId(Integer id)
Parameters:
id -
Returns:
the LocalChannelReference

remove

public void remove(org.jboss.netty.channel.Channel channel)
Remove one local channel

Parameters:
channel -

setFromId

public void setFromId(DbTaskRunner runner,
                      LocalChannelReference lcr)
Parameters:
runner -
lcr -

getFromRequest

public LocalChannelReference getFromRequest(String key)
Parameters:
key - as "requested requester specialId"
Returns:
the LocalChannelReference

getNumberLocalChannel

public int getNumberLocalChannel()
Returns:
the number of active local channels

closeLocalChannelsFromNetworkChannel

public void closeLocalChannelsFromNetworkChannel(org.jboss.netty.channel.Channel networkChannel)
Close all Local Channels from the NetworkChannel

Parameters:
networkChannel -

debugPrintActiveLocalChannels

public void debugPrintActiveLocalChannels()
Debug function (while shutdown for instance)


shutdownLocalChannels

public void shutdownLocalChannels()
Informs all remote client that the server is shutting down


closeAll

public void closeAll()
Close All Local Channels



Copyright © 2009-2012 Frederic Bregier. All Rights Reserved.