Java Reference
In-Depth Information
a message provided by the DME vendor. When the second design is
chosen, the JDM exception classes allow easier fallbacks from the
user interface: In the previous example, if the system receives an
InvalidURIException, it can easily ask the user to enter a new one.
The two runtime exceptions defined by JDM are JDMIllegalArgu-
mentException and JDMUnsupportedFeatureException . Runtime excep-
tions result from unanticipated application execution failure and
may require stopping the application or, at least, restarting a session.
The JDM ConnectionFailureException has not been declared as a
RuntimeException and thus could occur in many situations. This
means that all methods using JDM calls should either process all
JDM exceptions or declare them in their signature for transfer to the
caller method. For the consoles we highlight in this chapter, we
avoided exception management to improve code readability. We
have created a specific RuntimeException that takes a JDMException as
argument. In effect, this translates the JDMException into a Java Run-
timeException and avoids chaining JDMException declarations in all
methods. The code of UnexpectedJDMException is provided in the file and is shown below:
1. public class UnexpectedJDMException extends RuntimeException {
private JDMException mJDMException;
public UnexpectedJDMException(JDMException iJDMException) {
mJDMException iJDMException;
protected final JDMException getJDMException() {
return mJDMException;
9. }
Administrative Console
The first GUI demonstrates the use of JDM API services to list,
rename, or delete the persistent representations of JDM named
objects from the MOR. Of course, this assumes the vendor imple-
mentation exposes persistent named objects (such as model, tasks, or
build settings).
Figure 13-2 depicts the GUI where the user has connected to a
DME and asked to view the list of tasks in the MOR. Elements of this
window will be explained later. Tasks are presented with their name,
description, creation date, duration, and final status.
Search WWH ::

Custom Search