public class Errors
extends java.lang.Object
UDClient
and notifies all the listenersModifier and Type | Field and Description |
---|---|
static java.lang.String |
ERROR_DIALOG_TITLE
Start NLS
|
Constructor and Description |
---|
Errors() |
Modifier and Type | Method and Description |
---|---|
static void |
addErrorListener(ErrorEventListener l)
Adds an error listener
|
static java.util.Enumeration |
getErrorListeners() |
static java.lang.String |
getErrorMessage(int status)
Returns an error message based on the error id/status
|
static java.lang.String |
getLastError(int err) |
static java.lang.String |
getSMTPError(java.lang.String err) |
static boolean |
isSMTPError(int err) |
static void |
removeErrorListener(ErrorEventListener l)
Removes an error listener
|
static void |
removeGUIErrorHandler()
Removes the previously set
GUIErrorHandler |
static void |
resetStatus()
Since errors are handled in a state machine (i.e.
|
static GUIErrorHandler |
setGUIErrorHandler(GUIErrorHandler ge)
Sets a GUI error handler which is going to be invoked in case of
errors.
|
static void |
showError(int status,
java.lang.String message)
Convenient method for showError when the error is generated by
UDClient and/or its proper subclasses |
static void |
showError(int status,
java.lang.String message,
java.lang.Object object)
This method is called by
UDClient and its proper subclasses to
indicate error conditions. |
static void |
showError(java.lang.String msg,
java.lang.String title,
int type)
Convenient method to completely bypass the
Error subroutines
and print out a message to either System.err or to GUIErrorHandler (if it's
installed) |
static void |
Stop()
Clear all the static variables
|
public static final java.lang.String ERROR_DIALOG_TITLE
public static void addErrorListener(ErrorEventListener l)
l
- - the listener to be addedpublic static void removeErrorListener(ErrorEventListener l)
l
- - the listener to be removedpublic static java.util.Enumeration getErrorListeners()
Enumeration
of all error listenerspublic static GUIErrorHandler setGUIErrorHandler(GUIErrorHandler ge)
ge
- - the GUIErrorHandler
public static void removeGUIErrorHandler()
GUIErrorHandler
public static void Stop()
public static final boolean isSMTPError(int err)
public static java.lang.String getLastError(int err)
public static java.lang.String getSMTPError(java.lang.String err)
public static void resetStatus()
public static java.lang.String getErrorMessage(int status)
status
- - the error id/statuspublic static void showError(int status, java.lang.String message, java.lang.Object object)
UDClient
and its proper subclasses to
indicate error conditions. As such, this method should not be extended or
reimplemented.
This method is the traffic controller for all the errors and thus notifies all
the error listeners (by invoking errorOccurred method). If the errorOccured method
returns true, then this method prints the error to System.err if no GUIErrorHandler
is installed, or calls the showError(...) on GUIErrorHandler
otherwisestatus
- - the error idmessage
- - an optional messageobject
- - the UDProxyDevice
initiating this event/error (if any)public static void showError(int status, java.lang.String message)
UDClient
and/or its proper subclassesstatus
- - the error idmessage
- - an optional messagepublic static void showError(java.lang.String msg, java.lang.String title, int type)
Error
subroutines
and print out a message to either System.err or to GUIErrorHandler (if it's
installed)msg
- - the message to be printedtitle
- - the title if anytype
- - the type (based on JOptionPane
)