public class BugReportSender extends java.lang.Thread
Currently, we try to open a browser window for the user that displays the bug report.
Modifier and Type | Class and Description |
---|---|
private static class |
BugReportSender.BugReportSenderException |
static interface |
BugReportSender.BugReportSendingHandler
Called during bug submission to JOSM bugtracker.
|
Modifier and Type | Field and Description |
---|---|
private java.lang.String |
errorMessage |
static BugReportSender.BugReportSendingHandler |
FALLBACK_BUGREPORT_SENDING_HANDLER
The fallback bug report sending handler if none is set.
|
private static BugReportSender.BugReportSendingHandler |
handler |
private java.lang.String |
statusText |
Modifier | Constructor and Description |
---|---|
protected |
BugReportSender(java.lang.String statusText)
Creates a new sender.
|
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getErrorMessage()
Returns the error message that could have occurred during bug sending.
|
private static java.lang.String |
getJOSMTicketURL() |
private java.lang.String |
pasteDebugText()
Sends the debug text to the server.
|
static BugReportSender |
reportBug(java.lang.String statusText)
Opens the bug report window on the JOSM server.
|
private static java.lang.String |
retrieveDebugToken(org.w3c.dom.Document document) |
void |
run() |
static void |
setBugReportSendingHandler(BugReportSender.BugReportSendingHandler bugReportSendingHandler)
Sets the
BugReportSender.BugReportSendingHandler for bug report sender. |
activeCount, checkAccess, clone, countStackFrames, currentThread, destroy, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, start, stop, stop, suspend, toString, yield
public static final BugReportSender.BugReportSendingHandler FALLBACK_BUGREPORT_SENDING_HANDLER
private static volatile BugReportSender.BugReportSendingHandler handler
private final java.lang.String statusText
private java.lang.String errorMessage
protected BugReportSender(java.lang.String statusText)
statusText
- The status text to send.public void run()
run
in interface java.lang.Runnable
run
in class java.lang.Thread
private java.lang.String pasteDebugText() throws BugReportSender.BugReportSenderException
BugReportSender.BugReportSenderException
- if sending the report failed.private static java.lang.String getJOSMTicketURL()
private static java.lang.String retrieveDebugToken(org.w3c.dom.Document document) throws javax.xml.xpath.XPathExpressionException, BugReportSender.BugReportSenderException
javax.xml.xpath.XPathExpressionException
BugReportSender.BugReportSenderException
public final java.lang.String getErrorMessage()
null
if successfulpublic static BugReportSender reportBug(java.lang.String statusText)
statusText
- The status text to send along to the server.public static void setBugReportSendingHandler(BugReportSender.BugReportSendingHandler bugReportSendingHandler)
BugReportSender.BugReportSendingHandler
for bug report sender.bugReportSendingHandler
- the handler in charge of completing the bug report submission and handle errors. Must not be null