Package net.jini.core.entry
Class UnusableEntryException
java.lang.Object
java.lang.Throwable
java.lang.Exception
net.jini.core.entry.UnusableEntryException
- All Implemented Interfaces:
Serializable
- Direct Known Subclasses:
DetailedUnusableEntryException
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.
- Since:
- 1.0
- Author:
- Sun Microsystems, Inc.
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionThe exception that caused the failure for the corresponding field named in unusableFields.The partial entry.String[]The names of the unusable fields. -
Constructor Summary
ConstructorsConstructorDescriptionCreate an exception for a nested exception that prevented even an attempt to build an entry.UnusableEntryException(Entry partial, String[] badFields, Throwable[] exceptions) Create an exception for the given partial entry and vectors of bad field names/nested exception pairs. -
Method Summary
Modifier and TypeMethodDescriptionvoidCallsprintStackTrace(System.err).voidCallssuper.printStackTrace(s)and then callsprintStackTrace(s)on each exception innestedExceptions.voidCallssuper.printStackTrace(s)and then callsprintStackTrace(s)on each exception innestedExceptions.Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, setStackTrace, toString
-
Field Details
-
partialEntry
The partial entry. Fields that could not be deserialized will benull. -
unusableFields
The names of the unusable fields. If the entry was entirely unusable,unusableFieldswill benull. -
nestedExceptions
The exception that caused the failure for the corresponding field named in unusableFields. If the entry was entirely unusable,nestedExceptionswill be an array with the one exception that prevented its use.
-
-
Constructor Details
-
UnusableEntryException
Create an exception for the given partial entry and vectors of bad field names/nested exception pairs.- Parameters:
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- Throws:
IllegalArgumentException- ifpartialisnullandbadFieldsis notnullorexceptionsdoes not have exactly one element or ifpartialis non-nullandbadFieldsandexceptionsare not the same lengthNullPointerException- ifpartialis non-nullandbadFieldsor any element ofbadFieldsisnull, or ifexceptionsor any element ofexceptionsisnull
-
UnusableEntryException
Create an exception for a nested exception that prevented even an attempt to build an entry.- Parameters:
e- a Throwable representing the nested exception- Throws:
NullPointerException- ifeisnull
-
-
Method Details
-
printStackTrace
public void printStackTrace()CallsprintStackTrace(System.err).- Overrides:
printStackTracein classThrowable
-
printStackTrace
Callssuper.printStackTrace(s)and then callsprintStackTrace(s)on each exception innestedExceptions.- Overrides:
printStackTracein classThrowable
-
printStackTrace
Callssuper.printStackTrace(s)and then callsprintStackTrace(s)on each exception innestedExceptions.- Overrides:
printStackTracein classThrowable
-