ikrs.httpd.resource
Class FileSystemResourceAccessor

java.lang.Object
  extended by ikrs.httpd.resource.AbstractResourceAccessor
      extended by ikrs.httpd.resource.FileSystemResourceAccessor
All Implemented Interfaces:
ResourceAccessor

public class FileSystemResourceAccessor
extends AbstractResourceAccessor
implements ResourceAccessor

The FileSystemResourceAccessor is the default implementation of ResourceAccessor that handles requests to the document root respective to the file system (the document root is part of the file system).


Constructor Summary
FileSystemResourceAccessor(HTTPHandler handler, CustomLogger logger)
          ...
 
Method Summary
 boolean isAccessible(java.io.File file, java.net.URI requestURI)
          This method checks if the given file is accessible by matching it by the use of the global file filter.
 Resource locate(java.net.URI uri, HTTPHeaders headers, PostDataWrapper postData, java.util.Map<java.lang.String,BasicType> additionalSettings, java.util.Map<java.lang.String,BasicType> optionalReturnSettings, java.util.UUID sessionID)
          This method locates the desired resource addressed by the given URI.
 
Methods inherited from class ikrs.httpd.resource.AbstractResourceAccessor
getHTTPHandler
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FileSystemResourceAccessor

public FileSystemResourceAccessor(HTTPHandler handler,
                                  CustomLogger logger)
...

Method Detail

locate

public Resource locate(java.net.URI uri,
                       HTTPHeaders headers,
                       PostDataWrapper postData,
                       java.util.Map<java.lang.String,BasicType> additionalSettings,
                       java.util.Map<java.lang.String,BasicType> optionalReturnSettings,
                       java.util.UUID sessionID)
                throws java.util.MissingResourceException,
                       AuthorizationException,
                       HeaderFormatException,
                       DataFormatException,
                       UnsupportedFormatException,
                       ConfigurationException,
                       java.lang.SecurityException,
                       java.io.IOException
This method locates the desired resource addressed by the given URI.

Specified by:
locate in interface ResourceAccessor
Specified by:
locate in class AbstractResourceAccessor
Throws:
ResouceMissingException - If the specified resource cannot be found.
AuthorizationException - If the requested resource requires authorization.
HeaderFormatException - If the passed headers are malformed.
DataFormatException - If the passed data is malformed.
ConfigurationException - If the system encounters any server configuration issues.
java.lang.SecurityException - If the requested resource is not accessible (forbidden).
java.io.IOException - If any IO errors occur.
java.util.MissingResourceException
UnsupportedFormatException

isAccessible

public boolean isAccessible(java.io.File file,
                            java.net.URI requestURI)
This method checks if the given file is accessible by matching it by the use of the global file filter.