Preliminary documentation subject to change

com.bugcollect
Class ReportingManager

java.lang.Object
  extended by com.bugcollect.ReportingManager

public class ReportingManager
extends java.lang.Object

This class handles submitting reports to bugcollect.com.
ReportingManager instances must be created with the proper applciation credentials used when submitting reports. It is recommended to keep one sngle the ReportingManager instance for for the entire duration of the application lifetime because of HTTP Digest authentication prototcol caching.
The easiest way to submit a report is to call Submit(java.lang.String, java.lang.Throwable) when an exception is caught:

 ReportingManager reportingManager = new ReportingManager(
                applicationName, applicationPassword);
    try
    {
        ...
    }
    catch(Exception ex)
    {
        reportingManager.Submit("Exception when trying to ...", ex);
    }
 
 
applicationName and applicationPassword must be the name and password of an application credential added to your account with bugcollect.com.


Constructor Summary
ReportingManager(java.lang.String applicationName, java.lang.String applicationPassword)
          Creates an instance of the ReportingManager that uses the given credentials to submit reports
 
Method Summary
 java.lang.String getMainPackage()
          The application main package name.
 void setMainPackage(java.lang.String value)
          Sets the application name to be used for reporting incidents.
 void Submit(Report report, IResponseCallback callbackDelegate, java.lang.Object state)
          Submits a report to bugcollect.com.
 void Submit(java.lang.String notes, java.lang.Throwable e)
          Creates a new report and submits it to bugcollect.com
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ReportingManager

public ReportingManager(java.lang.String applicationName,
                        java.lang.String applicationPassword)
Creates an instance of the ReportingManager that uses the given credentials to submit reports

Parameters:
applicationName - the credetial name to be used
applicationPassword - the credential password to be used
Method Detail

getMainPackage

public java.lang.String getMainPackage()
The application main package name. Used as the application name when submitting a report to bugcollect.com.


setMainPackage

public void setMainPackage(java.lang.String value)
Sets the application name to be used for reporting incidents.


Submit

public void Submit(Report report,
                   IResponseCallback callbackDelegate,
                   java.lang.Object state)
Submits a report to bugcollect.com. If supplied, the IResponseCallback callbackDelegate is invoked on submittion completion.

Parameters:
report - the incident report
See Also:
IResponseCallback

Submit

public void Submit(java.lang.String notes,
                   java.lang.Throwable e)
Creates a new report and submits it to bugcollect.com

Parameters:
notes - any incident specific notes
e - the exception or error from which the report is constructed
See Also:
Report.Report(java.lang.String, java.lang.Throwable)

Preliminary documentation subject to change