Skip navigation links

Oracle Fusion Middleware Java API Reference for Oracle Service Bus
11g Release 1 (11.1.1.6.3)

E15033-08


com.bea.wli.config.resource
Class Diagnostic

java.lang.Object
  extended by com.bea.wli.config.resource.Diagnostic

All Implemented Interfaces:
java.io.Serializable

public class Diagnostic
extends java.lang.Object
implements java.io.Serializable

Represent a particular validation message related to a resource. Diagnostic objects are generated as a result of validation that is performed when a resource changes. Such changes in the system trigger validation for the changed resource, as well as all other resources that (transitively) depend on the changed resource.

A diagnostic object contains a system severity level, a user severity level, a message, an optional location, an optional numeric code and an optional exception element. This class does not put any restrictions on the form and meaning of location and numeric codes. Such semantics should be published explicitly by the generator of the diagnostic object so that the interpretation of these fields can be done by users unambiguously.

See Also:
Serialized Form

Nested Class Summary
static class Diagnostic.Severity
          Enumerated type that describes how this status should be interpreted by the configuration framework.
static class Diagnostic.UserSeverity
          Describes the user visible severity of the diagnostic message.

 

Constructor Summary
Diagnostic(Diagnostic.Severity severity, Diagnostic.UserSeverity userSeverity, int code, java.lang.Object location, java.lang.String message, java.lang.Exception exception)
          Create a diagnostic object with the given arguments.

 

Method Summary
 boolean equals(java.lang.Object o)
           
 int getCode()
          Returns the user given code
 java.lang.Throwable getException()
          Returns the exception if any.
 java.lang.Object getLocation()
          Returns the location that this diagnostic message refers to.
 java.lang.String getMessage()
          Returns the diagnostic message
 Diagnostic.Severity getSeverity()
          The severity of this diagnostic object.
 Diagnostic.UserSeverity getUserSeverity()
          Returns the user visible severity of this object
 int hashCode()
           
static Diagnostic mkCannotCommit(int code, java.lang.Object location, java.lang.String message, java.lang.Exception ex)
          Creates a Diagnostic object with CannotCommit severity.
static Diagnostic mkCannotCreate(int code, java.lang.Object location, java.lang.String message, java.lang.Exception ex)
          Creates a Diagnostic object with CannotCreate severity.
static Diagnostic mkValid(Diagnostic.UserSeverity userSeverity, int code, java.lang.Object location, java.lang.String message)
          Creates a Diagnostic object with Valid severity.

 

Methods inherited from class java.lang.Object
getClass, notify, notifyAll, toString, wait, wait, wait

 

Constructor Detail

Diagnostic

public Diagnostic(Diagnostic.Severity severity,
                  Diagnostic.UserSeverity userSeverity,
                  int code,
                  java.lang.Object location,
                  java.lang.String message,
                  java.lang.Exception exception)
Create a diagnostic object with the given arguments.
Parameters:
severity - the severity level for this diagnostic message. Cannot be null.
code - optional numeric code for this diagnostic object, whose semantics must be published elsewhere.
location - optional location where this diagnostic object relates to. The semantic of the location field must be published elsewhere.
message - optional the message. If null, the exception must be non-null.
exception - optional exception. if null, the message must be non-null.

Method Detail

mkValid

public static Diagnostic mkValid(Diagnostic.UserSeverity userSeverity,
                                 int code,
                                 java.lang.Object location,
                                 java.lang.String message)
Creates a Diagnostic object with Valid severity. Internal use

mkCannotCommit

public static Diagnostic mkCannotCommit(int code,
                                        java.lang.Object location,
                                        java.lang.String message,
                                        java.lang.Exception ex)
Creates a Diagnostic object with CannotCommit severity. Internal use

mkCannotCreate

public static Diagnostic mkCannotCreate(int code,
                                        java.lang.Object location,
                                        java.lang.String message,
                                        java.lang.Exception ex)
Creates a Diagnostic object with CannotCreate severity. Internal use

getSeverity

public Diagnostic.Severity getSeverity()
The severity of this diagnostic object.

getUserSeverity

public Diagnostic.UserSeverity getUserSeverity()
Returns the user visible severity of this object

getCode

public int getCode()
Returns the user given code

getLocation

public java.lang.Object getLocation()
Returns the location that this diagnostic message refers to.

getMessage

public java.lang.String getMessage()
Returns the diagnostic message

getException

public java.lang.Throwable getException()
Returns the exception if any. It is possible that the exception that is generated by the validator on one JVM is not on the classpath of the client who is accessing the exception. In order to avoid serialization errors, the exception is wrapped with a serialization safe object. The exception is serialized into a byte array when the diagnostic object is constructed. Furthermore a serialization-safe stack trace representation of the exception is kept alongside. If on deserialization the original exception cannot be recovered, the serialization-safe stack trace is returned.

equals

public boolean equals(java.lang.Object o)
Overrides:
equals in class java.lang.Object

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object

Skip navigation links

Oracle Fusion Middleware Java API Reference for Oracle Service Bus
11g Release 1 (11.1.1.6.3)

E15033-08


Copyright © 2008, 2012, Oracle. All rights reserved.