jtge.engine.net
Class Server

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

public class Server
extends Peer
implements IServer

Implements a server.

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

Constructor Summary
Server(IConsumer consumer, IInputOutputImpFactory factory)
          Create a server.
Server(IConsumer consumer, IInputOutputImpFactory factory, IUserManager manager)
          Create a server requiring user identification.
 
Method Summary
protected  void onClose()
          Perform custom close.
 void open(int port)
          Open the server listening on a given port.
 void register(IServerView view)
          Register a view to receive server events.
 
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

Server

public Server(IConsumer consumer,
              IInputOutputImpFactory factory)
Create a server.

Parameters:
consumer - the consumer to handle received commands
factory - the input-output implementation factory

Server

public Server(IConsumer consumer,
              IInputOutputImpFactory factory,
              IUserManager manager)
Create a server requiring user identification.

Parameters:
consumer - the consumer to handle received commands
factory - the input-output implementation factory
manager - the user manager
Method Detail

register

public final void register(IServerView view)
Register a view to receive server events.

Parameters:
view - the view to register

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

onClose

protected final void onClose()
Perform custom close.

Overrides:
onClose in class Peer


Copyright © 2003-2005 . All Rights Reserved.