net.spy.pool
Class PoolFiller

java.lang.Object
  extended by net.spy.pool.PoolFiller
Direct Known Subclasses:
JDBCPoolFiller, SNPPPoolFiller

public abstract class PoolFiller
extends Object

The PoolFiller class is used to populate entries in a pool. It's an abstract class because the getObject() method must be implemented to build the PoolAbles for whatever types of objects you're pooling.


Constructor Summary
PoolFiller()
          Get an unitialized PoolFiller object.
PoolFiller(String nm, SpyConfig cnf)
          Get a PoolFiller object.
 
Method Summary
protected  String debugName()
          Get the debug name (including the pool's hash).
 SpyConfig getConfig()
          Get the config this uses.
 String getName()
          Get the name of this filler.
abstract  PoolAble getObject()
          Get an object for the pool.
protected  int getPoolHash()
          Get the hash of the pool this filler is filling.
protected  String getProperty(String what)
           
protected  String getProperty(String what, String def)
           
protected  int getPropertyInt(String what, int def)
           
 void setConfig(SpyConfig cnf)
          Set the config file to use.
 void setName(String nm)
          Set the name to be used for config lookups.
 void setPoolHash(int to)
          Set the hash to use for debug data.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PoolFiller

public PoolFiller()
Get an unitialized PoolFiller object. The name and config must be passed in later via setName() and setConfig() respectively.


PoolFiller

public PoolFiller(String nm,
                  SpyConfig cnf)
Get a PoolFiller object.

Parameters:
nm - the name to be used for config lookups
cnf - the config to use
Method Detail

setPoolHash

public void setPoolHash(int to)
Set the hash to use for debug data.


getPoolHash

protected int getPoolHash()
Get the hash of the pool this filler is filling.


debugName

protected String debugName()
Get the debug name (including the pool's hash).


setName

public void setName(String nm)
Set the name to be used for config lookups.


getName

public String getName()
Get the name of this filler.


setConfig

public void setConfig(SpyConfig cnf)
Set the config file to use.


getConfig

public SpyConfig getConfig()
Get the config this uses.


getObject

public abstract PoolAble getObject()
                            throws PoolException
Get an object for the pool.

Throws:
PoolException - if it can't get a new object

getPropertyInt

protected int getPropertyInt(String what,
                             int def)

getProperty

protected String getProperty(String what,
                             String def)

getProperty

protected String getProperty(String what)


Copyright © 1995-2007 SPY Internetworking. All Rights Reserved.