jtge.engine.net
Class Client

java.lang.Object
  extended byjtge.engine.net.Peer
      extended byjtge.engine.net.Client
All Implemented Interfaces:
IClient, IClosable, IConsumer

public class Client
extends Peer
implements IClient

Implements a client.

Version:
$Revision: 1.3 $ $Date: 2005/09/06 18:00:35 $
Author:
Mathieu Champlon

Constructor Summary
Client(IConsumer consumer, IInputOutputImpFactory factory)
          Create a client.
 
Method Summary
protected  void onClose()
          Perform custom close.
 void open(java.lang.String host, int port)
          Connect the client to a server.
 
Methods inherited from class jtge.engine.net.Peer
close, handle, register, register, register
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface jtge.engine.net.IClosable
close
 

Constructor Detail

Client

public Client(IConsumer consumer,
              IInputOutputImpFactory factory)
Create a client.

Parameters:
consumer - the consumer to handle Clientnds
factory - the input-output implementation factory
Method Detail

open

public final void open(java.lang.String host,
                       int port)
Connect the client to a server.

Specified by:
open in interface IClient
Parameters:
host - the host name
port - the host port

onClose

protected final void onClose()
Perform custom close.

Overrides:
onClose in class Peer


Copyright © 2003-2005 . All Rights Reserved.