zeus.actors.factories
Class ConnectionPool

java.lang.Object
  extended byzeus.actors.factories.ConnectionPool

public class ConnectionPool
extends java.lang.Object


Field Summary
private  OutTray[] connections
           
private  java.lang.String[] keys
           
 int MAX_CONNECTIONS
           
private  int write
           
 
Constructor Summary
ConnectionPool()
           
 
Method Summary
 void addConnection(java.lang.String address, OutTray connection)
          store a connection in the pool.
 OutTray getConnection(java.lang.String address)
          get a connection from the connection pool.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

MAX_CONNECTIONS

public int MAX_CONNECTIONS

connections

private OutTray[] connections

keys

private java.lang.String[] keys

write

private int write
Constructor Detail

ConnectionPool

public ConnectionPool()
Method Detail

getConnection

public OutTray getConnection(java.lang.String address)
                      throws NotFoundException
get a connection from the connection pool. Throw an exception if it is not present

Throws:
NotFoundException

addConnection

public void addConnection(java.lang.String address,
                          OutTray connection)
store a connection in the pool. If more than MAX_CONNECTIONS then eliminate the oldest - doesn't check to see if connection is in here!



Copyright © 2000-2003 BT Exact Technologies. All Rights Reserved.