atscppapi
1.0.9
C++ wrapper for Apache Traffic Server API
|
The interface used when creating a GlobalPlugin. More...
#include "GlobalPlugin.h"
Public Member Functions | |
void | registerHook (Plugin::HookType) |
![]() | |
virtual void | handleReadRequestHeadersPreRemap (Transaction &transaction) |
virtual void | handleReadRequestHeadersPostRemap (Transaction &transaction) |
virtual void | handleSendRequestHeaders (Transaction &transaction) |
virtual void | handleReadResponseHeaders (Transaction &transaction) |
virtual void | handleSendResponseHeaders (Transaction &transaction) |
virtual void | handleOsDns (Transaction &transaction) |
Protected Member Functions | |
GlobalPlugin (bool ignore_internal_transactions=false) | |
Additional Inherited Members | |
![]() | |
enum | HookType { HOOK_READ_REQUEST_HEADERS_PRE_REMAP = 0, HOOK_READ_REQUEST_HEADERS_POST_REMAP, HOOK_SEND_REQUEST_HEADERS, HOOK_READ_RESPONSE_HEADERS, HOOK_SEND_RESPONSE_HEADERS, HOOK_OS_DNS } |
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:
|
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 GlobalPlugin::registerHook | ( | Plugin::HookType | hook_type | ) |
registerHook is the mechanism used to attach a global hook.
HookType | the type of hook you wish to register |