wt.jmx.core.mbeans
Interface FileViewerMBean

All Superinterfaces:
AbstractFileViewMBean, SelfEmailingMBean

public interface FileViewerMBean
extends AbstractFileViewMBean

Provides a simple MBean representation of a file

Supported API: true

Extendable: true


Method Summary
 void emailFile(String addressesOrEmailList, String subject, boolean compress)
          E-mail entire file as attachment, optionally compressing it

Supported API: true
 void emailTextFile(String addressesOrEmailList, String subject, long maxLines, long maxChars)
          E-mail last portion of text file

Supported API: true
 long getSize()
          Size of file (in bytes)

Supported API: true
 String[] viewFile()
          View last reasonable portion of this file

Supported API: true
 String[] viewFile(long maxLines, long maxChars)
          View last portion of this 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 Detail

getSize

long getSize()
Size of file (in bytes)

Supported API: true


viewFile

String[] viewFile()
                  throws IOException
View last reasonable portion of this file

Supported API: true

Throws:
IOException

viewFile

String[] viewFile(long maxLines,
                  long maxChars)
                  throws IOException
View last portion of this file

Supported API: true

Parameters:
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

emailFile

void emailFile(String addressesOrEmailList,
               String subject,
               boolean compress)
               throws IOException
E-mail entire file as attachment, optionally compressing it

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
compress - Whether to compress file attachment
Throws:
IOException

emailTextFile

void emailTextFile(String addressesOrEmailList,
                   String subject,
                   long maxLines,
                   long maxChars)
                   throws IOException
E-mail last portion of text file

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
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