net.sf.uadetector.datastore
Class OnlineXmlDataStore

java.lang.Object
  extended by net.sf.uadetector.datastore.AbstractRefreshableDataStore
      extended by net.sf.uadetector.datastore.OnlineXmlDataStore
All Implemented Interfaces:
DataStore, RefreshableDataStore

public final class OnlineXmlDataStore
extends AbstractRefreshableDataStore

This is the simplest implementation of a RefreshableDataStore. It initialize the store by reading the UAS data online via DataStore.DEFAULT_DATA_URL and store it only in the Java heap space.

Attentation: During initialization the fallback data store will be used and the remote data will be read in background (non-blocking).

Author:
André Rouél

Field Summary
 
Fields inherited from interface net.sf.uadetector.datastore.RefreshableDataStore
MSG_FAULTY_CONTENT, MSG_URL_NOT_READABLE
 
Fields inherited from interface net.sf.uadetector.datastore.DataStore
DEFAULT_CHARSET, DEFAULT_DATA_URL, DEFAULT_VERSION_URL
 
Constructor Summary
OnlineXmlDataStore(DataStore fallback)
          Constructs an OnlineXmlDataStore by reading UAS data by the specified default URL DataStore.DEFAULT_DATA_URL (in XML format).
 
Method Summary
 
Methods inherited from class net.sf.uadetector.datastore.AbstractRefreshableDataStore
getCharset, getData, getDataReader, getDataUrl, getFallback, getUpdateOperation, getVersionUrl, refresh, setData, setUpdateOperation
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

OnlineXmlDataStore

public OnlineXmlDataStore(DataStore fallback)
Constructs an OnlineXmlDataStore by reading UAS data by the specified default URL DataStore.DEFAULT_DATA_URL (in XML format).

Parameters:
fallback - UAS data as fallback in case the data on the specified resource can not be read correctly


Copyright © 2011-2014. All Rights Reserved.