org.neociclo.odetteftp.service
Class Client

java.lang.Object
  extended by org.neociclo.odetteftp.service.Client
Direct Known Subclasses:
TcpClient

public abstract class Client
extends Object

Version:
$Rev: 791 $ $Date: 2010-10-18 16:03:47 -0200 (Mon, 18 Oct 2010) $
Author:
Rafael Marins

Field Summary
protected  Runnable disconnectListener
           
 
Constructor Summary
Client(OftpletFactory oftpletFactory)
           
 
Method Summary
 void awaitDisconnect()
           
 void connect()
           
 void connect(boolean await)
           
protected abstract  org.jboss.netty.channel.ChannelFactory createChannelFactory()
           
 void disconnect()
           
protected  org.jboss.netty.channel.Channel getChannel()
           
 Runnable getDisconnectListener()
           
protected abstract  SocketAddress getLocalAddress()
           
protected abstract  org.jboss.netty.channel.ChannelPipelineFactory getPipelineFactory(OftpletFactory oftpletFactory, org.jboss.netty.util.Timer timer)
           
protected abstract  SocketAddress getRemoteAddress()
           
 org.jboss.netty.util.Timer getTimer()
           
 boolean isConnected()
           
protected  void releaseExternalResources()
           
 void setDisconnectListener(Runnable onDisconnect)
           
 void setTimer(org.jboss.netty.util.Timer timer)
          The Timer which was specified should be stopped manually by calling Timer.stop() when your application shuts down.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

disconnectListener

protected Runnable disconnectListener
Constructor Detail

Client

public Client(OftpletFactory oftpletFactory)
Method Detail

connect

public void connect()
             throws Exception
Throws:
Exception

connect

public void connect(boolean await)
             throws Exception
Throws:
Exception

awaitDisconnect

public void awaitDisconnect()

isConnected

public boolean isConnected()

disconnect

public void disconnect()
                throws Exception
Throws:
Exception

getRemoteAddress

protected abstract SocketAddress getRemoteAddress()

getLocalAddress

protected abstract SocketAddress getLocalAddress()

getPipelineFactory

protected abstract org.jboss.netty.channel.ChannelPipelineFactory getPipelineFactory(OftpletFactory oftpletFactory,
                                                                                     org.jboss.netty.util.Timer timer)

createChannelFactory

protected abstract org.jboss.netty.channel.ChannelFactory createChannelFactory()

getDisconnectListener

public Runnable getDisconnectListener()

setDisconnectListener

public void setDisconnectListener(Runnable onDisconnect)

getChannel

protected org.jboss.netty.channel.Channel getChannel()

getTimer

public org.jboss.netty.util.Timer getTimer()

setTimer

public void setTimer(org.jboss.netty.util.Timer timer)
The Timer which was specified should be stopped manually by calling Timer.stop() when your application shuts down.

Parameters:
timer -

releaseExternalResources

protected void releaseExternalResources()


ACCORD