The interface used when creating a GlobalPlugin. More...
#include <GlobalPlugin.h>
Inherits atscppapi::Plugin.

| Public Member Functions | |
| void | registerHook (Plugin::HookType) | 
| registerHook is the mechanism used to attach a global hook. | |
| virtual | ~GlobalPlugin () | 
| Protected Member Functions | |
| GlobalPlugin (bool ignore_internal_transactions=false) | |
| Constructor. | |
The interface used when creating a GlobalPlugin.
A GlobalPlugin is a Plugin that will fire for a given hook on all Transactions. In otherwords, a GlobalPlugin is not tied to a specific plugin, a Transaction specific plugin would be a TransactionPlugin.
Depending on the type of hook you choose to build you will implement one or more callback methods. Here is a simple example of a GlobalPlugin:
class GlobalHookPlugin : public GlobalPlugin { public: GlobalHookPlugin() { registerHook(HOOK_READ_REQUEST_HEADERS_PRE_REMAP); } virtual void handleReadRequestHeadersPreRemap(Transaction &transaction) { std::cout << "Hello from handleReadRequesHeadersPreRemap!" << std::endl; transaction.resume(); } };
Definition at line 59 of file GlobalPlugin.h.
| virtual atscppapi::GlobalPlugin::~GlobalPlugin | ( | ) |  [virtual] | 
| atscppapi::GlobalPlugin::GlobalPlugin | ( | bool | ignore_internal_transactions = false | ) |  [protected] | 
Constructor.
| ignore_internal_transactions | When true, all hooks registered by this plugin are ignored for internal transactions (internal transactions are created when other plugins create requests). Defaults to false. | 
| void atscppapi::GlobalPlugin::registerHook | ( | Plugin::HookType | ) | 
registerHook is the mechanism used to attach a global hook.
| HookType | the type of hook you wish to register | 
 1.7.1
 1.7.1