public class RunnableFileSystemResource extends org.springframework.core.io.FileSystemResource implements Resource, org.springframework.core.io.Resource
Runnable as appropriate such that the resource becomes
reloadable.| Modifier and Type | Field and Description |
|---|---|
private org.slf4j.Logger |
log
The log.
|
private String |
thePrefix
Log prefix.
|
private Runnable |
theRunnable
What to run at the appropriate time.
|
| Constructor and Description |
|---|
RunnableFileSystemResource(File file,
Runnable runnable)
Constructor.
|
RunnableFileSystemResource(String path,
Runnable runnable)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
protected void |
callRunnable()
Call the runnable and catch every event thrown.
|
RunnableFileSystemResource |
createRelativeResource(String relativePath) |
boolean |
exists() |
InputStream |
getInputStream() |
long |
lastModified() |
contentLength, createRelative, equals, getDescription, getFile, getFilename, getOutputStream, getPath, getURI, getURL, hashCode, isReadable, isWritablegetFileForLastModifiedCheck, isOpen, toStringclone, finalize, getClass, notify, notifyAll, wait, wait, waitcontentLength, getDescription, getFile, getFilename, getURI, getURL, isOpen, isReadable@Nonnull private final org.slf4j.Logger log
public RunnableFileSystemResource(@Nonnull @ParameterName(name="file") File file, @Nonnull @ParameterName(name="runnable") Runnable runnable)
file - The file to back.runnable - a Runnable to call at appropriate timespublic RunnableFileSystemResource(@Nonnull @NotEmpty @ParameterName(name="path") String path, @Nonnull @ParameterName(name="runnable") Runnable runnable)
path - the path to the file to look at.runnable - a Runnable to call at appropriate timespublic RunnableFileSystemResource createRelativeResource(String relativePath) throws IOException
IOExceptionpublic boolean exists()
exists in interface org.springframework.core.io.Resourceexists in class org.springframework.core.io.FileSystemResourcepublic InputStream getInputStream() throws IOException
getInputStream in interface org.springframework.core.io.InputStreamSourcegetInputStream in class org.springframework.core.io.FileSystemResourceIOExceptionpublic long lastModified()
throws IOException
lastModified in interface org.springframework.core.io.ResourcelastModified in class org.springframework.core.io.AbstractResourceIOExceptionprotected void callRunnable()
throws IOException
IOException - if anything bad happensCopyright © 1999–2019 Shibboleth Consortium. All rights reserved.