jtge.engine.net
Class ClientFactory

java.lang.Object
  extended byjtge.engine.net.ClientFactory
All Implemented Interfaces:
IClient, IClosable, IPeerFactory

public class ClientFactory
extends java.lang.Object
implements IPeerFactory, IClient

Adapts a peer factory to provide late initialization for a client.

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

Constructor Summary
ClientFactory(IInputOutputFactoryFactory factory)
          Create a server factory.
 
Method Summary
 void close()
          Perform a close operation.
 IClosable create(ISessionManager manager)
          Create a peer.
 void open(java.lang.String host, int port)
          Connect the client to a server.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ClientFactory

public ClientFactory(IInputOutputFactoryFactory factory)
Create a server factory.

Parameters:
factory - a factory for input-output factories
Method Detail

create

public final IClosable create(ISessionManager manager)
Create a peer.

Specified by:
create in interface IPeerFactory
Parameters:
manager - the session manager
Returns:
a closable

close

public final void close()
Perform a close operation.

Specified by:
close in interface IClosable

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


Copyright © 2003-2005 . All Rights Reserved.