jtge.engine.io
Class AsynchronousAcceptor

java.lang.Object
  extended byjava.lang.Thread
      extended byjtge.engine.io.AsynchronousAcceptor
All Implemented Interfaces:
IAcceptor, java.lang.Runnable

public class AsynchronousAcceptor
extends java.lang.Thread
implements IAcceptor

Wraps an acceptor to provide an asynchronous functionning.

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

Version:
$Revision: 1.4 $ $Date: 2005/08/26 18:09:36 $
Author:
Mathieu Champlon

Field Summary
 
Fields inherited from class java.lang.Thread
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
 
Constructor Summary
AsynchronousAcceptor(IAcceptor acceptor)
          Create an asynchronous 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.

 void run()
          
 
Methods inherited from class java.lang.Thread
activeCount, checkAccess, countStackFrames, currentThread, destroy, dumpStack, enumerate, getContextClassLoader, getName, getPriority, getThreadGroup, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setName, setPriority, sleep, sleep, start, stop, stop, suspend, toString, yield
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

AsynchronousAcceptor

public AsynchronousAcceptor(IAcceptor acceptor)
Create an asynchronous acceptor.

Parameters:
acceptor - the acceptor to wrap
Method Detail

run

public final void run()

Specified by:
run in interface java.lang.Runnable

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.