public static class SystemAccessILFactory.SystemDispatcher extends BasicInvocationDispatcher
BasicInvocationDispatcher for
ActivationSystem instances that optionally enforces a
GroupPolicy on calls to registerGroup and
setActivationGroupDesc.| Constructor and Description |
|---|
SystemDispatcher(Collection methods,
Remote impl,
ServerCapabilities serverCaps,
MethodConstraints serverConstraints,
Class permClass,
GroupPolicy policy,
boolean localAccessCheck,
ClassLoader loader)
Creates an invocation dispatcher to receive incoming remote calls
for the specified methods, for a server and transport with the
specified capabilities, enforcing the specified constraints, and
performing preinvocation access control using the specified
permission class and group policy.
|
| Modifier and Type | Method and Description |
|---|---|
protected void |
checkAccess(Remote impl,
Method method,
InvocationConstraints constraints,
Collection context)
Checks that the client is calling from the local host.
|
protected Object |
invoke(Remote impl,
Method method,
Object[] args,
Collection context)
Checks the group policy as necessary, and then calls the superclass
invoke method with the same arguments, and returns
the result. |
checkClientPermission, checkPermissionClass, createMarshalInputStream, createMarshalOutputStream, dispatch, getClassLoader, marshalReturn, marshalThrow, unmarshalArguments, unmarshalMethodpublic SystemDispatcher(Collection methods, Remote impl, ServerCapabilities serverCaps, MethodConstraints serverConstraints, Class permClass, GroupPolicy policy, boolean localAccessCheck, ClassLoader loader) throws ExportException
createMarshalInputStream method.
For each combination of constraints that might need to be
enforced (obtained by calling the possibleConstraints
method on the specified server constraints, or using an empty
constraints instance of the specified server constraints
instance is null), calling the checkConstraints
method of the specified capabilities object with those
constraints must return true, or an
ExportException is thrown.
methods - a collection of Method instances for the
remote methodsimpl - the remote objectserverCaps - the transport capabilities of the serverserverConstraints - the server constraints, or
nullpermClass - the permission class, or nullpolicy - the group policy, or nulllocalAccessCheck - if true, calls are only
accepted from the local hostloader - the class loader, or nullIllegalArgumentException - if impl is not an
instance of ActivationSystem or if the permission class is
abstract, is not a subclass of Permission,
or does not have a public constructor that has either one
String parameter or one Method parameter and
has no declared exceptions, or if any element of
methods is not a Method instanceNullPointerException - if impl,
methods or serverCaps is
null, or if methods contains a
null elementExportException - if any of the possible server constraints
cannot be satisfied according to the specified server capabilitiesprotected void checkAccess(Remote impl, Method method, InvocationConstraints constraints, Collection context)
checkAccess in class BasicInvocationDispatcherimpl - the remote objectmethod - the remote methodconstraints - the enforced constraints for the specified
method, or nullcontext - the server contextAccessControlException - if the client is not
calling from the local hostprotected Object invoke(Remote impl, Method method, Object[] args, Collection context) throws Throwable
invoke method with the same arguments, and returns
the result. If the policy is not null and the
specified method is ActivationSystem.registerGroup or
ActivationSystem.setActivationGroupDesc, the policy
is checked by calling its checkGroup
method with the ActivationGroupDesc argument.invoke in class BasicInvocationDispatcherimpl - the remote objectmethod - the Method instance corresponding
to the interface method invoked on the remote objectargs - the method argumentscontext - the server context passed to the dispatch method for the remote call being processedimplSecurityException - if the caller is not permitted to use
the specified group descriptorNullPointerException - if any argument is nullThrowable - the exception thrown from the method invocation
on implCopyright 2007-2013, multiple authors.
Licensed under the Apache License, Version 2.0, see the NOTICE file for attributions.