|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.jini.jeri.BasicInvocationDispatcher
com.sun.jini.phoenix.SystemAccessILFactory.SystemDispatcher
public static class SystemAccessILFactory.SystemDispatcher
A subclass of BasicInvocationDispatcher
for
ActivationSystem
instances that optionally enforces a
GroupPolicy
on calls to registerGroup
and
setActivationGroupDesc
.
Constructor Summary | |
---|---|
SystemAccessILFactory.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. |
Method Summary | |
---|---|
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. |
Methods inherited from class net.jini.jeri.BasicInvocationDispatcher |
---|
checkClientPermission, checkPermissionClass, createMarshalInputStream, createMarshalOutputStream, dispatch, getClassLoader, marshalReturn, marshalThrow, unmarshalArguments, unmarshalMethod |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public SystemAccessILFactory.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
null
permClass
- the permission class, or null
policy
- the group policy, or null
localAccessCheck
- if true
, calls are only
accepted from the local hostloader
- the class loader, or null
IllegalArgumentException
- 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
instance
NullPointerException
- if impl
,
methods
or serverCaps
is
null
, or if methods
contains a
null
element
ExportException
- if any of the possible server constraints
cannot be satisfied according to the specified server capabilitiesMethod Detail |
---|
protected void checkAccess(Remote impl, Method method, InvocationConstraints constraints, Collection context)
checkAccess
in class BasicInvocationDispatcher
impl
- the remote objectmethod
- the remote methodconstraints
- the enforced constraints for the specified
method, or null
context
- the server context
AccessControlException
- 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 BasicInvocationDispatcher
impl
- 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 processed
impl
SecurityException
- if the caller is not permitted to use
the specified group descriptor
NullPointerException
- if any argument is null
Throwable
- the exception thrown from the method invocation
on impl
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |