Framework Professional Edition Package


com.prosyst.util.security
Class PrivilegedRunner

java.lang.Object
  extended by com.prosyst.util.security.PrivilegedRunner
All Implemented Interfaces:
ObjectCreator

public final class PrivilegedRunner
extends java.lang.Object
implements ObjectCreator

A simple wrapper for executing privileged actions.

Since:
3.1.0
Author:
Valentin Valchev

Nested Class Summary
static interface PrivilegedRunner.PrivilegedDispatcher
          This dispatcher is the handler that is called within the privileged call.
 
Method Summary
static java.lang.Object doPrivileged(java.lang.Object context, PrivilegedRunner.PrivilegedDispatcher dispatcher, int type, java.lang.Object arg1)
          Same as the longer doPrivileged method, but fills in the first parameter only.
static java.lang.Object doPrivileged(java.lang.Object context, PrivilegedRunner.PrivilegedDispatcher dispatcher, int type, java.lang.Object arg1, java.lang.Object arg2, java.lang.Object arg3, java.lang.Object arg4)
          Performs a privileged action.
 java.lang.Object getInstance()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

doPrivileged

public static final java.lang.Object doPrivileged(java.lang.Object context,
                                                  PrivilegedRunner.PrivilegedDispatcher dispatcher,
                                                  int type,
                                                  java.lang.Object arg1)
                                           throws java.lang.Exception
Same as the longer doPrivileged method, but fills in the first parameter only. All other parameters are set to null.

Parameters:
context - the access context
dispatcher - the dispatcher which should be called
type - the type of the action - used in the dispatcher
arg1 - a parameter received by the dispatcher
Returns:
the object returned from the execution
Throws:
java.lang.Exception - if the dispatcher fails
See Also:
doPrivileged(Object, PrivilegedDispatcher, int, Object)

doPrivileged

public static final java.lang.Object doPrivileged(java.lang.Object context,
                                                  PrivilegedRunner.PrivilegedDispatcher dispatcher,
                                                  int type,
                                                  java.lang.Object arg1,
                                                  java.lang.Object arg2,
                                                  java.lang.Object arg3,
                                                  java.lang.Object arg4)
                                           throws java.lang.Exception
Performs a privileged action. The method calls the dispatcher inside the privileged call passing it the same parameters that were passed to this method.

Parameters:
context - the access context
dispatcher - the dispatcher which should be called
type - the type of the action - used in the dispatcher
arg1 - a parameter received by the dispatcher
arg2 - a parameter received by the dispatcher
arg3 - a parameter received by the dispatcher
arg4 - a parameter received by the dispatcher
Returns:
the object returned from the execution
Throws:
java.lang.Exception - if the dispatcher fails

getInstance

public java.lang.Object getInstance()
                             throws java.lang.Exception
Specified by:
getInstance in interface ObjectCreator
Throws:
java.lang.Exception
See Also:
ObjectCreator.getInstance()

Framework Professional Edition Package


Copyright © 1999-2007 ProSyst Software GmbH. All Rights Reserved