Packages
 In this topic

*Constructors

*Methods

 

Packages   PreviousThis PackageNext
Package com.ms.security.permissions   Previous This
Package
Next

 


Class ExecutionRequest

public class ExecutionRequest implements ISecurityRequest
{
  // Constructors
  public ExecutionRequest(String torun);

  // Methods
  public PermissionID getPermissionID();
  public String toString ();
}

This class represents a request to execute an application. It is intended to be used as the security request object for a parameterized security check involving the execution permission. The ExecutionPermission.check method expects an ExecutionRequest object as its parameter.

The following example uses an ExecutionRequest object to perform a security check.


  ...

  // Create an ExecutionRequest object that indicates that you want
  // to execute the application "notepad.exe".

  ExecutionRequest sreq = new ExecutionRequest("notepad.exe");

  // Check to see that all of your callers have the rights to
  // execute the notepad program.

  PolicyEngine.checkPermission(sreq);

  ...
	 

For more information about checking execution permissions, see the PolicyEngine class and the ExecutionPermission class.

Constructors

ExecutionRequest

public ExecutionRequest(String torun);

Creates an ExecutionRequest object based on the specified application to run.

ParameterDescription
torun The application to be executed.

Methods

getPermissionID

public PermissionID getPermissionID();

Retrieves the permission identifier for the ExecutionRequest object. This method satisfies the ISecurityRequest interface and returns PermissionID.EXEC to indicate that instances of the ExecutionRequest class are associated with the execution permission.

Return Value:

Returns PermissionID.EXEC.

toString

public String toString ();

Converts the ExecutionRequest object to its string representation.

Return Value:

Returns the string representation of the ExecutionRequest object.

upnrm.gif © 1998 Microsoft Corporation. All rights reserved. Terms of use.