|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.universaldevices.resources.errormessages.Errors
public class Errors
This class handles all the error conditions generated either by ISY or by
UDClient
and notifies all the listeners
Field Summary | |
---|---|
static java.lang.String |
ERROR_DIALOG_TITLE
Start NLS |
Constructor Summary | |
---|---|
Errors()
|
Method Summary | |
---|---|
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 |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String ERROR_DIALOG_TITLE
Constructor Detail |
---|
public Errors()
Method Detail |
---|
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/status
public 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
otherwise
status
- - 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 subclasses
status
- - 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
)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |