Oracle® Fusion Middleware C++ API Reference for Oracle Coherence
12c (12.2.1.3.0)

E80355-01

RunAsBlock Class Reference

#include <coherence/security/RunAsBlock.hpp>

List of all members.


Detailed Description

The RunAsBlock class allows for easy creation of scoped authorization code blocks based on a Subject.

The RunAsBlock object will push the Subject onto a thread-local "current subject" upon entering the block, and pop the subject upon exiting the code block.

A more friendly form is to use the COH_RUN_AS macro. Example usage:

COH_RUN_AS(vSubject) { // code here will considered to be run by the supplied subject // ... // ... } // subject will be reverted

Author:
mf 2008.08.22

Public Member Functions

 RunAsBlock (TypedHandle< const Subject > vSubject)
 Construct a RunAsBlock object.
 RunAsBlock (const RunAsBlock &that)
 Copy constructor, for use by COH_RUN_AS macro.
 ~RunAsBlock ()
 Destroy a RunAsBlock object.

Constructor & Destructor Documentation

RunAsBlock ( TypedHandle< const Subject vSubject  ) 

Construct a RunAsBlock object.

This will automatically set the thread's Subject.

RunAsBlock ( const RunAsBlock that  ) 

Copy constructor, for use by COH_RUN_AS macro.

The new block takes over the ownership of the pop.

~RunAsBlock (  ) 

Destroy a RunAsBlock object.

This will automatically pop the Subject.


The documentation for this class was generated from the following file:
Copyright © 2000, 2017, Oracle and/or its affiliates. All rights reserved.