openr66.protocol.localhandler
Class LocalChannelReference

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

public class LocalChannelReference
extends Object

Reference of one object using Local Channel localId and containing local channel and network channel.

Author:
Frederic Bregier

Constructor Summary
LocalChannelReference()
          Special empty LCR constructor
LocalChannelReference(org.jboss.netty.channel.Channel localChannel, org.jboss.netty.channel.Channel networkChannel, Integer remoteId, R66Future futureRequest)
           
 
Method Summary
 org.jboss.netty.handler.traffic.ChannelTrafficShapingHandler getChannelTrafficShapingHandler()
           
 ClientRunner getClientRunner()
           
 ErrorCode getCurrentCode()
           
 goldengate.common.database.DbSession getDbSession()
           
 String getErrorMessage()
           
 R66Future getFutureEndTransfer()
           
 R66Future getFutureRequest()
           
 R66Future getFutureValidateConnection()
           
 R66Future getFutureValidateStartup()
           
 R66Future getFutureValidRequest()
           
 org.jboss.netty.channel.Channel getLocalChannel()
           
 Integer getLocalId()
           
 org.jboss.netty.channel.Channel getNetworkChannel()
           
 NetworkChannel getNetworkChannelObject()
           
 NetworkServerHandler getNetworkServerHandler()
           
 RecvThroughHandler getRecvThroughHandler()
           
 Integer getRemoteId()
           
 R66Session getSession()
           
 void invalidateRequest(R66Result finalvalue)
          Invalidate the current request
 boolean isRecvThroughMode()
           
 boolean isSendThroughMode()
           
 void sessionNewState(R66FiniteDualStates desiredState)
          Shortcut to set a new state in Session
 void setClientRunner(ClientRunner clientRunner)
           
 void setErrorMessage(String errorMessage, ErrorCode code)
           
 void setNetworkChannelObject(NetworkChannel networkChannelObject)
           
 void setRecvThroughHandler(RecvThroughHandler recvThroughHandler)
           
 void setRemoteId(Integer remoteId)
           
 void setSendThroughMode(boolean isSendThroughMode)
           
 void setSession(R66Session session)
           
 String toString()
           
 void validateConnection(boolean validate, R66Result result)
          Validate or Invalidate the connection (authentication)
 void validateEndTransfer(R66Result finalValue)
          Validate the End of a Transfer
 void validateRequest(R66Result finalValue)
          Validate the current Request
 void validateStartup(boolean validate)
          Validate or not the Startup (before connection)
 void waitReadyForSendThrough()
          Special waiter for Send Through method.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

LocalChannelReference

public LocalChannelReference(org.jboss.netty.channel.Channel localChannel,
                             org.jboss.netty.channel.Channel networkChannel,
                             Integer remoteId,
                             R66Future futureRequest)
Parameters:
localChannel -
networkChannel -
remoteId -
futureRequest -

LocalChannelReference

public LocalChannelReference()
Special empty LCR constructor

Method Detail

getLocalChannel

public org.jboss.netty.channel.Channel getLocalChannel()
Returns:
the localChannel

getNetworkChannel

public org.jboss.netty.channel.Channel getNetworkChannel()
Returns:
the networkChannel

getLocalId

public Integer getLocalId()
Returns:
the id

getRemoteId

public Integer getRemoteId()
Returns:
the remoteId

getChannelTrafficShapingHandler

public org.jboss.netty.handler.traffic.ChannelTrafficShapingHandler getChannelTrafficShapingHandler()
Returns:
the ChannelTrafficShapingHandler

getNetworkChannelObject

public NetworkChannel getNetworkChannelObject()
Returns:
the networkChannelObject

setNetworkChannelObject

public void setNetworkChannelObject(NetworkChannel networkChannelObject)
Parameters:
networkChannelObject - the networkChannelObject to set

getNetworkServerHandler

public NetworkServerHandler getNetworkServerHandler()
Returns:
the networkServerHandler

getDbSession

public goldengate.common.database.DbSession getDbSession()
Returns:
the actual dbSession

setRemoteId

public void setRemoteId(Integer remoteId)
Parameters:
remoteId - the remoteId to set

getSession

public R66Session getSession()
Returns:
the session

setSession

public void setSession(R66Session session)
Parameters:
session - the session to set

getErrorMessage

public String getErrorMessage()
Returns:
the current errorMessage

setErrorMessage

public void setErrorMessage(String errorMessage,
                            ErrorCode code)
Parameters:
errorMessage - the errorMessage to set

getCurrentCode

public ErrorCode getCurrentCode()
Returns:
the code

validateStartup

public void validateStartup(boolean validate)
Validate or not the Startup (before connection)

Parameters:
validate -

getFutureValidateStartup

public R66Future getFutureValidateStartup()
Returns:
the futureValidateStartup

validateConnection

public void validateConnection(boolean validate,
                               R66Result result)
Validate or Invalidate the connection (authentication)

Parameters:
validate -

getFutureValidateConnection

public R66Future getFutureValidateConnection()
Returns:
the futureValidateConnection

validateEndTransfer

public void validateEndTransfer(R66Result finalValue)
Validate the End of a Transfer

Parameters:
finalValue -

getFutureEndTransfer

public R66Future getFutureEndTransfer()
Returns:
the futureEndTransfer

waitReadyForSendThrough

public void waitReadyForSendThrough()
                             throws OpenR66Exception
Special waiter for Send Through method. It reset the EndTransfer future.

Throws:
OpenR66Exception

getFutureValidRequest

public R66Future getFutureValidRequest()
Returns:
the futureValidRequest

getFutureRequest

public R66Future getFutureRequest()
Returns:
the futureRequest

invalidateRequest

public void invalidateRequest(R66Result finalvalue)
Invalidate the current request

Parameters:
finalvalue -

validateRequest

public void validateRequest(R66Result finalValue)
Validate the current Request

Parameters:
finalValue -

toString

public String toString()
Overrides:
toString in class Object

getRecvThroughHandler

public RecvThroughHandler getRecvThroughHandler()
Returns:
the recvThroughHandler

isRecvThroughMode

public boolean isRecvThroughMode()
Returns:
True if in RecvThrough Mode

setRecvThroughHandler

public void setRecvThroughHandler(RecvThroughHandler recvThroughHandler)
Parameters:
recvThroughHandler - the recvThroughHandler to set

isSendThroughMode

public boolean isSendThroughMode()
Returns:
True if in SendThrough Mode

setSendThroughMode

public void setSendThroughMode(boolean isSendThroughMode)
Parameters:
isSendThroughMode - the isSendThroughMode to set

getClientRunner

public ClientRunner getClientRunner()
Returns:
the clientRunner

setClientRunner

public void setClientRunner(ClientRunner clientRunner)
Parameters:
clientRunner - the clientRunner to set

sessionNewState

public void sessionNewState(R66FiniteDualStates desiredState)
Shortcut to set a new state in Session

Parameters:
desiredState -


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