org.abstracthorizon.danube.http.spring.util
Class FileConnectionHandler
java.lang.Object
org.abstracthorizon.danube.http.BaseReflectionHTTPConnectionHandler
org.abstracthorizon.danube.http.util.ReadOnlyFileConnectionHandler
org.abstracthorizon.danube.http.spring.util.FileConnectionHandler
- All Implemented Interfaces:
- ConnectionHandler, ApplicationContextAware
public class FileConnectionHandler
- extends ReadOnlyFileConnectionHandler
- implements ApplicationContextAware
Connection handler that handles static files (and directories)
- Author:
- Daniel Sendula
Methods inherited from class org.abstracthorizon.danube.http.util.ReadOnlyFileConnectionHandler |
encode, getBufferSize, getFileHandle, getFileTypeMap, getLengthAsString, handleDirectory, handleFile, methodGET, methodHEAD, obtainBuffer, releaseBuffer, setBufferSize, setFileTypeMap, transferFromFileChannel, transferStreams, updateHeadersForFile |
Methods inherited from class org.abstracthorizon.danube.http.BaseReflectionHTTPConnectionHandler |
cacheMethods, getErrorResponse, getNoDefaultHead, getNoDefaultTrace, handleConnection, invokeMethod, methodOPTIONS, methodTRACE, returnError, returnSimpleContent, setErrorResponse, setNoDefaultHead, setNoDefaultTrace, updateDefaultHeadMethod, updateDefaultTraceMethod |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
FileConnectionHandler
public FileConnectionHandler()
- Constructor
setFilePath
public void setFilePath(File filePath)
- Sets path where files are stored
- Overrides:
setFilePath
in class ReadOnlyFileConnectionHandler
- Parameters:
filePath
- file path
getFilePath
public File getFilePath()
- Sets path where files are stored
- Overrides:
getFilePath
in class ReadOnlyFileConnectionHandler
- Returns:
- file path
setApplicationContext
public void setApplicationContext(ApplicationContext context)
throws BeansException,
RuntimeIOException
- This method sets file path to file path obtained from application context
(through
ResourceLoader.getResource(String)
)
- Specified by:
setApplicationContext
in interface ApplicationContextAware
- Parameters:
context
- application context
- Throws:
BeansException
RuntimeIOException
Copyright © 2005-2009 Abstract Horizon. All Rights Reserved.