org.osesb.test
Class JavaWebService

java.lang.Object
  extended by org.osesb.test.JavaWebService
Direct Known Subclasses:
DataTypesToXML, EchoMessage, FileReceiver

public class JavaWebService
extends java.lang.Object

JavaWebService is a possible ancestor for Java-based web services.

JavaWebService provides for a set of Properties that can be configured for a web service. This capability is analogous to the environment of an ejb-backed web service.

The Properties are loaded from a properties file that is deployed into the same classpath location as the service Class. The properties file is named MyServiceClass.properties, where MyServiceClass is the name of the java, web service class.

Java web services that are descended from this class can call getProperty methods to get the value for a named property.


Field Summary
protected static org.apache.commons.logging.Log log
          The logging implementation for this class.
protected static java.util.HashMap servicePropertyMap
          Cached service properties for descendants of JavaWebService as a Map of full classNames to Property Objects.
protected  java.lang.String thisClassName
          The full name of this class.
 
Constructor Summary
JavaWebService()
           
 
Method Summary
 boolean getBooleanProperty(java.lang.String propertyName, boolean defaultValue)
          Return a boolean property value.
 int getIntProperty(java.lang.String propertyName, int defaultValue)
          Return an int property value.
 long getLongProperty(java.lang.String propertyName, long defaultValue)
          Return a long property value.
protected  ExtendedProperties getProperties()
          Load service Properties from a properties file that is deployed into the same classpath location as the service Class.
 java.lang.String getProperty(java.lang.String propertyName)
          Return a property value.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

log

protected static org.apache.commons.logging.Log log
The logging implementation for this class.


servicePropertyMap

protected static java.util.HashMap servicePropertyMap
Cached service properties for descendants of JavaWebService as a Map of full classNames to Property Objects.


thisClassName

protected java.lang.String thisClassName
The full name of this class.

Constructor Detail

JavaWebService

public JavaWebService()
Method Detail

getProperties

protected ExtendedProperties getProperties()
Load service Properties from a properties file that is deployed into the same classpath location as the service Class. The properties file is named MyServiceClass.properties, where MyServiceClass is the name of the java, web service class.


getProperty

public java.lang.String getProperty(java.lang.String propertyName)
Return a property value.

Parameters:
propertyName - The Property name.
Returns:
the value of a named property.

getBooleanProperty

public boolean getBooleanProperty(java.lang.String propertyName,
                                  boolean defaultValue)
Return a boolean property value.

Parameters:
propertyName - The Property name.
defaultValue - a default value.
Returns:
the boolean value of a named property.

getLongProperty

public long getLongProperty(java.lang.String propertyName,
                            long defaultValue)
Return a long property value.

Parameters:
propertyName - The Property name.
defaultValue - a default value.
Returns:
the long value of a named property.

getIntProperty

public int getIntProperty(java.lang.String propertyName,
                          int defaultValue)
Return an int property value.

Parameters:
propertyName - The Property name.
defaultValue - a default value.
Returns:
the int value of a named property.