@NutDaoService public class HttpNutDao extends AbstractNutDao
A NutDao implementation for HTTP accesses.
AbstractNutDao.VersionNumberStrategy, AbstractNutDao.WithRootPathNutDaoPollingScheduler.PollingNutDao.PathFormat| Constructor and Description |
|---|
HttpNutDao(Boolean https,
String domain,
Integer port,
String path,
Boolean basePathAsSysProp,
int pollingSeconds,
Boolean contentBasedVersionNumber,
Boolean computeVersionAsynchronously,
String fixedVersionNumber)
Builds a new instance thanks to the specified HTTP information.
|
| Modifier and Type | Method and Description |
|---|---|
Nut |
accessFor(String realPath,
NutType type,
ProcessContext processContext)
Creates an access for the given parameters through a
Nut implementation. |
Boolean |
exists(String path,
ProcessContext processContext)
Indicates if the given path exists or not.
|
protected Long |
getLastUpdateTimestampFor(String path)
Retrieves a timestamp that indicates the last time this nut has changed.
|
protected List<String> |
listNutsPaths(String pattern)
Lists all the nuts path matching the given pattern.
|
InputStream |
newInputStream(String path,
ProcessContext processContext)
Opens the stream for the given path.
|
String |
toString() |
absolutePathOf, computeRealPaths, create, create, getBasePath, getProxyUris, getVersionNumber, getVersionNumberStrategy, proxyUriFor, run, save, saveSupported, shutdown, withRootPathgetNutObservers, getPollingInterval, observe, setPollingInterval@ConfigConstructor public HttpNutDao(@BooleanConfigParam(defaultValue=false,propertyKey="c.g.wuic.dao.secret") Boolean https, @StringConfigParam(defaultValue="localhost",propertyKey="c.g.wuic.dao.serverDomain") String domain, @IntegerConfigParam(defaultValue=80,propertyKey="c.g.wuic.dao.serverPort") Integer port, @StringConfigParam(defaultValue="",propertyKey="c.g.wuic.dao.basePath") String path, @BooleanConfigParam(defaultValue=false,propertyKey="c.g.wuic.dao.basePathAsSystemProperty") Boolean basePathAsSysProp, @IntegerConfigParam(defaultValue=-1,propertyKey="c.g.wuic.dao.pollingInterval") int pollingSeconds, @BooleanConfigParam(defaultValue=false,propertyKey="c.g.wuic.dao.basePathAsSystemProperty") Boolean contentBasedVersionNumber, @BooleanConfigParam(defaultValue=true,propertyKey="c.g.wuic.computeVersionAsynchronously") Boolean computeVersionAsynchronously, @StringConfigParam(defaultValue="",propertyKey="c.g.wuic.fixedVersionNumber") String fixedVersionNumber)
Builds a new instance thanks to the specified HTTP information.
https - use HTTPS protocol instead of HTTP ?domain - the HTTP server domain nameport - the HTTP server portpath - the base path where nuts are providedbasePathAsSysProp - true if the base path is a system propertypollingSeconds - the interval for polling operations in seconds (-1 to deactivate)contentBasedVersionNumber - true if version number is computed from nut content, false if based on timestampcomputeVersionAsynchronously - (@code true} if version number can be computed asynchronously, false otherwisefixedVersionNumber - fixed version number, null if version number is computed from content or is last modification dateprotected List<String> listNutsPaths(String pattern) throws IOException
Lists all the nuts path matching the given pattern.
listNutsPaths in class AbstractNutDaopattern - the patternIOException - if any I/O error occurs while reading nutspublic Nut accessFor(String realPath, NutType type, ProcessContext processContext) throws IOException
Creates an access for the given parameters through a Nut implementation.
accessFor in class AbstractNutDaorealPath - the real path to use to access the nuttype - the path's typeprocessContext - the process contextNutIOException - if an I/O error occurs while creating accessprotected Long getLastUpdateTimestampFor(String path) throws IOException
Retrieves a timestamp that indicates the last time this nut has changed.
getLastUpdateTimestampFor in class PollingScheduler<NutDaoListener>path - the real path of the nutIOException - if any I/O error occurspublic InputStream newInputStream(String path, ProcessContext processContext) throws IOException
Opens the stream for the given path.
path - the path to accessprocessContext - the process context calling this methodIOException - if stream could not be openedpublic Boolean exists(String path, ProcessContext processContext) throws IOException
Indicates if the given path exists or not.
path - the path the DAO should be able to resolveprocessContext - the process context calling this methodtrue if path is resolved, false otherwiseIOException - if any I/O error occurspublic String toString()
toString in class AbstractNutDaoCopyright © 2012-2015. All Rights Reserved.