org.xins.common.servlet
Class ServletConfigPropertyReader

java.lang.Object
  extended byorg.xins.common.servlet.ServletConfigPropertyReader
All Implemented Interfaces:
PropertyReader, Serializable

public final class ServletConfigPropertyReader
extends Object
implements PropertyReader

Implementation of a PropertyReader that returns the initialization properties from a ServletConfig object.

Since:
XINS 1.0.0
Version:
$Revision: 1.13 $ $Date: 2006/08/28 09:12:35 $
Author:
Ernst de Haan
See Also:
Serialized Form

Constructor Summary
ServletConfigPropertyReader(ServletConfig servletConfig)
          Constructs a new ServletConfigPropertyReader.
 
Method Summary
 String get(String name)
          Retrieves the value of the property with the specified name.
 Iterator getNames()
          Returns an Iterator that returns all property names.
 int size()
          Determines the number of properties.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ServletConfigPropertyReader

public ServletConfigPropertyReader(ServletConfig servletConfig)
                            throws IllegalArgumentException
Constructs a new ServletConfigPropertyReader.

Parameters:
servletConfig - the ServletConfig object, cannot be null.
Throws:
IllegalArgumentException - if servletConfig == null.
Method Detail

get

public String get(String name)
           throws IllegalArgumentException
Retrieves the value of the property with the specified name.

Specified by:
get in interface PropertyReader
Parameters:
name - the name of the property, cannot be null.
Returns:
the value of the property, possibly null.
Throws:
IllegalArgumentException - if name == null.

getNames

public Iterator getNames()
Returns an Iterator that returns all property names.

Specified by:
getNames in interface PropertyReader
Returns:
an Iterator for all property names, never null.

size

public int size()
Determines the number of properties.

Specified by:
size in interface PropertyReader
Returns:
the size, always >= 0.


See http://www.xins.org/.