#include <osm_ag_linux.h>
Inheritance diagram for OSM_ACT_LinuxNull:


Public Types | |
| enum | { OSM_MAX_ACTION_NAME_LEN = 8 } |
Public Member Functions | |
| OSM_ACT_LinuxNull () | |
| Constructor. | |
| virtual int | execute (const ACE_TCHAR *cmd_line, const int cmd_len, const int timeout, ACE_TCHAR *val_text, int &val_len, int &value) |
| virtual int | check_cmd_line (const ACE_TCHAR *cmd_line, const int cmd_len) |
| int | is_name (const ACE_TCHAR *nm) |
| Returns 1 if the name of the action is equal to the name in the parameter. | |
| void | set_name (const ACE_TCHAR *nm) |
| void | instance (OSM_Instance_Base *ins) |
| const OSM_Instance_Base * | instance (void) const |
| void | ev_parameters (const ACE_TCHAR *param) |
| const ACE_TCHAR * | ev_parameters (void) const |
| const ACE_TCHAR * | name (void) const |
We derive this class from OSM_Action_Base so we can use it automatically within the Osmius monitoring or recollecting framework. We only have to implement the execute action using our base clase execute() method interface, and do the same with check_cmd_line() method.
Definition at line 72 of file osm_ag_linux.h.
| int OSM_ACT_LinuxNull::execute | ( | const ACE_TCHAR * | cmd_line, | |
| const int | cmd_len, | |||
| const int | timeout, | |||
| ACE_TCHAR * | val_text, | |||
| int & | val_len, | |||
| int & | value | |||
| ) | [virtual] |
Executes the action using the command line and returns the associated text and value.
| cmd_line | Input - Command line used to execute this action. | |
| cmd_len | Input - Command line length. | |
| timeout | Input - Wait timeout seconds before aborting execution. | |
| val_text | Output - Text of the resulting action. | |
| val_len | Output - Text length. | |
| value | Output - Final value of the action. |
| -1 | in case of error. 0 for success. |
Implements OSM_Action_Base.
Definition at line 561 of file osm_ag_linux.cpp.
| int OSM_ACT_LinuxNull::check_cmd_line | ( | const ACE_TCHAR * | cmd_line, | |
| const int | cmd_len | |||
| ) | [virtual] |
Checks the command line. You should overwrite this method to handle issues like semantic and sintactic checking or security stuff. E.g. You could return error if your SQL string contains the words UPDATE, DELETE or INSERT.
| cmd_line | Input - Command line used to execute this action. | |
| cmd_len | Input - Command line length. |
| -1 | in case of error. 0 for success. |
Reimplemented from OSM_Action_Base.
Definition at line 601 of file osm_ag_linux.cpp.
| void OSM_Action_Base::set_name | ( | const ACE_TCHAR * | nm | ) | [inline, inherited] |
Sets the name of the action.
| nm | Input - Name. |
Definition at line 116 of file osm_ag_insmanager.h.
Referenced by OSM_Event::open().
| void OSM_Action_Base::instance | ( | OSM_Instance_Base * | ins | ) | [inline, inherited] |
Sets the instance.
| ins | Input - Instance pointer. |
Definition at line 126 of file osm_ag_insmanager.h.
| const OSM_Instance_Base* OSM_Action_Base::instance | ( | void | ) | const [inline, inherited] |
Return a pointer to the instance.
Definition at line 134 of file osm_ag_insmanager.h.
| void OSM_Action_Base::ev_parameters | ( | const ACE_TCHAR * | param | ) | [inline, inherited] |
Sets the parameters used in our Event config file.
| param | Input - Parameters (command line like). |
Definition at line 143 of file osm_ag_insmanager.h.
Referenced by OSM_Event::open().
| const ACE_TCHAR* OSM_Action_Base::ev_parameters | ( | void | ) | const [inline, inherited] |
Return pointer to parameters.
Definition at line 152 of file osm_ag_insmanager.h.
| const ACE_TCHAR* OSM_Action_Base::name | ( | void | ) | const [inline, inherited] |
Return pointer to my name.
Definition at line 160 of file osm_ag_insmanager.h.
1.5.1