jtge.engine.net
Class NetworkAcceptor

java.lang.Object
  extended byjtge.engine.net.NetworkAcceptor
All Implemented Interfaces:
IAcceptor

public class NetworkAcceptor
extends java.lang.Object
implements IAcceptor

Implements a network acceptor.

This acceptor provides a blocking open and a non-blocking close.

Version:
$Revision: 1.2 $ $Date: 2005/09/10 11:26:47 $
Author:
Mathieu Champlon

Constructor Summary
NetworkAcceptor(IInputOutputFactory factory, IConnectionObserver observer, int port)
          Create a network acceptor.
 
Method Summary
 void close()
          Close the acceptor.

Whether this method is blocking or not depends on the implementation.

Calling this method while the acceptor is not open should not generate a failure.

 void open()
          Open the acceptor and accept connections.

Whether this method is blocking or not depends on the implementation.

 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

NetworkAcceptor

public NetworkAcceptor(IInputOutputFactory factory,
                       IConnectionObserver observer,
                       int port)
Create a network acceptor.

Parameters:
factory - the input/output factory
observer - the connection observer
port - the listening port
Method Detail

open

public final void open()
Open the acceptor and accept connections.

Whether this method is blocking or not depends on the implementation.

Specified by:
open in interface IAcceptor

close

public final void close()
Close the acceptor.

Whether this method is blocking or not depends on the implementation.

Calling this method while the acceptor is not open should not generate a failure.

Specified by:
close in interface IAcceptor


Copyright © 2003-2005 . All Rights Reserved.