Package wt.jmx.core.mbeans
Interface DirViewMBean
- All Superinterfaces:
AbstractFileViewMBean,SelfEmailingMBean
- All Known Subinterfaces:
ManagedDirViewMBean
- All Known Implementing Classes:
DirView,EnigmaLogsDirViewer,JBossServerLogsDirViewer,LogsDirViewer,ManagedDirView,PsiInstallerDirViewer,SciInstallerDirViewer,ServletLogsDirViewer,SimpleDirViewer,WebServerLogsDirViewer
Allows viewing of selected contents of a selected directory
Supported API: true
Extendable: true
Supported API: true
Extendable: true
-
Method Summary
Modifier and TypeMethodDescriptionvoidemailFiles(String addressesOrEmailList, String subject, boolean oneMessagePerFile, boolean recursive) E-mail files filtered as per MBean attributes
Supported API: truevoidemailFiles(String addressesOrEmailList, String subject, boolean oneMessagePerFile, boolean recursive, int maxAgeInDays) E-mail files filtered as per MBean attributes and specified file age
Supported API: truevoidemailFiles(String addressesOrEmailList, String subject, boolean oneMessagePerFile, boolean recursive, int maxAgeInDays, int minAgeInDays, String callerFileMatchingExpr) E-mail files filtered as per MBean attributes, specified file age, and matching expression
Supported API: trueWhether file filter allows gzipped form of files specified by FileExtensions and AllowNumericSuffixes; in other words, whether a .gz suffix is allowed after these portions of the file name
Supported API: trueWhether file filter allows numeric suffixes (".1", for example) after the specified extension (ignored when FileExtensions is unspecified/null)
Supported API: truebyte[]getFileAsGzippedBytes(String relativeFilePath) Get file as gzipped bytes; if relativeFilePath ends in .gz, then the original file bytes are simply returned as is
Supported API: truegetFileAsStreamingResult(String relativeFilePath) [FOR INTERNAL USE ONLY] Get file as specialized internal streaming result object (without compression applied)
Supported API: truegetFileAsStreamingResult(String relativeFilePath, boolean compressIfNotGzipFile) [FOR INTERNAL USE ONLY] Get file as specialized internal streaming result object
Supported API: trueString[]Extensions of files to be shown
Supported API: trueRegular expression used to filter file names shown
Supported API: truegetFilesAsStreamingResult(boolean recursive) [FOR INTERNAL USE ONLY] Get files in directory as specialized internal streaming result object
Supported API: truegetFilesAsStreamingResult(boolean recursive, int maxAgeInDays, int minAgeInDays, String callerFileMatchingExpr) [FOR INTERNAL USE ONLY] Get matching files in directory as specialized internal streaming result object
Supported API: truelongRemaining free space (as per java.io.File.getFreeSpace()) on file system partition containing this directory
Supported API: truegetLastModifiedTime(String relativeFilePath) Get last modification date of file, or null if this cannot be obtained
Supported API: truedoublePercentage of free space on file system partition containing this directory
Supported API: truedoublePercentage of usable free space on file system partition containing this directory
Supported API: truelongTotal size (as per java.io.File.getTotalSpace()) of file system partition containing this directory
Supported API: truelongRemaining usable free space (as per java.io.File.getUsableSpace()) on file system partition containing this directory
Supported API: trueString[]listFiles(boolean recursive) List files in directory as relative paths
Supported API: trueString[]List files in directory as relative paths
Supported API: truevoidrefresh()Refresh set of MBeans aggregated by this one based on current file system state
Supported API: trueString[]searchFiles(String searchRegexp) Searches all specified files
Supported API: trueString[]searchFiles(String searchRegexp, int maxLines) Searches all specified files
Supported API: trueString[]searchFiles(String searchRegexp, String newEntryRegexp, boolean recursive, int maxAgeInDays, int minAgeInDays, String callerFileMatchingExpr) Searches all specified files
Supported API: trueString[]searchFiles(String searchRegexp, String newEntryRegexp, boolean recursive, int maxAgeInDays, int minAgeInDays, String callerFileMatchingExpr, int maxLines) Searches all specified files
Supported API: truesearchFilesAsMap(String searchRegexp) Searches all specified files and returns results as a Map<String,String[]>
Supported API: truesearchFilesAsMap(String searchRegexp, int maxLines) Searches all specified files and returns results as a Map<String,String[]>
Supported API: truesearchFilesAsMap(String searchRegexp, String newEntryRegexp, boolean recursive, int maxAgeInDays, int minAgeInDays, String callerFileMatchingExpr) Searches all specified files and returns results as a Map<String,String[]>
Supported API: truesearchFilesAsMap(String searchRegexp, String newEntryRegexp, boolean recursive, int maxAgeInDays, int minAgeInDays, String callerFileMatchingExpr, int maxLines) Searches all specified files and returns results as a Map<String,String[]>
Supported API: truesearchFilesAsStreamingMap(String searchRegexp, String newEntryRegexp, boolean recursive, int maxAgeInDays, int minAgeInDays, String callerFileMatchingExpr, int maxLines, int streamThresholdCharCount) [FOR INTERNAL USE ONLY] Searches all specified files and returns results as a special streaming Map<String,?>, where the Map's values are specialized internal streaming result objectsvoidsendFilesToSupport(long callNumber, String description, boolean recursive) Send files to technical support
Supported API: truevoidsendFilesToSupport(long callNumber, String description, boolean recursive, int maxAgeInDays) Send files filtered by specified file age to technical support
Supported API: truevoidsendFilesToSupport(long callNumber, String description, boolean recursive, int maxAgeInDays, int minAgeInDays, String callerFileMatchingExpr) Send files filtered by specified file age and matching expression to technical support
Supported API: trueString[]View last reasonable portion of specified file
Supported API: trueString[]View last portion of specified file
Supported API: trueMethods inherited from interface wt.jmx.core.mbeans.AbstractFileViewMBean
getLastModifiedTime, getName, getPath, isExistsMethods inherited from interface wt.jmx.core.mbeans.SelfEmailingMBean
emailThisMBean
-
Method Details
-
getFreeSpace
long getFreeSpace()Remaining free space (as per java.io.File.getFreeSpace()) on file system partition containing this directory
Supported API: true -
getUsableSpace
long getUsableSpace()Remaining usable free space (as per java.io.File.getUsableSpace()) on file system partition containing this directory
Supported API: true -
getTotalSpace
long getTotalSpace()Total size (as per java.io.File.getTotalSpace()) of file system partition containing this directory
Supported API: true -
getPercentFreeSpace
double getPercentFreeSpace()Percentage of free space on file system partition containing this directory
Supported API: true -
getPercentUsableSpace
double getPercentUsableSpace()Percentage of usable free space on file system partition containing this directory
Supported API: true -
getFileExtensions
String[] getFileExtensions()Extensions of files to be shown
Supported API: true -
getAllowNumericSuffixes
Boolean getAllowNumericSuffixes()Whether file filter allows numeric suffixes (".1", for example) after the specified extension (ignored when FileExtensions is unspecified/null)
Supported API: true -
getAllowGzip
Boolean getAllowGzip()Whether file filter allows gzipped form of files specified by FileExtensions and AllowNumericSuffixes; in other words, whether a .gz suffix is allowed after these portions of the file name
Supported API: true -
getFileMatchingExpression
String getFileMatchingExpression()Regular expression used to filter file names shown
Supported API: true -
refresh
Refresh set of MBeans aggregated by this one based on current file system state
Supported API: true -
listFiles
List files in directory as relative paths
Supported API: true- Parameters:
recursive- Whether to include files from sub-directories- Throws:
IOException
-
listFiles
@MBeanOperationImpact(0) String[] listFiles(boolean recursive, int maxAgeInDays, int minAgeInDays, String callerFileMatchingExpr) throws IOException List files in directory as relative paths
Supported API: true- Parameters:
recursive- Whether to include files from sub-directoriesmaxAgeInDays- Maximum age in days (by modification date) of files to listminAgeInDays- Minimum age in days (by modification date) of files to list; ignored when less than or equal to zerocallerFileMatchingExpr- Regular expression file names must match to be listed; ignored if empty or null- Throws:
IOException
-
viewFile
View last reasonable portion of specified file
Supported API: true- Parameters:
relativeFilePath- Relative path of file to view; must reside within this directory and match specified file matching expression- Throws:
IOException
-
viewFile
@MBeanOperationImpact(0) String[] viewFile(String relativeFilePath, long maxLines, long maxChars) throws IOException View last portion of specified file
Supported API: true- Parameters:
relativeFilePath- Relative path of file to view; must reside within this directory and match specified file matching expressionmaxLines- Maximum number of lines to include; non-positive numbers imply no limitmaxChars- Maximum number of characters to include; non-positive numbers imply no limit- Throws:
IOException
-
getLastModifiedTime
Get last modification date of file, or null if this cannot be obtained
Supported API: true- Parameters:
relativeFilePath- Relative path of file; must reside within this directory and match specified file matching expression
-
getFileAsGzippedBytes
Get file as gzipped bytes; if relativeFilePath ends in .gz, then the original file bytes are simply returned as is
Supported API: true- Parameters:
relativeFilePath- Relative path of file; must reside within this directory and match specified file matching expression- Throws:
IOException
-
getFileAsStreamingResult
[FOR INTERNAL USE ONLY] Get file as specialized internal streaming result object (without compression applied)
Supported API: true- Parameters:
relativeFilePath- Relative path of file; must reside within this directory and match specified file matching expression
-
getFileAsStreamingResult
@MBeanOperationImpact(0) Object getFileAsStreamingResult(String relativeFilePath, boolean compressIfNotGzipFile) [FOR INTERNAL USE ONLY] Get file as specialized internal streaming result object
Supported API: true- Parameters:
relativeFilePath- Relative path of file; must reside within this directory and match specified file matching expressioncompressIfNotGzipFile- Whether stream should be compressed if it is not a .gz file; .gz files will not be recompressed in any case
-
getFilesAsStreamingResult
[FOR INTERNAL USE ONLY] Get files in directory as specialized internal streaming result object
Supported API: true- Parameters:
recursive- Whether to include files from sub-directories
-
getFilesAsStreamingResult
@MBeanOperationImpact(0) Object getFilesAsStreamingResult(boolean recursive, int maxAgeInDays, int minAgeInDays, String callerFileMatchingExpr) [FOR INTERNAL USE ONLY] Get matching files in directory as specialized internal streaming result object
Supported API: true- Parameters:
recursive- Whether to include files from sub-directoriesmaxAgeInDays- Maximum age in days (by modification date) of files to includeminAgeInDays- Minimum age in days (by modification date) of files to include; ignored when less than or equal to zerocallerFileMatchingExpr- Regular expression file names must match to be included; ignored if empty or null
-
searchFiles
Searches all specified files
Supported API: true- Parameters:
searchRegexp- Regular expression to search with- Throws:
IOException
-
searchFiles
Searches all specified files
Supported API: true- Parameters:
searchRegexp- Regular expression to search withmaxLines- Maximum lines to return from any given file (not including elision line); negative values imply no limit- Throws:
IOException
-
searchFiles
@MBeanOperationImpact(0) String[] searchFiles(String searchRegexp, String newEntryRegexp, boolean recursive, int maxAgeInDays, int minAgeInDays, String callerFileMatchingExpr) throws IOException Searches all specified files
Supported API: true- Parameters:
searchRegexp- Regular expression to search withnewEntryRegexp- Regular expression which indicate the first line of an "entry"; if null or empty, the value of the Dumper MBean's DefaultNewEntryRegexp is usedrecursive- Whether to include files from sub-directoriesmaxAgeInDays- Maximum age in days (by modification date) of files to searchminAgeInDays- Minimum age in days (by modification date) of files to search; ignored when less than or equal to zerocallerFileMatchingExpr- Regular expression file names must match to be searched; ignored if empty or null- Throws:
IOException
-
searchFiles
@MBeanOperationImpact(0) String[] searchFiles(String searchRegexp, String newEntryRegexp, boolean recursive, int maxAgeInDays, int minAgeInDays, String callerFileMatchingExpr, int maxLines) throws IOException Searches all specified files
Supported API: true- Parameters:
searchRegexp- Regular expression to search withnewEntryRegexp- Regular expression which indicate the first line of an "entry"; if null or empty, the value of the Dumper MBean's DefaultNewEntryRegexp is usedrecursive- Whether to include files from sub-directoriesmaxAgeInDays- Maximum age in days (by modification date) of files to searchminAgeInDays- Minimum age in days (by modification date) of files to search; ignored when less than or equal to zerocallerFileMatchingExpr- Regular expression file names must match to be searched; ignored if empty or nullmaxLines- Maximum lines to return from any given file (not including elision line); negative values imply no limit- Throws:
IOException
-
searchFilesAsMap
@MBeanOperationImpact(0) Map<String,String[]> searchFilesAsMap(String searchRegexp) throws IOException Searches all specified files and returns results as a Map<String,String[]>
Supported API: true- Parameters:
searchRegexp- Regular expression to search with- Throws:
IOException
-
searchFilesAsMap
@MBeanOperationImpact(0) Map<String,String[]> searchFilesAsMap(String searchRegexp, int maxLines) throws IOException Searches all specified files and returns results as a Map<String,String[]>
Supported API: true- Parameters:
searchRegexp- Regular expression to search withmaxLines- Maximum lines to return from any given file (not including elision line); negative values imply no limit- Throws:
IOException
-
searchFilesAsMap
@MBeanOperationImpact(0) Map<String,String[]> searchFilesAsMap(String searchRegexp, String newEntryRegexp, boolean recursive, int maxAgeInDays, int minAgeInDays, String callerFileMatchingExpr) throws IOException Searches all specified files and returns results as a Map<String,String[]>
Supported API: true- Parameters:
searchRegexp- Regular expression to search withnewEntryRegexp- Regular expression which indicate the first line of an "entry"; if null or empty, the value of the Dumper MBean's DefaultNewEntryRegexp is usedrecursive- Whether to include files from sub-directoriesmaxAgeInDays- Maximum age in days (by modification date) of files to searchminAgeInDays- Minimum age in days (by modification date) of files to search; ignored when less than or equal to zerocallerFileMatchingExpr- Regular expression file names must match to be searched; ignored if empty or null- Throws:
IOException
-
searchFilesAsMap
@MBeanOperationImpact(0) Map<String,String[]> searchFilesAsMap(String searchRegexp, String newEntryRegexp, boolean recursive, int maxAgeInDays, int minAgeInDays, String callerFileMatchingExpr, int maxLines) throws IOException Searches all specified files and returns results as a Map<String,String[]>
Supported API: true- Parameters:
searchRegexp- Regular expression to search withnewEntryRegexp- Regular expression which indicate the first line of an "entry"; if null or empty, the value of the Dumper MBean's DefaultNewEntryRegexp is usedrecursive- Whether to include files from sub-directoriesmaxAgeInDays- Maximum age in days (by modification date) of files to searchminAgeInDays- Minimum age in days (by modification date) of files to search; ignored when less than or equal to zerocallerFileMatchingExpr- Regular expression file names must match to be searched; ignored if empty or nullmaxLines- Maximum lines to return from any given file (not including elision line); negative values imply no limit- Throws:
IOException
-
searchFilesAsStreamingMap
@MBeanOperationImpact(0) Map<String,?> searchFilesAsStreamingMap(String searchRegexp, String newEntryRegexp, boolean recursive, int maxAgeInDays, int minAgeInDays, String callerFileMatchingExpr, int maxLines, int streamThresholdCharCount) throws IOException [FOR INTERNAL USE ONLY] Searches all specified files and returns results as a special streaming Map<String,?>, where the Map's values are specialized internal streaming result objects- Parameters:
searchRegexp- Regular expression to search withnewEntryRegexp- Regular expression which indicate the first line of an "entry"; if null or empty, the value of the Dumper MBean's DefaultNewEntryRegexp is usedrecursive- Whether to include files from sub-directoriesmaxAgeInDays- Maximum age in days (by modification date) of files to searchminAgeInDays- Minimum age in days (by modification date) of files to search; ignored when less than or equal to zerocallerFileMatchingExpr- Regular expression file names must match to be searched; ignored if empty or nullmaxLines- Maximum lines to return from any given file (not including elision line); negative values imply no limitstreamThresholdCharCount- Maximum characters of search results to return from one file without using streaming this result
Supported API: true- Throws:
IOException
-
emailFiles
@MBeanOperationImpact(0) void emailFiles(String addressesOrEmailList, String subject, boolean oneMessagePerFile, boolean recursive) throws IOException E-mail files filtered as per MBean attributes
Supported API: true- Parameters:
addressesOrEmailList- Comma-delimited list of e-mail addresses or name of e-mail list to send e-mail tosubject- Subject to give e-mailoneMessagePerFile- Whether to send a separate e-mail message for each filerecursive- Whether to include files from sub-directories- Throws:
IOException
-
emailFiles
@MBeanOperationImpact(0) void emailFiles(String addressesOrEmailList, String subject, boolean oneMessagePerFile, boolean recursive, int maxAgeInDays) throws IOException E-mail files filtered as per MBean attributes and specified file age
Supported API: true- Parameters:
addressesOrEmailList- Comma-delimited list of e-mail addresses or name of e-mail list to send e-mail tosubject- Subject to give e-mailoneMessagePerFile- Whether to send a separate e-mail message for each filerecursive- Whether to include files from sub-directoriesmaxAgeInDays- Maximum age in days (by modification date) of files to e-mail- Throws:
IOException
-
emailFiles
@MBeanOperationImpact(0) void emailFiles(String addressesOrEmailList, String subject, boolean oneMessagePerFile, boolean recursive, int maxAgeInDays, int minAgeInDays, String callerFileMatchingExpr) throws IOException E-mail files filtered as per MBean attributes, specified file age, and matching expression
Supported API: true- Parameters:
addressesOrEmailList- Comma-delimited list of e-mail addresses or name of e-mail list to send e-mail tosubject- Subject to give e-mailoneMessagePerFile- Whether to send a separate e-mail message for each filerecursive- Whether to include files from sub-directoriesmaxAgeInDays- Maximum age in days (by modification date) of files to e-mailminAgeInDays- Minimum age in days (by modification date) of files to e-mail; ignored when less than or equal to zerocallerFileMatchingExpr- Regular expression file names must match to be e-mailed; ignored if empty or null- Throws:
IOException
-
sendFilesToSupport
@MBeanOperationImpact(0) void sendFilesToSupport(long callNumber, String description, boolean recursive) throws Exception Send files to technical support
Supported API: true- Parameters:
callNumber- Existing technical support call number to associate these files withdescription- Description to give files sentrecursive- Whether to include files from sub-directories- Throws:
Exception
-
sendFilesToSupport
@MBeanOperationImpact(0) void sendFilesToSupport(long callNumber, String description, boolean recursive, int maxAgeInDays) throws Exception Send files filtered by specified file age to technical support
Supported API: true- Parameters:
callNumber- Existing technical support call number to associate these files withdescription- Description to give files sentrecursive- Whether to include files from sub-directoriesmaxAgeInDays- Maximum age in days (by modification date) of files to send- Throws:
Exception
-
sendFilesToSupport
@MBeanOperationImpact(0) void sendFilesToSupport(long callNumber, String description, boolean recursive, int maxAgeInDays, int minAgeInDays, String callerFileMatchingExpr) throws Exception Send files filtered by specified file age and matching expression to technical support
Supported API: true- Parameters:
callNumber- Existing technical support call number to associate these files withdescription- Description to give files sentrecursive- Whether to include files from sub-directoriesmaxAgeInDays- Maximum age in days (by modification date) of files to sendminAgeInDays- Minimum age in days (by modification date) of files to send; ignored when less than or equal to zerocallerFileMatchingExpr- Regular expression file names must match to be sent; ignored if empty or null- Throws:
Exception
-