public interface ProxyCodebaseSpi
MethodConstraints
applied by the client
to CodebaseAccessor
methods and allow the client to obtain
current information about the code base
required by the smart proxy MarshalledInstance
and
provide it with a ClassLoader, unique
to it's InvocationHandler
instance.
This interface also exists to avoid code base annotation loss when smart
proxy instances are re-serialized, by consulting the original
export node, using CodebaseAccessor
.AtomicMarshalOutputStream
,
AtomicMarshalInputStream
,
AtomicMarshalledInstance
Modifier and Type | Interface and Description |
---|---|
static class |
ProxyCodebaseSpi.Util |
Modifier and Type | Method and Description |
---|---|
Object |
resolve(CodebaseAccessor bootstrapProxy,
MarshalledInstance proxy,
ClassLoader parentLoader,
ClassLoader verifierLoader,
Collection context) |
boolean |
substitute(Class serviceClass,
ClassLoader streamLoader)
Used in modular environments when class visibility is expected to
be identical at the local and remote endpoints.
|
Object resolve(CodebaseAccessor bootstrapProxy, MarshalledInstance proxy, ClassLoader parentLoader, ClassLoader verifierLoader, Collection context) throws IOException, ClassNotFoundException
bootstrapProxy
- an instance of RemoteMethodControl
and
TrustEquivalence
proxy
- marshalled proxy to be deserialized.parentLoader
- default loader of the current stream.verifierLoader
- verifier loader of the current stream.context
- the ObjectStreamContext
may contain
client MethodConstraints
to apply to
CodebaseAccessor
methods. The context should also be passed
to the MarshalledInstance
get method.IOException
- if an
IOException
occurs while deserializing the
object from its internal representationClassNotFoundException
- if any classes necessary
for reconstructing the contained object can not
be found or if context contains integrity constraints
and the integrity of the contained object's codebase
cannot be confirmed.boolean substitute(Class serviceClass, ClassLoader streamLoader)
serviceClass
- the class to check for visibility.streamLoader
- ClassLoader to check class visibility from.Copyright © 2016–2018 The Apache Software Foundation. All rights reserved.