ostore.network
Class YANetwork

java.lang.Object
  |
  +--ostore.network.YANetwork
All Implemented Interfaces:
EventHandlerIF, SingleThreadedEventHandlerIF

public class YANetwork
extends Object
implements SingleThreadedEventHandlerIF, EventHandlerIF

Yet Another Network stage. This one provides the same general interfaces as MultiplexedNetwork. Internally, the main differences are the addition of a connection cache, a handshake protocol for closing connections, and tighter restrictions against multiple connections between physical machines.

New authentication algorithm: The first message that each end of a connection sends is a AuthenticationMsg. It contains the primary listening port of the sender. Eventually it will contain a certificate chain authenticating the sender and binding it to the current connection and its listening port.

The connection cache includes remote-initiated connections, but does not limit the number of connections accepted by the local server (beyond its hardwired limit of 511). Therefore a burst of incoming connections may temporarily fill the cache beyond its desired limit. The stage maintains a free list (counter) of connections to minimize the effects of these (or outgoing) bursts. Unfortunately, remote machines can effectively shutdown our outgoing communication by overfilling our cache with hundreds of incoming connections. Setting the connection cache size higher than 511 will avoid this particular problem, although a normal bandwidth-swamping DoS attack is still possible.

Version:
$Id: YANetwork.java,v 1.31 2003/11/01 23:35:59 hweather Exp $
Author:
Dennis Geels

Constructor Summary
YANetwork()
           
 
Method Summary
 void destroy()
           
 void handleEvent(QueueElementIF elem)
           
 void handleEvents(QueueElementIF[] elemarr)
           
 void init(ConfigDataIF config)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

YANetwork

public YANetwork()
Method Detail

handleEvent

public void handleEvent(QueueElementIF elem)
                 throws UnknownEventException
Specified by:
handleEvent in interface EventHandlerIF
UnknownEventException

handleEvents

public void handleEvents(QueueElementIF[] elemarr)
                  throws UnknownEventException
Specified by:
handleEvents in interface EventHandlerIF
UnknownEventException

init

public void init(ConfigDataIF config)
          throws Exception
Specified by:
init in interface EventHandlerIF
Exception

destroy

public void destroy()
Specified by:
destroy in interface EventHandlerIF