public class AtomicInvocationDispatcher extends BasicInvocationDispatcher
| Constructor and Description |
|---|
AtomicInvocationDispatcher(Collection methods,
ServerCapabilities serverCapabilities,
MethodConstraints serverConstraints,
Class permissionClass,
ClassLoader loader) |
| Modifier and Type | Method and Description |
|---|---|
protected ObjectInputStream |
createMarshalInputStream(Object impl,
InboundRequest request,
boolean integrity,
Collection context)
Returns a new marshal input stream to use to read objects from the
request input stream obtained by invoking the
getRequestInputStream method
on the given request. |
protected ObjectOutputStream |
createMarshalOutputStream(Object impl,
Method method,
InboundRequest request,
Collection context)
Returns a new marshal output stream to use to write objects to the
response output stream obtained by invoking the
getResponseOutputStream
method on the given request. |
checkAccess, checkClientPermission, checkPermissionClass, dispatch, getClassLoader, invoke, marshalReturn, marshalThrow, unmarshalArguments, unmarshalMethodpublic AtomicInvocationDispatcher(Collection methods, ServerCapabilities serverCapabilities, MethodConstraints serverConstraints, Class permissionClass, ClassLoader loader) throws ExportException
ExportExceptionprotected ObjectInputStream createMarshalInputStream(Object impl, InboundRequest request, boolean integrity, Collection context) throws IOException
getRequestInputStream method
on the given request.
AtomicInvocationDispatcher implements this method as
follows:
First, a class loader is selected to use as the
defaultLoader and the verifierLoader for
the marshal input stream instance. If the class loader specified at
construction is not null, the selected loader is that
loader. Otherwise, if a security manager exists, its checkPermission method is invoked
with the permission ; this invocation may
throw a RuntimePermission("getClassLoader")SecurityException. If the above security check
succeeds, the selected loader is the class loader of
impl's class.
This method returns a new MarshalInputStream instance
constructed with the input stream (obtained from the
request as specified above) for the input stream
in, the selected loader for defaultLoader
and verifierLoader, the boolean integrity
for verifyCodebaseIntegrity, and an unmodifiable view
of context for the context collection.
The useCodebaseAnnotations method is invoked on the created stream
before it is returned.
A subclass can override this method to control how the marshal input stream is created or implemented.
createMarshalInputStream in class BasicInvocationDispatcherimpl - the remote objectrequest - the inbound requestintegrity - true if object integrity is being
enforced for the remote call, and false otherwisecontext - the server contextIOException - if an I/O exception occursNullPointerException - if any argument is nullprotected ObjectOutputStream createMarshalOutputStream(Object impl, Method method, InboundRequest request, Collection context) throws IOException
getResponseOutputStream
method on the given request.
This method will be called with a null
method argument if an IOException occurred
when reading method information from the incoming call stream.
BasicInvocationDispatcher implements this method to
return a new MarshalOutputStream instance constructed with
the output stream obtained from the request as
specified above and an unmodifiable view of the given
context collection.
A subclass can override this method to control how the marshal output stream is created or implemented.
createMarshalOutputStream in class BasicInvocationDispatcherimpl - the remote objectmethod - the possibly-null Method
instance corresponding to the interface method invoked on
the remote objectrequest - the inbound requestcontext - the server contextIOException - if an I/O exception occursNullPointerException - if impl,
request, or context is
nullCopyright © 2016–2018. All rights reserved.