|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.lang.Throwable
java.lang.Exception
net.jini.core.entry.UnusableEntryException
public class UnusableEntryException
Thrown when one tries to get an Entry
from a service,
but the entry is unusable (due to serialization or other errors).
Normally partialEntry
points to an entry with as many
fields as possible filled in, with the array unusableFields
naming the fields that could not be deserialized and the array
nestedExceptions
having the corresponding exception.
If the serialized Entry
was corrupt enough that no
attempt could even be made to deserialize its fields,
partialEntry
and unusableFields
will be
null
, and nestedExceptions
will be an
array with one element that is the offending exception. This will
typically be because one or more of the classes of the Entry
type itself cannot be loaded.
The names in unusableFields
can be used together with
the reflection mechanisms of java.lang.reflect
to
examine the full state of the object.
Field Summary | |
---|---|
Throwable[] |
nestedExceptions
The exception that caused the failure for the corresponding field named in unusableFields. |
Entry |
partialEntry
The partial entry. |
(package private) static long |
serialVersionUID
|
String[] |
unusableFields
The names of the unusable fields. |
Constructor Summary | |
---|---|
UnusableEntryException(Entry partial,
String[] badFields,
Throwable[] exceptions)
Create an exception for the given partial entry and vectors of bad field names/nested exception pairs. |
|
UnusableEntryException(Throwable e)
Create an exception for a nested exception that prevented even an attempt to build an entry. |
Method Summary | |
---|---|
void |
printStackTrace()
Calls printStackTrace(System.err) . |
void |
printStackTrace(PrintStream s)
Calls super.printStackTrace(s) and then calls printStackTrace(s) on
each exception in nestedExceptions . |
void |
printStackTrace(PrintWriter s)
Calls super.printStackTrace(s) and then calls printStackTrace(s) on
each exception in nestedExceptions . |
private void |
readObject(ObjectInputStream in)
|
private void |
readObjectNoData()
|
Methods inherited from class java.lang.Throwable |
---|
fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, initCause, setStackTrace, toString |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
static final long serialVersionUID
public Entry partialEntry
null
.
public String[] unusableFields
unusableFields
will be null
.
public Throwable[] nestedExceptions
nestedExceptions
will be an array with
the one exception that prevented its use.
Constructor Detail |
---|
public UnusableEntryException(Entry partial, String[] badFields, Throwable[] exceptions)
partial
- the Entry object on which the exception occurredbadFields
- a String array containing the bad field namesexceptions
- an array of Throwable objects associated with the
bad field names
IllegalArgumentException
- if partial
is
null
and badFields
is not
null
or exceptions
does not have
exactly one element or if partial
is
non-null
and badFields
and
exceptions
are not the same length
NullPointerException
- if partial
is
non-null
and badFields
or any
element of badFields
is null
, or
if exceptions
or any element of
exceptions
is null
public UnusableEntryException(Throwable e)
e
- a Throwable representing the nested exception
NullPointerException
- if e
is null
Method Detail |
---|
private void readObject(ObjectInputStream in) throws IOException, ClassNotFoundException
InvalidObjectException
- if:
partialEntry
is null
and
unusableFields
is not null
or
nestedExceptions
does not have exactly one
element,
partialEntry
is non-null
and
unusableFields
and
nestedExceptions
are not the same length,
partialEntry
is non-null
and
unusableFields
is null
or
any element of unusableFields
is
null
, or
nestedExceptions
or any element of
nestedExceptions
is null
IOException
ClassNotFoundException
private void readObjectNoData() throws InvalidObjectException
InvalidObjectException
- if calledpublic void printStackTrace()
printStackTrace(System.err)
.
printStackTrace
in class Throwable
public void printStackTrace(PrintStream s)
super.printStackTrace(s)
and then calls printStackTrace(s)
on
each exception in nestedExceptions
.
printStackTrace
in class Throwable
public void printStackTrace(PrintWriter s)
super.printStackTrace(s)
and then calls printStackTrace(s)
on
each exception in nestedExceptions
.
printStackTrace
in class Throwable
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |