goldengate.commandexec.client
Class LocalExecClientHandler

java.lang.Object
  extended by org.jboss.netty.channel.SimpleChannelUpstreamHandler
      extended by goldengate.commandexec.client.LocalExecClientHandler
All Implemented Interfaces:
org.jboss.netty.channel.ChannelHandler, org.jboss.netty.channel.ChannelUpstreamHandler
Direct Known Subclasses:
LocalExecSslClientHandler

public class LocalExecClientHandler
extends org.jboss.netty.channel.SimpleChannelUpstreamHandler

Handles a client-side channel for LocalExec


Nested Class Summary
 
Nested classes/interfaces inherited from interface org.jboss.netty.channel.ChannelHandler
org.jboss.netty.channel.ChannelHandler.Sharable
 
Field Summary
protected  LocalExecClientPipelineFactory factory
           
 
Constructor Summary
LocalExecClientHandler(LocalExecClientPipelineFactory factory)
          Constructor
 
Method Summary
 void channelClosed(org.jboss.netty.channel.ChannelHandlerContext ctx, org.jboss.netty.channel.ChannelStateEvent e)
          When closed,
If no messaged were received => NoMessage error is set to future
Else if an error was detected => Set the future to error (with or without exception)
Else if no error occurs => Set success to the future
 void channelConnected(org.jboss.netty.channel.ChannelHandlerContext ctx, org.jboss.netty.channel.ChannelStateEvent e)
           
 void channelDisconnected(org.jboss.netty.channel.ChannelHandlerContext ctx, org.jboss.netty.channel.ChannelStateEvent e)
           
 void exceptionCaught(org.jboss.netty.channel.ChannelHandlerContext ctx, org.jboss.netty.channel.ExceptionEvent e)
           
 void initExecClient()
          Initialize the client status for a new execution
 void messageReceived(org.jboss.netty.channel.ChannelHandlerContext ctx, org.jboss.netty.channel.MessageEvent e)
           
 LocalExecResult waitFor(long delay)
          Waiting for the close of the exec
 
Methods inherited from class org.jboss.netty.channel.SimpleChannelUpstreamHandler
channelBound, channelInterestChanged, channelOpen, channelUnbound, childChannelClosed, childChannelOpen, handleUpstream, writeComplete
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

factory

protected LocalExecClientPipelineFactory factory
Constructor Detail

LocalExecClientHandler

public LocalExecClientHandler(LocalExecClientPipelineFactory factory)
Constructor

Method Detail

initExecClient

public void initExecClient()
Initialize the client status for a new execution


channelConnected

public void channelConnected(org.jboss.netty.channel.ChannelHandlerContext ctx,
                             org.jboss.netty.channel.ChannelStateEvent e)
                      throws Exception
Overrides:
channelConnected in class org.jboss.netty.channel.SimpleChannelUpstreamHandler
Throws:
Exception

channelDisconnected

public void channelDisconnected(org.jboss.netty.channel.ChannelHandlerContext ctx,
                                org.jboss.netty.channel.ChannelStateEvent e)
                         throws Exception
Overrides:
channelDisconnected in class org.jboss.netty.channel.SimpleChannelUpstreamHandler
Throws:
Exception

channelClosed

public void channelClosed(org.jboss.netty.channel.ChannelHandlerContext ctx,
                          org.jboss.netty.channel.ChannelStateEvent e)
                   throws Exception
When closed,
If no messaged were received => NoMessage error is set to future
Else if an error was detected => Set the future to error (with or without exception)
Else if no error occurs => Set success to the future

Overrides:
channelClosed in class org.jboss.netty.channel.SimpleChannelUpstreamHandler
Throws:
Exception
See Also:
SimpleChannelUpstreamHandler.channelClosed(org.jboss.netty.channel.ChannelHandlerContext, org.jboss.netty.channel.ChannelStateEvent)

waitFor

public LocalExecResult waitFor(long delay)
Waiting for the close of the exec

Returns:
The LocalExecResult

messageReceived

public void messageReceived(org.jboss.netty.channel.ChannelHandlerContext ctx,
                            org.jboss.netty.channel.MessageEvent e)
Overrides:
messageReceived in class org.jboss.netty.channel.SimpleChannelUpstreamHandler

exceptionCaught

public void exceptionCaught(org.jboss.netty.channel.ChannelHandlerContext ctx,
                            org.jboss.netty.channel.ExceptionEvent e)
Overrides:
exceptionCaught in class org.jboss.netty.channel.SimpleChannelUpstreamHandler


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