net.kano.joscar.flap
Class ClientFlapConn

java.lang.Object
  extended byClientConn
      extended byClientFlapConn

public class ClientFlapConn
extends ClientConn

A simpler interface to using an outgoing clientside FLAP connection. This class essentially runs a FlapProcessor atop a ClientConn; you should read each's documentation thoroughly.

Note that this class adds a connection listener and sets the stream handler of the its parent ClientConn.


Nested Class Summary
 
Nested classes inherited from class ClientConn
ClientConn.State
 
Field Summary
 
Fields inherited from class ClientConn
REASON_CONN_CLOSED, REASON_ON_PURPOSE, STATE_CONNECTED, STATE_CONNECTING, STATE_FAILED, STATE_INITING, STATE_NOT_CONNECTED, STATE_RESOLVING
 
Constructor Summary
ClientFlapConn()
          Creates a client FLAP connection with the default FLAP command factory and no host, IP, or port to connect to yet.
ClientFlapConn(java.net.InetAddress ip, int port)
          Creates a client FLAP connection with the default FLAP command factory and the given IP and port.
ClientFlapConn(java.lang.String host, int port)
          Creates a client FLAP connection with the default FLAP command factory and the given hostname and port.
 
Method Summary
 FlapProcessor getFlapProcessor()
          Returns the FLAP processor that is running on this connection.
 
Methods inherited from class ClientConn
addConnListener, connect, disconnect, getHost, getIpAddress, getPort, getSocket, getSocketFactory, getState, getStreamHandler, processError, removeConnListener, setHost, setIpAddress, setPort, setSocketFactory, setStreamHandler
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ClientFlapConn

public ClientFlapConn()
Creates a client FLAP connection with the default FLAP command factory and no host, IP, or port to connect to yet.


ClientFlapConn

public ClientFlapConn(java.lang.String host,
                      int port)
Creates a client FLAP connection with the default FLAP command factory and the given hostname and port. The given hostname and port will be be used to connect to when connect is called.

Parameters:
host - the hostname to connect to when connect is called
port - the port to connect to when connect is called

ClientFlapConn

public ClientFlapConn(java.net.InetAddress ip,
                      int port)
Creates a client FLAP connection with the default FLAP command factory and the given IP and port. The given IP and port will be used to connect to when connect is called.

Parameters:
ip - the IP address to connect to when connect is called
port - the port to connect to when connect is called
Method Detail

getFlapProcessor

public final FlapProcessor getFlapProcessor()
Returns the FLAP processor that is running on this connection.

Returns:
this connection's FLAP processor