org.ws4d.java.configuration
Class Properties

java.lang.Object
  extended by org.ws4d.java.configuration.Properties

public final class Properties
extends java.lang.Object

Class provides configuration file/ stream reading and manages to call the different property handlers. Standard handlers will be registered.

The file "example.properties" contains a example configuration.

Properties have to be initialized with one of the init methods:

Properties should be initialized before starting the DPWSFramework.


Field Summary
static java.lang.String DPWS_PROPERTIES_HANDLER_CLASS
           
static PropertyHeader HEADER_SECTION_BINDINGS
           
static PropertyHeader HEADER_SECTION_DEVICES
           
static PropertyHeader HEADER_SECTION_DPWS
           
static PropertyHeader HEADER_SECTION_EVENTING
           
static PropertyHeader HEADER_SECTION_GLOBAL
           
static PropertyHeader HEADER_SECTION_HTTP
           
static PropertyHeader HEADER_SECTION_IP
           
static PropertyHeader HEADER_SECTION_SECURITY
           
static PropertyHeader HEADER_SECTION_SERVICES
           
static PropertyHeader HEADER_SUBSECTION_ATTACHMENT
           
static PropertyHeader HEADER_SUBSECTION_DEVICE
           
static PropertyHeader HEADER_SUBSECTION_DISPATCHING
           
static PropertyHeader HEADER_SUBSECTION_EVENT_SINK
           
static PropertyHeader HEADER_SUBSECTION_FRAMEWORK
           
static PropertyHeader HEADER_SUBSECTION_LOGGING
           
static PropertyHeader HEADER_SUBSECTION_SERVICE
           
static java.lang.String HTTP_PROPERTIES_HANDLER_CLASS
           
static java.lang.String IP_PROPERTIES_HANDLER_CLASS
           
static int MAX_SECTION_DEPTH
           
static java.lang.String PROP_BINDING
           
static java.lang.String PROP_CONFIGURATION_ID
           
static java.lang.String PROP_HANDLER
           
static java.lang.String[] SECTION_BINDINGS
           
static java.lang.String[] SECTION_DEVICES
           
static java.lang.String[] SECTION_DPWS
           
static java.lang.String[] SECTION_EVENTING
           
static java.lang.String[] SECTION_GLOBAL
           
static java.lang.String[] SECTION_HTTP
           
static java.lang.String[] SECTION_IP
           
static java.lang.String[] SECTION_SECURITY
           
static java.lang.String[] SECTION_SERVICES
           
 BufferedInputStream stream
           
 
Method Summary
static PropertiesHandler forClassName(java.lang.String className)
           
 DataStructure getAllLoadedHandlers()
          Returns a DataStructure that contains instances of all loaded property handlers
static Properties getInstance()
          Get the one and only instance.
 PropertiesHandler getLoadedHandler(java.lang.String className)
          Get instance of property handler by name of class (Class.getName()).
 void init()
          Initialize Properties.
 void init(java.io.InputStream stream)
          Initialize Properties.
 void init(java.lang.String filename)
          Initialize Properties.
 void register(PropertyHeader header, java.lang.String className)
          Register handler for specified header.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

PROP_HANDLER

public static final java.lang.String PROP_HANDLER
See Also:
Constant Field Values

PROP_BINDING

public static final java.lang.String PROP_BINDING
See Also:
Constant Field Values

PROP_CONFIGURATION_ID

public static final java.lang.String PROP_CONFIGURATION_ID
See Also:
Constant Field Values

SECTION_BINDINGS

public static final java.lang.String[] SECTION_BINDINGS

SECTION_GLOBAL

public static final java.lang.String[] SECTION_GLOBAL

SECTION_DEVICES

public static final java.lang.String[] SECTION_DEVICES

SECTION_SERVICES

public static final java.lang.String[] SECTION_SERVICES

SECTION_EVENTING

public static final java.lang.String[] SECTION_EVENTING

