Crossfire JXClient, Trunk
|
Public Member Functions | |
boolean | accept (File f) |
boolean | equals (Object o) |
FileMatch () | |
String | getDirectoryPattern () |
String | getFilePattern () |
Date | getLastModifiedAfter () |
Date | getLastModifiedBefore () |
long | getSizeExceedsMaxBytes () |
int | hashCode () |
void | setDirectoryPattern (String directoryPattern) |
void | setFilePattern (String filePattern) |
void | setLastModifiedAfter (Date lastModifiedAfter) |
void | setLastModifiedBefore (Date lastModifiedBefore) |
void | setSizeExceedsMaxBytes (long sizeLimitInBytes) |
Private Member Functions | |
Object[] | toArray () |
Private Attributes | |
String | directoryPattern |
String | filePattern |
Date | lastModifiedAfter |
Date | lastModifiedBefore |
long | sizeExceedsMaxBytes |
The FileMatch
Java Bean is used to model the configuration of a FileFilter which matches files against a set of criteria.
The FileMatch
class also implements FileFilter - applying an
on all its conditions.
conditions can be obtained by supplying several instances of FileMatch
to the encapsulating DirectoryScannerConfig, which respectively applies an
on all its
elements.
This class is annotated for XML binding.
Definition at line 72 of file FileMatch.java.
com.sun.jmx.examples.scandir.config.FileMatch.FileMatch | ( | ) |
Creates a new instance of FileMatch
Definition at line 110 of file FileMatch.java.
boolean com.sun.jmx.examples.scandir.config.FileMatch.accept | ( | File | f | ) |
A file is accepted when all the criteria that have been set are matched.
f | The file to match against the configured criteria. |
Definition at line 261 of file FileMatch.java.
boolean com.sun.jmx.examples.scandir.config.FileMatch.equals | ( | Object | o | ) |
Definition at line 309 of file FileMatch.java.
References com.sun.jmx.examples.scandir.config.FileMatch.toArray().
String com.sun.jmx.examples.scandir.config.FileMatch.getDirectoryPattern | ( | ) |
Getter for property directoryPattern. This is a regular expression against which directory names should be matched. Applies only to directory, and tells whether a directory should be included or excluded from the search.
If File.isDirectory() && directoryPattern!=null && File.getName().matches(directoryPattern), then File matches this filter.
If File.isDirectory() && directoryPattern!=null && File.getName().matches(directoryPattern)==false, then File doesn't match this filter.
Definition at line 130 of file FileMatch.java.
String com.sun.jmx.examples.scandir.config.FileMatch.getFilePattern | ( | ) |
Getter for property filePattern. This is a regular expression against which file names should be matched. Applies only to files.
If File.isDirectory()==false && filePattern!=null && File.getName().matches(filePattern)==false, then File doesn't match this filter.
Definition at line 161 of file FileMatch.java.
Referenced by com.sun.jmx.examples.scandir.ScanDirConfigTest.testAddDirectoryScanner().
Date com.sun.jmx.examples.scandir.config.FileMatch.getLastModifiedAfter | ( | ) |
Getter for property
. A file will be selected only if it was last modified after
.
This condition is ignored if
is
.
Definition at line 209 of file FileMatch.java.
Date com.sun.jmx.examples.scandir.config.FileMatch.getLastModifiedBefore | ( | ) |
Getter for property
. A file will be selected only if it was last modified before
.
This condition is ignored if
is
.
Definition at line 234 of file FileMatch.java.
long com.sun.jmx.examples.scandir.config.FileMatch.getSizeExceedsMaxBytes | ( | ) |
Getter for property sizeExceedsMaxBytes. Ignored if 0 or negative. Otherwise, files whose size in bytes does not exceed this limit will be excluded by this filter.
Definition at line 185 of file FileMatch.java.
Referenced by com.sun.jmx.examples.scandir.ScanDirConfigTest.testAddDirectoryScanner().
int com.sun.jmx.examples.scandir.config.FileMatch.hashCode | ( | ) |
Definition at line 319 of file FileMatch.java.
void com.sun.jmx.examples.scandir.config.FileMatch.setDirectoryPattern | ( | String | directoryPattern | ) |
Setter for property directoryPattern.
directoryPattern | New value of property directoryPattern. This is a regular expression against which directory names should be matched. |
Definition at line 143 of file FileMatch.java.
void com.sun.jmx.examples.scandir.config.FileMatch.setFilePattern | ( | String | filePattern | ) |
Setter for property filePattern.
filePattern | New value of property filePattern. This is a regular expression against which file names should be matched. |
Definition at line 173 of file FileMatch.java.
Referenced by com.sun.jmx.examples.scandir.ScanDirConfig.addDirectoryScanner(), and com.sun.jmx.examples.scandir.ScanDirConfigTest.testAddDirectoryScanner().
void com.sun.jmx.examples.scandir.config.FileMatch.setLastModifiedAfter | ( | Date | lastModifiedAfter | ) |
Setter for property
.
lastModifiedAfter | A file will be selected only if it was last modified after . This condition is ignored if is null
|
Definition at line 220 of file FileMatch.java.
void com.sun.jmx.examples.scandir.config.FileMatch.setLastModifiedBefore | ( | Date | lastModifiedBefore | ) |
Setter for property
.
lastModifiedBefore | A file will be selected only if it was last modified before . This condition is ignored if is null
|
Definition at line 245 of file FileMatch.java.
Referenced by com.sun.jmx.examples.scandir.ScanDirConfig.addDirectoryScanner().
void com.sun.jmx.examples.scandir.config.FileMatch.setSizeExceedsMaxBytes | ( | long | sizeLimitInBytes | ) |
Setter for property sizeExceedsMaxBytes.
sizeLimitInBytes | New value of property sizeExceedsMaxBytes. Ignored if 0 or negative. Otherwise, files whose size in bytes does not exceed this limit will be excluded by this filter. |
Definition at line 196 of file FileMatch.java.
Referenced by com.sun.jmx.examples.scandir.ScanDirConfig.addDirectoryScanner().
|
private |
Definition at line 300 of file FileMatch.java.
Referenced by com.sun.jmx.examples.scandir.config.FileMatch.equals().
|
private |
A regular expression against which directory names should be matched.
Definition at line 83 of file FileMatch.java.
|
private |
A regular expression against which file names should be matched.
Definition at line 88 of file FileMatch.java.
|
private |
A file which will be selected only if it was last modified after this date
Definition at line 99 of file FileMatch.java.
|
private |
A file which will be selected only if it was last modified before this date
Definition at line 105 of file FileMatch.java.
|
private |
File whose size in bytes exceeds this limit will be selected.
Definition at line 93 of file FileMatch.java.