SMILA (incubation) API documentation

org.eclipse.smila.webservice
Class WebserviceProperties

java.lang.Object
  extended by org.eclipse.smila.webservice.WebserviceProperties

public class WebserviceProperties
extends java.lang.Object

Manage Webservice properties.

Author:
jschumacher

Field Summary
static java.lang.String DEFAULT_HOST
          default hostname, if local hostname cannot be determined: "localhost".
static java.lang.String DEFAULT_PORT
          default port: 8081 (because 8080 is used by the HTTP service in SMILA).
static java.lang.String DEFAULT_WEBROOT
          default webroot: "".
static java.lang.String PROP_HOSTNAME
          config property for hostname.
static java.lang.String PROP_PORT
          config propertiy for TCP/IP port.
static java.lang.String PROP_WEBROOT
          config property for webroot.
 
Constructor Summary
WebserviceProperties()
          create default instance.
WebserviceProperties(java.io.InputStream propertyFile)
          read property file and override defaults.
WebserviceProperties(java.util.Properties props)
          override defaults from properties.
 
Method Summary
 java.lang.String getBaseURL()
           
 java.lang.String getHostname()
           
 java.lang.String getPort()
           
 java.lang.String getWebroot()
           
 void setHostname(java.lang.String hostname)
           
 void setPort(java.lang.String port)
           
 void setWebroot(java.lang.String webroot)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DEFAULT_HOST

public static final java.lang.String DEFAULT_HOST
default hostname, if local hostname cannot be determined: "localhost".

See Also:
Constant Field Values

DEFAULT_PORT

public static final java.lang.String DEFAULT_PORT
default port: 8081 (because 8080 is used by the HTTP service in SMILA).

See Also:
Constant Field Values

DEFAULT_WEBROOT

public static final java.lang.String DEFAULT_WEBROOT
default webroot: "".

See Also:
Constant Field Values

PROP_HOSTNAME

public static final java.lang.String PROP_HOSTNAME
config property for hostname.

See Also:
Constant Field Values

PROP_PORT

public static final java.lang.String PROP_PORT
config propertiy for TCP/IP port.

See Also:
Constant Field Values

PROP_WEBROOT

public static final java.lang.String PROP_WEBROOT
config property for webroot.

See Also:
Constant Field Values
Constructor Detail

WebserviceProperties

public WebserviceProperties()
create default instance.


WebserviceProperties

public WebserviceProperties(java.util.Properties props)
override defaults from properties.

Parameters:
props - properties.

WebserviceProperties

public WebserviceProperties(java.io.InputStream propertyFile)
                     throws java.io.IOException
read property file and override defaults.

Parameters:
propertyFile - property file.
Throws:
java.io.IOException - error reading the stream.
Method Detail

getHostname

public java.lang.String getHostname()
Returns:
hostname

getPort

public java.lang.String getPort()
Returns:
TCP/IP port number

getWebroot

public java.lang.String getWebroot()
Returns:
root for webservice URLs.

setHostname

public void setHostname(java.lang.String hostname)
Parameters:
hostname - new hostname

setPort

public void setPort(java.lang.String port)
Parameters:
port - new TCP/IP port number

setWebroot

public void setWebroot(java.lang.String webroot)
Parameters:
webroot - new root for webservice URLs.

getBaseURL

public java.lang.String getBaseURL()
Returns:
base URL for published webservices.

SMILA (incubation) API documentation