private static class Factory.WebService
extends java.lang.Object
implements wxservice.IService
Modifier and Type | Class and Description |
---|---|
(package private) class |
Factory.WebService.PollingTask
Polling timer task.
|
Modifier and Type | Field and Description |
---|---|
private static java.util.logging.Logger |
LOGGER
Logger for this class.
|
private java.util.List<wxservice.IServiceListener> |
m_listeners
List of console listeners.
|
private WxService |
m_port
The web service port.
|
Constructor and Description |
---|
Factory.WebService(java.lang.String url,
long time,
long interval)
Creates a new instance of the web service client.
|
Modifier and Type | Method and Description |
---|---|
void |
addListener(wxservice.IServiceListener listener)
Adds a listener for sensor updates.
|
java.util.Properties |
getConfiguration()
Configuration properties accessor.
|
java.util.List<java.lang.String> |
getFileData(java.lang.String name)
Returns data from the specified file as a string array.
|
java.util.List<java.lang.String> |
getFileNames()
File names property accessor.
|
void |
removeListener(wxservice.IServiceListener listener)
Removes a listener for sensor updates.
|
void |
setConfiguration(java.util.Properties config)
Configuration properties accessor.
|
private static final java.util.logging.Logger LOGGER
private WxService m_port
private final java.util.List<wxservice.IServiceListener> m_listeners
Factory.WebService(java.lang.String url, long time, long interval) throws java.net.MalformedURLException
url
- address of the web service.time
- starting time for sensor events.interval
- for polling sensor data.java.net.MalformedURLException
- to indicate that a malformed URL has
occurred. Either no legal protocol could be found in a specification
string or the string could not be parsed.public java.util.Properties getConfiguration() throws wxservice.ServiceException
getConfiguration
in interface wxservice.IService
wxservice.ServiceException
- if communication or application error
occurs.public void setConfiguration(java.util.Properties config) throws wxservice.ServiceException
setConfiguration
in interface wxservice.IService
config
- modified configuration properties.wxservice.ServiceException
- if communication or application error
occurs.public java.util.List<java.lang.String> getFileNames() throws wxservice.ServiceException
getFileNames
in interface wxservice.IService
wxservice.ServiceException
- if communication or application error
occurs.public java.util.List<java.lang.String> getFileData(java.lang.String name) throws wxservice.ServiceException
getFileData
in interface wxservice.IService
name
- of the file to read.wxservice.ServiceException
- if communication or application error
occurs.public void addListener(wxservice.IServiceListener listener) throws wxservice.ServiceException
addListener
in interface wxservice.IService
listener
- the listener to add.wxservice.ServiceException
- if communication or application error
occurs.public void removeListener(wxservice.IServiceListener listener) throws wxservice.ServiceException
removeListener
in interface wxservice.IService
listener
- the listener to remove.wxservice.ServiceException
- if communication or application error
occurs.