Interface DirViewMBean

All Superinterfaces:
AbstractFileViewMBean, SelfEmailingMBean
All Known Subinterfaces:
ManagedDirViewMBean
All Known Implementing Classes:
DirView, EnigmaLogsDirViewer, JBossServerLogsDirViewer, LogsDirViewer, ManagedDirView, PsiInstallerDirViewer, SciInstallerDirViewer, ServletLogsDirViewer, SimpleDirViewer, WebServerLogsDirViewer

public interface DirViewMBean extends AbstractFileViewMBean
Allows viewing of selected contents of a selected directory

Supported API: true

Extendable: true
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    emailFiles(String addressesOrEmailList, String subject, boolean oneMessagePerFile, boolean recursive)
    E-mail files filtered as per MBean attributes

    Supported API: true
    void
    emailFiles(String addressesOrEmailList, String subject, boolean oneMessagePerFile, boolean recursive, int maxAgeInDays)
    E-mail files filtered as per MBean attributes and specified file age

    Supported API: true
    void
    emailFiles(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: true
    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
    Whether file filter allows numeric suffixes (".1", for example) after the specified extension (ignored when FileExtensions is unspecified/null)

    Supported API: true
    byte[]
    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: true
    getFileAsStreamingResult(String relativeFilePath)
    [FOR INTERNAL USE ONLY] Get file as specialized internal streaming result object (without compression applied)

    Supported API: true
    getFileAsStreamingResult(String relativeFilePath, boolean compressIfNotGzipFile)
    [FOR INTERNAL USE ONLY] Get file as specialized internal streaming result object

    Supported API: true
    Extensions of files to be shown

    Supported API: true
    Regular expression used to filter file names shown

    Supported API: true
    getFilesAsStreamingResult(boolean recursive)
    [FOR INTERNAL USE ONLY] Get files in directory as specialized internal streaming result object

    Supported API: true
    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
    long
    Remaining free space (as per java.io.File.getFreeSpace()) on file system partition containing this directory

    Supported API: true
    getLastModifiedTime(String relativeFilePath)
    Get last modification date of file, or null if this cannot be obtained

    Supported API: true
    double
    Percentage of free space on file system partition containing this directory

    Supported API: true
    double
    Percentage of usable free space on file system partition containing this directory

    Supported API: true
    long
    Total size (as per java.io.File.getTotalSpace()) of file system partition containing this directory

    Supported API: true
    long
    Remaining usable free space (as per java.io.File.getUsableSpace()) on file system partition containing this directory

    Supported API: true
    listFiles(boolean recursive)
    List files in directory as relative paths

    Supported API: true
    listFiles(boolean recursive, int maxAgeInDays, int minAgeInDays, String callerFileMatchingExpr)
    List files in directory as relative paths

    Supported API: true
    void
    Refresh set of MBeans aggregated by this one based on current file system state

    Supported API: true
    searchFiles(String searchRegexp)
    Searches all specified files

    Supported API: true
    searchFiles(String searchRegexp, int maxLines)
    Searches all specified files

    Supported API: true
    searchFiles(String searchRegexp, String newEntryRegexp, boolean recursive, int maxAgeInDays, int minAgeInDays, String callerFileMatchingExpr)
    Searches all specified files

    Supported API: true
    searchFiles(String searchRegexp, String newEntryRegexp, boolean recursive, int maxAgeInDays, int minAgeInDays, String callerFileMatchingExpr, int maxLines)
    Searches all specified files

    Supported API: true
    searchFilesAsMap(String searchRegexp)
    Searches all specified files and returns results as a Map<String,String[]>

    Supported API: true
    searchFilesAsMap(String searchRegexp, int maxLines)
    Searches all specified files and returns results as a Map<String,String[]>

    Supported API: true
    searchFilesAsMap(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: true
    searchFilesAsMap(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: true
    searchFilesAsStreamingMap(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 objects
    void
    sendFilesToSupport(long callNumber, String description, boolean recursive)
    Send files to technical support

    Supported API: true
    void
    sendFilesToSupport(long callNumber, String description, boolean recursive, int maxAgeInDays)
    Send files filtered by specified file age to technical support

    Supported API: true
    void
    sendFilesToSupport(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: true
    viewFile(String relativeFilePath)
    View last reasonable portion of specified file

    Supported API: true
    viewFile(String relativeFilePath, long maxLines, long maxChars)
    View last portion of specified file

    Supported API: true

    Methods inherited from interface wt.jmx.core.mbeans.AbstractFileViewMBean

    getLastModifiedTime, getName, getPath, isExists

    Methods 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

      @MBeanOperationImpact(0) void refresh()
      Refresh set of MBeans aggregated by this one based on current file system state

      Supported API: true
    • listFiles

      @MBeanOperationImpact(0) String[] listFiles(boolean recursive) throws IOException
      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-directories
      maxAgeInDays - Maximum age in days (by modification date) of files to list
      minAgeInDays - Minimum age in days (by modification date) of files to list; ignored when less than or equal to zero
      callerFileMatchingExpr - Regular expression file names must match to be listed; ignored if empty or null
      Throws:
      IOException
    • viewFile

      @MBeanOperationImpact(0) String[] viewFile(String relativeFilePath) throws IOException
      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 expression
      maxLines - Maximum number of lines to include; non-positive numbers imply no limit
      maxChars - Maximum number of characters to include; non-positive numbers imply no limit
      Throws:
      IOException
    • getLastModifiedTime

      @MBeanOperationImpact(0) Timestamp getLastModifiedTime(String relativeFilePath)
      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

      @MBeanOperationImpact(0) byte[] getFileAsGzippedBytes(String relativeFilePath) throws IOException
      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

      @MBeanOperationImpact(0) Object getFileAsStreamingResult(String relativeFilePath)
      [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 expression
      compressIfNotGzipFile - Whether stream should be compressed if it is not a .gz file; .gz files will not be recompressed in any case
    • getFilesAsStreamingResult

      @MBeanOperationImpact(0) Object getFilesAsStreamingResult(boolean recursive)
      [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-directories
      maxAgeInDays - Maximum age in days (by modification date) of files to include
      minAgeInDays - Minimum age in days (by modification date) of files to include; ignored when less than or equal to zero
      callerFileMatchingExpr - Regular expression file names must match to be included; ignored if empty or null
    • searchFiles

      @MBeanOperationImpact(0) String[] searchFiles(String searchRegexp) throws IOException
      Searches all specified files

      Supported API: true
      Parameters:
      searchRegexp - Regular expression to search with
      Throws:
      IOException
    • searchFiles

      @MBeanOperationImpact(0) String[] searchFiles(String searchRegexp, int maxLines) throws IOException
      Searches all specified files

      Supported API: true
      Parameters:
      searchRegexp - Regular expression to search with
      maxLines - 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 with
      newEntryRegexp - Regular expression which indicate the first line of an "entry"; if null or empty, the value of the Dumper MBean's DefaultNewEntryRegexp is used
      recursive - Whether to include files from sub-directories
      maxAgeInDays - Maximum age in days (by modification date) of files to search
      minAgeInDays - Minimum age in days (by modification date) of files to search; ignored when less than or equal to zero
      callerFileMatchingExpr - 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 with
      newEntryRegexp - Regular expression which indicate the first line of an "entry"; if null or empty, the value of the Dumper MBean's DefaultNewEntryRegexp is used
      recursive - Whether to include files from sub-directories
      maxAgeInDays - Maximum age in days (by modification date) of files to search
      minAgeInDays - Minimum age in days (by modification date) of files to search; ignored when less than or equal to zero
      callerFileMatchingExpr - Regular expression file names must match to be searched; ignored if empty or null
      maxLines - 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 with
      maxLines - 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 with
      newEntryRegexp - Regular expression which indicate the first line of an "entry"; if null or empty, the value of the Dumper MBean's DefaultNewEntryRegexp is used
      recursive - Whether to include files from sub-directories
      maxAgeInDays - Maximum age in days (by modification date) of files to search
      minAgeInDays - Minimum age in days (by modification date) of files to search; ignored when less than or equal to zero
      callerFileMatchingExpr - 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 with
      newEntryRegexp - Regular expression which indicate the first line of an "entry"; if null or empty, the value of the Dumper MBean's DefaultNewEntryRegexp is used
      recursive - Whether to include files from sub-directories
      maxAgeInDays - Maximum age in days (by modification date) of files to search
      minAgeInDays - Minimum age in days (by modification date) of files to search; ignored when less than or equal to zero
      callerFileMatchingExpr - Regular expression file names must match to be searched; ignored if empty or null
      maxLines - 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 with
      newEntryRegexp - Regular expression which indicate the first line of an "entry"; if null or empty, the value of the Dumper MBean's DefaultNewEntryRegexp is used
      recursive - Whether to include files from sub-directories
      maxAgeInDays - Maximum age in days (by modification date) of files to search
      minAgeInDays - Minimum age in days (by modification date) of files to search; ignored when less than or equal to zero
      callerFileMatchingExpr - Regular expression file names must match to be searched; ignored if empty or null
      maxLines - Maximum lines to return from any given file (not including elision line); negative values imply no limit
      streamThresholdCharCount - 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 to
      subject - Subject to give e-mail
      oneMessagePerFile - Whether to send a separate e-mail message for each file
      recursive - 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 to
      subject - Subject to give e-mail
      oneMessagePerFile - Whether to send a separate e-mail message for each file
      recursive - Whether to include files from sub-directories
      maxAgeInDays - 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 to
      subject - Subject to give e-mail
      oneMessagePerFile - Whether to send a separate e-mail message for each file
      recursive - Whether to include files from sub-directories
      maxAgeInDays - Maximum age in days (by modification date) of files to e-mail
      minAgeInDays - Minimum age in days (by modification date) of files to e-mail; ignored when less than or equal to zero
      callerFileMatchingExpr - 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 with
      description - Description to give files sent
      recursive - 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 with
      description - Description to give files sent
      recursive - Whether to include files from sub-directories
      maxAgeInDays - 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 with
      description - Description to give files sent
      recursive - Whether to include files from sub-directories
      maxAgeInDays - Maximum age in days (by modification date) of files to send
      minAgeInDays - Minimum age in days (by modification date) of files to send; ignored when less than or equal to zero
      callerFileMatchingExpr - Regular expression file names must match to be sent; ignored if empty or null
      Throws:
      Exception