private void readObject(ObjectInputStream in) throws IOException, ClassNotFoundException
ClassNotFoundException
- if class not found.IOException
- if de-serialization problem occurs.private void readObjectNoData() throws ObjectStreamException
ObjectStreamException
- if invoked, namely an InvalidObjectExceptionint lineno
int override
String description
String locationName
Throwable t
private void readObject(ObjectInputStream s) throws IOException, ClassNotFoundException
InvalidObjectException
- if any descriptor is null
,
or the descriptors array is empty, or if any descriptor is preceded by
another descriptor that matches at least the same methods
Default de-serialization is vulnerable to finalizer and reference
stealer attacks.IOException
ClassNotFoundException
private void writeObject(ObjectOutputStream out) throws IOException
IOException
MethodDesc[] descs
private void readObject(ObjectInputStream s) throws IOException, ClassNotFoundException
InvalidObjectException
- if types
is
non-null
and name
is either
null
or is not a syntactically valid method name;
or if types
is null
and name
is neither a syntactically valid method name, a syntactically
valid method name with a '*' appended, nor a name constructed from
some syntactically valid method name containing more than two
characters by replacing the first character of that name with '*';
or if any element of types
is null
; or
if constraints
is non-null
but emptyIOException
ClassNotFoundException
InvocationConstraints constraints
null
if there are no constraints.String name
types
is null
, or null
for a descriptor that matches all methods (in which case
types
must also be null
).Class[] types
null
for wildcard parameter types.private Object readResolve()
==
can be used.boolean val
true
for YES
, false
for
NO
private void readObject(ObjectInputStream s) throws IOException, ClassNotFoundException
null
, and that there are no duplicates.InvalidObjectException
- if there are no principals,
or any principal is null
, or if there are duplicate
principalsClassNotFoundException
- if class not found.IOException
- if de-serialization problem occurs.Principal[] principals
private void readObject(ObjectInputStream s) throws IOException, ClassNotFoundException
null
, primitive types, array types, or
final
classes that do not have Principal
as
a superinterface, and that no class is assignable to any other class.InvalidObjectException
- if there are no classes, or
any class is null
, a primitive type, array type, or
final
class that does not have Principal
as
a superinterface, or if any class is assignable to any other classClassNotFoundException
- if class not found.IOException
- if de-serialization problem occurs.Class[] classes
private void readObject(ObjectInputStream s) throws IOException, ClassNotFoundException
null
, and that there are no duplicates.InvalidObjectException
- if there are no principals,
or any principal is null
, or if there are duplicate
principalsClassNotFoundException
- if class not found.IOException
- if de-serialization problem occurs.Principal[] principals
private void readObject(ObjectInputStream s) throws IOException, ClassNotFoundException
null
, primitive types, array types, or
final
classes that do not have Principal
as
a superinterface, and that no class is assignable to any other class.InvalidObjectException
- if there are no classes, or
any class is null
, a primitive type, array type, or
final
class that does not have Principal
as
a superinterface, or if any class is assignable to any other classClassNotFoundException
- if class not found.IOException
- if de-serialization problem occurs.Class[] classes
public Object readResolve()
==
can be used.boolean val
true
for YES
, false
for
NO
long time
private void readObject(ObjectInputStream s) throws IOException, ClassNotFoundException
time
is greater than or equal to zero.InvalidObjectException
- if time
is less than zeroClassNotFoundException
- if class not found.IOException
- if a problem occurs during de-serialization.long time
private void readObject(ObjectInputStream s) throws IOException, ClassNotFoundException
null
and none are instances of this class, and that
there are no duplicates.InvalidObjectException
- if there are less than two constraints,
or any constraint is null
or an instance of this class,
or if there are duplicatesClassNotFoundException
- if class not found.IOException
- if a problem occurs during de-serialization.InvocationConstraint[] constraints
public Object readResolve()
==
can be used.boolean val
true
for YES
, false
for
NO
private void readObject(ObjectInputStream s) throws IOException, ClassNotFoundException
minStart
is less than or equal to
maxStart
, maxStart
is less than or equal to
minStop
, and minStop
is less than or equal to
maxStop
.InvalidObjectException
- if minStart
is greater
than maxStart
, or maxStart
is greater than
minStop
, or minStop
is greater than
maxStop
ClassNotFoundException
- if class not found.IOException
- if a problem occurs during de-serialization.long minStart
long maxStart
long minStop
long maxStop
private void readObject(ObjectInputStream s) throws IOException, ClassNotFoundException
minStart
is less than or equal to
maxStart
, maxStart
is less than or equal to
minStop
, minStop
is less than or equal to
maxStop
, and minStop
is greater than or equal
to zero.InvalidObjectException
- if minStart
is greater
than maxStart
, or maxStart
is greater than
minStop
, or minStop
is greater than
maxStop
, or minStop
is less than zeroClassNotFoundException
- if class not found.IOException
- if a problem occurs during de-serialization.long minStart
long maxStart
long minStop
long maxStop
private Object readResolve()
==
can be used.boolean val
true
for YES
, false
for
NO
private void readObject(ObjectInputStream s) throws IOException, ClassNotFoundException
null
elements and no duplicates.InvalidObjectException
- if the requirements or preferences
arrays are null
, or any element is null
,
or if there are duplicate requirements, duplicate preferences, or
preferences that are duplicates of requirementsClassNotFoundException
- if class not found.IOException
- if a problem occurs during de-serialization.InvocationConstraint[] prefs
InvocationConstraint[] reqs
private Object readResolve()
==
can be used.boolean val
true
for YES
, false
for
NO
private void readObject(ObjectInputStream s) throws IOException, ClassNotFoundException
null
, and that there are no duplicates.InvalidObjectException
- if there are no principals,
or any principal is null
, or if there are duplicate
principalsClassNotFoundException
- if class not found.IOException
- if de-serialization problem occurs.Principal[] principals
private void readObject(ObjectInputStream s) throws IOException, ClassNotFoundException
null
, and that there are no duplicates.InvalidObjectException
- if there are no principals,
or any principal is null
, or if there are duplicate
principalsClassNotFoundException
- if class not found.IOException
- if a problem occurs during de-serialization.Principal[] principals
private void readObject(ObjectInputStream oin) throws IOException, ClassNotFoundException
IOException
ClassNotFoundException
private void writeObject(ObjectOutputStream out) throws IOException
IOException
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
ClassNotFoundException
- if class not found.IOException
- if a problem occurs during de-serialization.private void readObjectNoData() throws InvalidObjectException
InvalidObjectException
- if calledEntry partialEntry
null
.String[] unusableFields
UnusableEntryException.getUnusableFields()
unusableFields
will be null
.Throwable[] nestedExceptions
UnusableEntryException.getNestedExceptions()
nestedExceptions
will be an array with
the one exception that prevented its use.private void readObject(ObjectInputStream in) throws IOException, ClassNotFoundException
ClassNotFoundException
- if class not found.IOException
- if a problem occurs during de-serialization.private void writeObject(ObjectOutputStream out) throws IOException
IOException
private void readObject(ObjectInputStream stream) throws IOException, ClassNotFoundException
ClassNotFoundException
- if class not found.IOException
- if a problem occurs during de-serialization.private void writeObject(ObjectOutputStream stream) throws IOException
This change breaks compatibility for subclasses that access these fields directly. For other classes, all fields were accessible via public API getter methods.
To allow an upgrade path for subclasses that extend RemoteEvent and provide public setter methods for these fields, it is recommended to override all public methods and maintain state independently using transient fields. The subclass should also use RemoteEvent getter methods to set these transient fields during de-serialization.
writeObject, instead of writing RemoteEvent fields, writes the result of all getter methods to the ObjectOutputStream, during serialization, preserving serial form compatibility wither earlier versions, while also allowing mutable subclasses to maintain full serial compatibility.
Mutable subclasses honoring this contract will be compatible with all versions since Jini 1.0.
IOException
private void readObject(ObjectInputStream in) throws IOException, ClassNotFoundException
InvalidObjectException
- if exceptionMap
is
null
, contains any key which is not an instance of
Lease
, or contains any value which in not an instance of
Throwable
ClassNotFoundException
- if class not found.IOException
- if a problem occurs during de-serialization.private void writeObject(ObjectOutputStream out) throws IOException
IOException
private void readObjectNoData() throws InvalidObjectException
InvalidObjectException
- if calledprivate void readObject(ObjectInputStream stream) throws IOException, ClassNotFoundException
ClassNotFoundException
- if class not found.IOException
- if a problem occurs during de-serialization.private void writeObject(ObjectOutputStream out) throws IOException
IOException
ServiceID serviceID
int transition
private void writeObject(ObjectOutputStream out) throws IOException
IOException
long mostSig
long leastSig
private void readObject(ObjectInputStream in) throws IOException, ClassNotFoundException
ClassNotFoundException
- if class not found.IOException
- if a problem occurs during de-serialization.private void writeObject(ObjectOutputStream out) throws IOException
IOException
ServiceItem[] items
int totalMatches
private void writeObject(ObjectOutputStream out) throws IOException
IOException
NestableTransaction transaction
Lease lease
private void writeObject(ObjectOutputStream out) throws IOException
IOException
Transaction transaction
Lease lease
NestableServerTransaction parent
TransactionManager mgr
long id
long id
Lease lease
private void writeObject(ObjectOutputStream out) throws IOException
IOException
private void readObject(ObjectInputStream oin) throws IOException, ClassNotFoundException
IOException
ClassNotFoundException
ServiceRegistrar[] regs
Map<K,V> groups
private void readObject(ObjectInputStream s) throws IOException, ClassNotFoundException
InvalidObjectException
- if the state of the
deserialized instance of this class is found to be invalid.IOException
ClassNotFoundException
private void writeObject(ObjectOutputStream out) throws IOException
IOException
ServiceRegistrar[] registrars
ServiceRegistrar
that were successfully unmarshalled during the process in which at
least one failure occurred. This set may be null
or
have zero length.MarshalledObject<T>[] marshalledRegistrars
ServiceRegistrar
instances
that could not be unmarshalled. This set should not be null
and should contain at least one element.Throwable[] exceptions
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 set of still-to-be-unmarshalled ServiceRegistrar
instances. 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 marshalledRegistrars
.
This set should not be null
and should contain at least
one element.private void readObject(ObjectInputStream s) throws IOException, ClassNotFoundException
InvalidObjectException
- if the state of the
deserialized instance of this class is found to be invalid.IOException
ClassNotFoundException
private void writeObject(ObjectOutputStream out) throws IOException
IOException
boolean discarded
false
, then the lookup services
referenced by this event were just discovered; if true
,
then those lookup services were just discarded.List<E> marshalledRegs
ServiceRegistrar
interface, and each is a proxy of
one of the recently discovered or discarded lookup service(s); the
lookup service(s) with which this event is associated.
Each proxy in this list is individually marshalled in order to add an additional 'layer' of serialization. Placing this serialization "wrapper" around each element prevents the deserialization mechanism from attempting to deserialize the individual elements in the list. That is, the deserialization mechanism will only deserialize the list itself. After the list itself is successfully deserialized, the client (or a third party, if the client requested that events be sent to a third party such as a mailbox), can then attempt to unmarshal each element separately. This allows each success to be captured, and each failure to be noted.
If the elements of this list were not each marshalled separately,
then upon encountering failure while attempting to deserialize any
one element of the list, the deserialization mechanism's
readObject
method will throw an IOException
;
resulting in the loss of all of the elements of the list, even those
that could be successfully deserialized.
ServiceRegistrar[] regs
marshalledRegs
array that were successfully unmarshalled (at least once) as a result
of one or more invocations of the getRegistrars
method
of this event. Upon deserializing this event, this array is empty,
but of the same size as marshalledRegs
; and will be
populated when the recipient of this event retrieves the registrars
corresponding to the elements of marshalledRegs
.Map<K,V> groups
Map
from the service IDs of the registrars of this event
to the groups in which each registrar is a member.Throwable cause
private void readObject(ObjectInputStream in) throws IOException, ClassNotFoundException
InvalidObjectException
- if the class of this object
implements Externalizable
ClassNotFoundException
- if class not found.IOException
- if a problem occurs during de-serialization.private void writeObject(ObjectOutputStream out) throws IOException
IOException
protected final Object readResolve()
readResolve
method with an alternate
implementation.protected final Object writeReplace()
writeReplace
method with an alternate
implementation.private void readObjectNoData() throws InvalidObjectException
InvalidObjectException
- unconditionallylong bits0
long bits1
private void readObject(ObjectInputStream in) throws IOException, ClassNotFoundException
ClassNotFoundException
- if class not found.IOException
- if a problem occurs during de-serialization.private void writeObject(ObjectOutputStream out) throws IOException
IOException
private void readObjectNoData() throws ObjectStreamException
ObjectStreamException
- an instance of InvalidObjectException if invoked.byte[] objBytes
objBytes
is
null
then the object marshalled was a null
reference.byte[] locBytes
equals
. If locBytes
is null, there were no
non-null
annotations during marshalling.int hash
MarshalledInstance.hashCode()
private void readObject(ObjectInputStream s) throws IOException, ClassNotFoundException
InvalidObjectException
- if the target name is null
,
or if the target name does not match the syntax specified in the
comments at the beginning of this classIOException
ClassNotFoundException
private void readObject(ObjectInputStream s) throws IOException, ClassNotFoundException
InvalidObjectException
- if the target name or actions
string is null
, or if the target name or actions string
does not match the syntax specified in the comments at the beginning
of this classIOException
ClassNotFoundException
String actions
private void readObject(ObjectInputStream s) throws IOException, ClassNotFoundException
InvalidObjectException
- if the list is
null
or any element is not an instance of
AuthenticationPermission
IOException
ClassNotFoundException
private void writeObject(ObjectOutputStream s) throws IOException
IOException
private void readObject(ObjectInputStream s) throws IOException, ClassNotFoundException
InvalidObjectException
- if
methodConstraintsSpecified
is false
and methodConstraints
is not null
, if
permissions
is null
, or if
permissions
is not null
and any of its
elements are null
IOException
- if an I/O error occursClassNotFoundException
- if the class of a serialized object could
not be foundprivate void readObjectNoData() throws InvalidObjectException
InvalidObjectException
- whenever this method is calledMethodConstraints methodConstraints
methodConstraintsSpecified
is
true
. Set to null
if
methodConstraintsSpecified
is
false
.boolean methodConstraintsSpecified
methodConstraints
when
verifying if proxies are trusted and for setting their
constraints.Permission[] permissions
null
.boolean verify
private void readObject(ObjectInputStream in) throws IOException, ClassNotFoundException
InvalidObjectException
- if the target name is null
or does not conform to the syntax specified in the
documentation for GrantPermission
IOException
ClassNotFoundException
private void writeObject(ObjectOutputStream out) throws IOException
NotSerializableException
- if the GrantPermission
was constructed explicitly with
java.security.UnresolvedPermission
sIOException
private void readObject(ObjectInputStream s) throws IOException, ClassNotFoundException
InvalidObjectException
- if the list is
null
or any element is not an instance of
GrantPermission
IOException
ClassNotFoundException
private void writeObject(ObjectOutputStream s) throws IOException
IOException
private void readObject(ObjectInputStream s) throws IOException, ClassNotFoundException
TrustEquivalence
, and that the bootstrap proxy is an instance
of both RemoteMethodControl
and TrustEquivalence
.InvalidObjectException
- if the main proxy is not an instance of
TrustEquivalence
, or the bootstrap proxy is not an
instance of both RemoteMethodControl
and
TrustEquivalence
IOException
ClassNotFoundException
RemoteMethodControl main
ProxyTrust boot
private void readObject(ObjectInputStream in) throws IOException, ClassNotFoundException
IOException
ClassNotFoundException
private void writeObject(ObjectOutputStream out) throws IOException
IOException
public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException
IOException
ClassNotFoundException
public void writeExternal(ObjectOutput out) throws IOException
IOException
public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException
IOException
ClassNotFoundException
public void writeExternal(ObjectOutput out) throws IOException
IOException
public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException
IOException
ClassNotFoundException
public void writeExternal(ObjectOutput out) throws IOException
IOException
public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException
IOException
ClassNotFoundException
public void writeExternal(ObjectOutput out) throws IOException
IOException
public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException
IOException
ClassNotFoundException
public void writeExternal(ObjectOutput out) throws IOException
IOException
public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException
IOException
ClassNotFoundException
public void writeExternal(ObjectOutput out) throws IOException
IOException
int length
boolean eof
public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException
IOException
ClassNotFoundException
public void writeExternal(ObjectOutput out) throws IOException
IOException
org.apache.river.api.security.ConcurrentPermissions.PermissionPendingResolutionCollection unresolved
ConcurrentMap<K,V> permsMap
boolean allPermission
private void readObject(ObjectInputStream in) throws InvalidObjectException
InvalidObjectException
private Object writeReplace()
Permission permission
private void readObject(ObjectInputStream in) throws IOException, ClassNotFoundException
IOException
ClassNotFoundException
int version
private void readObject(ObjectInputStream in) throws IOException, ClassNotFoundException
IOException
ClassNotFoundException
int size
private void readObject(ObjectInputStream in) throws IOException, ClassNotFoundException
IOException
ClassNotFoundException
int ttl
private void readObject(ObjectInputStream in) throws IOException, ClassNotFoundException
IOException
ClassNotFoundException
int timeout
Copyright © 2016–2018 The Apache Software Foundation. All rights reserved.