jtge.engine.net
Class ServerFactory

java.lang.Object
  extended byjtge.engine.net.ServerFactory
All Implemented Interfaces:
IClosable, IPeerFactory, IServer

public class ServerFactory
extends java.lang.Object
implements IPeerFactory, IServer

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

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

Constructor Summary
ServerFactory(IInputOutputFactoryFactory factory)
          Create a server factory.
 
Method Summary
 void close()
          Perform a close operation.
 IClosable create(ISessionManager manager)
          Create a peer.
 void open(int port)
          Open the server listening on a given port.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ServerFactory

public ServerFactory(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

open

public final void open(int port)
Open the server listening on a given port.

Specified by:
open in interface IServer
Parameters:
port - the host port

close

public final void close()
Perform a close operation.

Specified by:
close in interface IClosable


Copyright © 2003-2005 . All Rights Reserved.