SECTION_DPWS

public static final java.lang.String[] SECTION_DPWS

SECTION_HTTP

public static final java.lang.String[] SECTION_HTTP

SECTION_IP

public static final java.lang.String[] SECTION_IP

SECTION_SECURITY

public static final java.lang.String[] SECTION_SECURITY

HEADER_SECTION_BINDINGS

public static final PropertyHeader HEADER_SECTION_BINDINGS

HEADER_SECTION_GLOBAL

public static final PropertyHeader HEADER_SECTION_GLOBAL

HEADER_SECTION_DEVICES

public static final PropertyHeader HEADER_SECTION_DEVICES

HEADER_SECTION_SERVICES

public static final PropertyHeader HEADER_SECTION_SERVICES

HEADER_SECTION_EVENTING

public static final PropertyHeader HEADER_SECTION_EVENTING

HEADER_SECTION_DPWS

public static final PropertyHeader HEADER_SECTION_DPWS

HEADER_SECTION_HTTP

public static final PropertyHeader HEADER_SECTION_HTTP

HEADER_SECTION_IP

public static final PropertyHeader HEADER_SECTION_IP

HEADER_SECTION_SECURITY

public static final PropertyHeader HEADER_SECTION_SECURITY

HEADER_SUBSECTION_DEVICE

public static final PropertyHeader HEADER_SUBSECTION_DEVICE

HEADER_SUBSECTION_SERVICE

public static final PropertyHeader HEADER_SUBSECTION_SERVICE

HEADER_SUBSECTION_EVENT_SINK

public static final PropertyHeader HEADER_SUBSECTION_EVENT_SINK

HEADER_SUBSECTION_DISPATCHING

public static final PropertyHeader HEADER_SUBSECTION_DISPATCHING

HEADER_SUBSECTION_LOGGING

public static final PropertyHeader HEADER_SUBSECTION_LOGGING

HEADER_SUBSECTION_FRAMEWORK

public static final PropertyHeader HEADER_SUBSECTION_FRAMEWORK

HEADER_SUBSECTION_ATTACHMENT

public static final PropertyHeader HEADER_SUBSECTION_ATTACHMENT

MAX_SECTION_DEPTH

public static final int MAX_SECTION_DEPTH
See Also:
Constant Field Values

DPWS_PROPERTIES_HANDLER_CLASS

public static final java.lang.String DPWS_PROPERTIES_HANDLER_CLASS
See Also:
Constant Field Values

HTTP_PROPERTIES_HANDLER_CLASS

public static final java.lang.String HTTP_PROPERTIES_HANDLER_CLASS
See Also:
Constant Field Values

IP_PROPERTIES_HANDLER_CLASS

public static final java.lang.String IP_PROPERTIES_HANDLER_CLASS
See Also:
Constant Field Values

stream

public BufferedInputStream stream
Method Detail

forClassName

public static PropertiesHandler forClassName(java.lang.String className)

getInstance

public static Properties getInstance()
Get the one and only instance. To use the properties, one of the init method must be called.

Returns:
properties

init

public void init()
Initialize Properties. Default property entries will be used.


init

public void init(java.lang.String filename)
Initialize Properties. Property file will be used.

Parameters:
filename - The path within the filename must be relative to the working directory of the stack.

init

public void init(java.io.InputStream stream)
Initialize Properties. Property stream will be used.

Parameters:
stream -

getLoadedHandler

public PropertiesHandler getLoadedHandler(java.lang.String className)
Get instance of property handler by name of class (Class.getName()).

Parameters:
className - Name of class
Returns:
property handler

getAllLoadedHandlers

public DataStructure getAllLoadedHandlers()
Returns a DataStructure that contains instances of all loaded property handlers

Returns:
all loaded instances of classes that implement #PropertiesHandler

register

public void register(PropertyHeader header,
                     java.lang.String className)
Register handler for specified header.

Parameters:
header -
handler -