public class LookupUnmarshalException extends Exception
MarshalledObject
, different
exceptions can occur. An IOException
can occur while
deserializing the object from its internal representation. A
ClassNotFoundException
can occur if, while deserializing
the object from its internal representation, either the class file of
the object cannot be found, or the class file of either an interface
or a class referenced by the object being deserialized cannot be found.
Typically, a ClassNotFoundException
occurs when the codebase
from which to retrieve the needed class file is not currently available.
This class provides a mechanism that clients of the lookup discovery
service may use for efficient handling of the exceptions that may
occur when unmarshalling elements of a set of marshalled instances
of the ServiceRegistrar
interface. When elements in such
a set are unmarshalled, the LookupUnmarshalException
class
may be used to collect and report pertinent information generated when
failure occurs while unmarshalling the elements of the set.
The information that may be of interest to entities that receive this
exception class is contained in the following fields: a set of
Thus, when exceptional conditions occur while unmarshalling a set of
marshalled instances of
Note that this exception class should be used only to report exceptional
conditions occurring when unmarshalling a set of marshalled instances
of the ServiceRegistrar
instances in which each element is the
result of a successful unmarshalling attempt, a set of marshalled instances
of ServiceRegistrar
in which each element could not be
successfully unmarshalled, and a set of exceptions (IOException
,
ClassNotFoundException
, or some unchecked exception) in which
each element corresponds to one of the unmarshalling failures.
ServiceRegistrar
, this class can
be used not only to indicate that an exceptional condition has occurred,
but also to provide information that can be used to perform error handling
activities such as: determining if it is feasible to continue with
processing, reporting exceptions, attempting recovery, and debugging.
ServiceRegistrar
interface.
ServiceRegistrar
,
Serialized FormConstructor and Description |
---|
LookupUnmarshalException(ServiceRegistrar[] registrars,
MarshalledObject[] marshalledRegistrars,
Throwable[] exceptions)
Constructs a new instance of
LookupUnmarshalException . |
LookupUnmarshalException(ServiceRegistrar[] registrars,
MarshalledObject[] marshalledRegistrars,
Throwable[] exceptions,
String message)
Constructs a new instance of
LookupUnmarshalException . |
Modifier and Type | Method and Description |
---|---|
Throwable[] |
getExceptions()
Accessor method that returns an array consisting of instances of
Throwable , where each element of the array corresponds
to one of the exceptions that occurred during the unmarshalling
process. |
MarshalledObject[] |
getMarshalledRegistrars()
Accessor method that returns an array consisting of instances of
MarshalledObject , where each element of the array is a
marshalled instance of the ServiceRegistrar interface,
and corresponds to an object that could not be successfully
unmarshalled. |
ServiceRegistrar[] |
getRegistrars()
Accessor method that returns an array consisting of instances of
ServiceRegistrar , where each element of the array
corresponds to a successfully unmarshalled object. |
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
public LookupUnmarshalException(ServiceRegistrar[] registrars, MarshalledObject[] marshalledRegistrars, Throwable[] exceptions)
LookupUnmarshalException
.registrars
- Array containing the set of instances of
ServiceRegistrar
that were
successfully unmarshalled.marshalledRegistrars
- Array containing the set of marshalled
ServiceRegistrar
instances
that could not be unmarshalled.exceptions
- Array containing the set of exceptions that
occurred during the unmarshalling process.
Each element in this set should be an
instance of IOException
,
ClassNotFoundException
, or
some unchecked exception. Furthermore,
there should be a one-to-one correspondence
between each element in this set and
each element in the
marshalledRegistrars
parameter.
That is, the element of this set
corresponding to index i should be an
instance of the exception that occurred
while attempting to unmarshal the element
at index i of the
marshalledRegistrars
parameter.
NullPointerException
- this exception occurs
when null
is input for either the
marshalledRegistrars
parameter or the
exceptions
parameter.IllegalArgumentException
- this exception occurs when
either the marshalledRegistrars
parameter or the
exceptions
parameter has zero length; or when the
lengths of those two parameters are not equal.public LookupUnmarshalException(ServiceRegistrar[] registrars, MarshalledObject[] marshalledRegistrars, Throwable[] exceptions, String message)
LookupUnmarshalException
.registrars
- Array containing the set of instances of
ServiceRegistrar
that were
successfully unmarshalled.marshalledRegistrars
- Array containing the set of marshalled
ServiceRegistrar
instances
that could not be unmarshalled.exceptions
- Array containing the set of exceptions that
occurred during the unmarshalling process.
Each element in this set should be an
instance of IOException
,
ClassNotFoundException
, or
some unchecked exception. Furthermore,
there should be a one-to-one correspondence
between each element in this set and
each element in the
marshalledRegistrars
parameter.
That is, the element of this set
corresponding to index i should be an
instance of the exception that occurred
while attempting to unmarshal the element
at index i of the
marshalledRegistrars
parameter.
message
- String
describing the nature
of the exceptionNullPointerException
- this exception occurs
when null
is input for either the
marshalledRegistrars
parameter or the
exceptions
parameter.IllegalArgumentException
- this exception occurs when
either the marshalledRegistrars
parameter or the
exceptions
parameter has zero length; or when the
lengths of those two parameters are not equal.public ServiceRegistrar[] getRegistrars()
ServiceRegistrar
, where each element of the array
corresponds to a successfully unmarshalled object. Note that the
same array is returned on each invocation of this method; that is,
a copy is not made.ServiceRegistrar
, where
each element corresponds to a successfully unmarshalled object.public MarshalledObject[] getMarshalledRegistrars()
MarshalledObject
, where each element of the array is a
marshalled instance of the ServiceRegistrar
interface,
and corresponds to an object that could not be successfully
unmarshalled. Note that the same array is returned on each invocation
of this method; that is, a copy is not made.ServiceRegistrar
,
where each element corresponds to an object in which failure
occurred while attempting to unmarshal the object.public Throwable[] getExceptions()
Throwable
, where each element of the array corresponds
to one of the exceptions that occurred during the unmarshalling
process. Note that the same array is returned on each invocation
of this method; that is, a copy is not made.
Each element in the return set should be an instance of
IOException
, ClassNotFoundException
, or
some unchecked exception. Additionally, there should be a one-to-one
correspondence between each element in the array returned by this method
and the array returned by the getMarshalledRegistrars
method. That is, the i-th element of the set returned by this method
should be an instance of the exception that occurred while attempting
to unmarshal the i-th element of the set returned by the method
getMarshalledRegistrars
.
Throwable
, where each element
corresponds to one of the exceptions that occurred during
the unmarshalling process.Copyright 2007-2013, multiple authors.
Licensed under the Apache License, Version 2.0, see the NOTICE file for attributions.