org.apache.catalina.connector.warp
Class WarpHandlerTable

java.lang.Object
  |
  +--org.apache.catalina.connector.warp.WarpHandlerTable

public class WarpHandlerTable
extends java.lang.Object

Version:
CVS $Id: WarpHandlerTable.java,v 1.5 2001/01/24 23:10:47 pier Exp $
Author:
Pier Fumagalli, Copyright © 1999, 2000 The Apache Software Foundation.

Constructor Summary
WarpHandlerTable()
          Construct a new WarpHandlerTable instance with the default size.
WarpHandlerTable(int size)
          Construct a new WarpHandlerTable instance with a specified size.
 
Method Summary
 boolean add(WarpHandler handler, int rid)
          Associate a WarpHandler with a specified RID.
 WarpHandler get(int rid)
          Get the WarpHandler associated with a specific RID.
 WarpHandler[] handlers()
          Return the array of WarpHandler objects present in this table.
 WarpHandler remove(int rid)
          Remove the WarpHandler associated with a specified RID.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

WarpHandlerTable

public WarpHandlerTable()
Construct a new WarpHandlerTable instance with the default size.

WarpHandlerTable

public WarpHandlerTable(int size)
Construct a new WarpHandlerTable instance with a specified size.
Parameters:
size - The initial size of the table.
Method Detail

get

public WarpHandler get(int rid)
Get the WarpHandler associated with a specific RID.
Parameters:
rid - The RID number.
Returns:
The WarpHandler or null if the RID was not associated with the specified RID.

add

public boolean add(WarpHandler handler,
                   int rid)
            throws java.lang.NullPointerException
Associate a WarpHandler with a specified RID.
Parameters:
handler - The WarpHandler to put in the table.
rid - The RID number associated with the WarpHandler.
Returns:
If another WarpHandler is associated with this RID return false, otherwise return true.

remove

public WarpHandler remove(int rid)
Remove the WarpHandler associated with a specified RID.
Parameters:
rid - The RID number of the WarpHandler to remove.
Returns:
The old WarpHandler associated with the specified RID or null.

handlers

public WarpHandler[] handlers()
Return the array of WarpHandler objects present in this table.
Returns:
An array (maybe empty) of WarpHandler objects.


Copyright ? 2000 Apache Software Foundation. All Rights Reserved.