|
| | adhoc_agent_wrapper_t (agent_context_t ctx) |
| |
| void | set_on_evt_start (std::function< void() > handler) |
| | Set function for reaction on work start. More...
|
| |
| void | set_on_evt_finish (std::function< void() > handler) |
| | Set function for reaction on work finish. More...
|
| |
| void | set_exception_reaction (exception_reaction_t reaction) SO_5_NOEXCEPT |
| | Set reaction for non-handled exceptions. More...
|
| |
| virtual void | so_evt_start () override |
| | Hook on agent start inside SObjectizer. More...
|
| |
| virtual void | so_evt_finish () override |
| | Hook of agent finish in SObjectizer. More...
|
| |
| virtual exception_reaction_t | so_exception_reaction () const override |
| | A reaction from SObjectizer to an exception from agent's event. More...
|
| |
| | agent_t (environment_t &env) |
| | Constructor. More...
|
| |
| | agent_t (environment_t &env, agent_tuning_options_t tuning_options) |
| | Constructor which allows specification of agent's tuning options. More...
|
| |
| | agent_t (context_t ctx) |
| | Constructor which simplifies agent construction with or without agent's tuning options. More...
|
| |
| virtual | ~agent_t () |
| |
| const agent_t * | self_ptr () const |
| | Get the raw pointer of itself. More...
|
| |
| agent_t * | self_ptr () |
| |
| const state_t & | so_current_state () const |
| | Access to the current agent state. More...
|
| |
| bool | so_is_active_state (const state_t &state_to_check) const |
| | Is a state activated? More...
|
| |
| const std::string & | so_coop_name () const |
| | Name of the agent's cooperation. More...
|
| |
| void | so_add_nondestroyable_listener (agent_state_listener_t &state_listener) |
| | Add a state listener to the agent. More...
|
| |
| void | so_add_destroyable_listener (agent_state_listener_unique_ptr_t state_listener) |
| | Add a state listener to the agent. More...
|
| |
| void | so_switch_to_awaiting_deregistration_state () |
| | Switching agent to special state in case of unhandled exception. More...
|
| |
| const mbox_t & | so_direct_mbox () const |
| | Get the agent's direct mbox. More...
|
| |
| environment_t & | so_environment () const |
| | Access to the SObjectizer Environment which this agent is belong. More...
|
| |
| void | so_bind_to_dispatcher (event_queue_t &queue) |
| | Binding agent to the dispatcher. More...
|
| |
| void | so_deregister_agent_coop (int dereg_reason) |
| | A helper method for deregistering agent's coop. More...
|
| |
| void | so_deregister_agent_coop_normally () |
| | A helper method for deregistering agent's coop in case of normal deregistration. More...
|
| |
| subscription_bind_t | so_subscribe (const mbox_t &mbox_ref) |
| | Initiate subscription. More...
|
| |
| subscription_bind_t | so_subscribe_self () |
| | Initiate subscription to agent's direct mbox. More...
|
| |
| void | so_create_event_subscription (const mbox_t &mbox_ref, std::type_index type_index, const state_t &target_state, const event_handler_method_t &method, thread_safety_t thread_safety) |
| | Create a subscription for an event. More...
|
| |
| void | so_destroy_event_subscription (const mbox_t &mbox, const std::type_index &subscription_type, const state_t &target_state) |
| | Destroy event subscription. More...
|
| |
| template<typename Method_Pointer > |
| std::enable_if< details::is_agent_method_pointer< Method_Pointer >::value, void >::type | so_drop_subscription (const mbox_t &mbox, const state_t &target_state, Method_Pointer) |
| | Drop subscription for the state specified. More...
|
| |
| template<class Message > |
| void | so_drop_subscription (const mbox_t &mbox, const state_t &target_state, signal_indicator_t< Message >()) |
| | Drop subscription for the state specified. More...
|
| |
| template<class Message > |
| void | so_drop_subscription (const mbox_t &mbox, const state_t &target_state) |
| | Drop subscription for the state specified. More...
|
| |
| template<typename Method_Pointer > |
| std::enable_if< details::is_agent_method_pointer< Method_Pointer >::value, void >::type | so_drop_subscription (const mbox_t &mbox, Method_Pointer) |
| | Drop subscription for the default agent state. More...
|
| |
| template<class Message > |
| void | so_drop_subscription (const mbox_t &mbox, signal_indicator_t< Message >()) |
| | Drop subscription for the default agent state. More...
|
| |
| template<class Message > |
| void | so_drop_subscription (const mbox_t &mbox) |
| | Drop subscription for the default agent state. More...
|
| |
| template<typename Method_Pointer > |
| std::enable_if< details::is_agent_method_pointer< Method_Pointer >::value, void >::type | so_drop_subscription_for_all_states (const mbox_t &mbox, Method_Pointer) |
| | Drop subscription for all states. More...
|
| |
| template<class Message > |
| void | so_drop_subscription_for_all_states (const mbox_t &mbox, signal_indicator_t< Message >()) |
| | Drop subscription for all states. More...
|
| |
| template<class Message > |
| void | so_drop_subscription_for_all_states (const mbox_t &mbox) |
| | Drop subscription for all states. More...
|
| |
| template<class Message > |
| bool | so_has_subscription (const mbox_t &mbox, const state_t &target_state) const SO_5_NOEXCEPT |
| | Check the presence of a subscription. More...
|
| |
| template<class Message > |
| bool | so_has_subscription (const mbox_t &mbox) const SO_5_NOEXCEPT |
| | Check the presence of a subscription in the default_state. More...
|
| |
| template<typename Method_Pointer > |
| std::enable_if< details::is_agent_method_pointer< Method_Pointer >::value, bool >::type | so_has_subscription (const mbox_t &mbox, const state_t &target_state, Method_Pointer) const SO_5_NOEXCEPT |
| | Check the presence of a subscription. More...
|
| |
| template<typename Method_Pointer > |
| std::enable_if< details::is_agent_method_pointer< Method_Pointer >::value, bool >::type | so_has_subscription (const mbox_t &mbox, Method_Pointer) const SO_5_NOEXCEPT |
| | Check the presence of a subscription. More...
|
| |
| void | so_create_deadletter_subscription (const mbox_t &mbox, const std::type_index &msg_type, const event_handler_method_t &method, thread_safety_t thread_safety) |
| | Create a subscription for a deadletter handler. More...
|
| |
| void | so_destroy_deadletter_subscription (const mbox_t &mbox, const std::type_index &msg_type) |
| | Destroy a subscription for a deadletter handler. More...
|
| |
| template<typename Event_Handler > |
| void | so_subscribe_deadletter_handler (const so_5::mbox_t &mbox, Event_Handler &&handler, thread_safety_t thread_safety=thread_safety_t::unsafe) |
| | Create a subscription for deadletter handler for a specific message from a specific mbox. More...
|
| |
| template<typename Message > |
| void | so_drop_deadletter_handler (const so_5::mbox_t &mbox) |
| | Drops the subscription for deadletter handler. More...
|
| |
| template<typename Message > |
| bool | so_has_deadletter_handler (const so_5::mbox_t &mbox) const SO_5_NOEXCEPT |
| | Checks the presence of deadletter handler for a message of a specific type from a specific mbox. More...
|
| |
| template<typename Message > |
| void | so_set_delivery_filter (const mbox_t &mbox, delivery_filter_unique_ptr_t filter) |
| | Set a delivery filter. More...
|
| |
| template<typename Lambda > |
| void | so_set_delivery_filter (const mbox_t &mbox, Lambda &&lambda) |
| | Set a delivery filter. More...
|
| |
| template<typename Message > |
| void | so_drop_delivery_filter (const mbox_t &mbox) SO_5_NOEXCEPT |
| | Drop a delivery filter. More...
|
| |
| priority_t | so_priority () const |
| | Get the priority of the agent. More...
|
| |
| void | so_change_state (const state_t &new_state) |
| | Method changes state. More...
|
| |
| void | ensure_binding_finished () |
| | Ensures that all agents from cooperation are bound to dispatchers. More...
|
| |
|
| using | context_t = so_5::agent_context_t |
| | Short alias for agent_context. More...
|
| |
| using | state_t = so_5::state_t |
| | Short alias for so_5::state_t. More...
|
| |
| template<typename T > |
| using | mhood_t = so_5::mhood_t< T > |
| | Short alias for so_5::mhood_t. More...
|
| |
| template<typename T > |
| using | mutable_mhood_t = so_5::mutable_mhood_t< T > |
| | Short alias for so_5::mutable_mhood_t. More...
|
| |
| using | initial_substate_of = so_5::initial_substate_of |
| | Short alias for so_5::initial_substate_of. More...
|
| |
| using | substate_of = so_5::substate_of |
| | Short alias for so_5::substate_of. More...
|
| |
| static void | call_push_event (agent_t &agent, const message_limit::control_block_t *limit, mbox_id_t mbox_id, std::type_index msg_type, const message_ref_t &message) |
| | Push an event to the agent's event queue. More...
|
| |
| static void | call_push_service_request (agent_t &agent, const message_limit::control_block_t *limit, mbox_id_t mbox_id, std::type_index msg_type, const message_ref_t &message) |
| | Push service request to the agent's event queue. More...
|
| |
| static agent_tuning_options_t | tuning_options () |
| | Create tuning options object with default values. More...
|
| |
| static execution_hint_t | so_create_execution_hint (execution_demand_t &demand) |
| | Create execution hint for the specified demand. More...
|
| |
| static void | demand_handler_on_start (current_thread_id_t working_thread_id, execution_demand_t &d) |
| | Calls so_evt_start method for agent. More...
|
| |
| static demand_handler_pfn_t | get_demand_handler_on_start_ptr () SO_5_NOEXCEPT |
| |
| static void | demand_handler_on_finish (current_thread_id_t working_thread_id, execution_demand_t &d) |
| | Calls so_evt_finish method for agent. More...
|
| |
| static demand_handler_pfn_t | get_demand_handler_on_finish_ptr () SO_5_NOEXCEPT |
| |
| static void | demand_handler_on_message (current_thread_id_t working_thread_id, execution_demand_t &d) |
| | Calls event handler for message. More...
|
| |
| static demand_handler_pfn_t | get_demand_handler_on_message_ptr () SO_5_NOEXCEPT |
| |
| static void | demand_handler_on_service_request (current_thread_id_t working_thread_id, execution_demand_t &d) |
| | Calls request handler for message. More...
|
| |
| static demand_handler_pfn_t | get_service_request_handler_on_message_ptr () SO_5_NOEXCEPT |
| |
| static void | demand_handler_on_enveloped_msg (current_thread_id_t working_thread_id, execution_demand_t &d) |
| | Handles the enveloped message. More...
|
| |
| static demand_handler_pfn_t | get_demand_handler_on_enveloped_msg_ptr () SO_5_NOEXCEPT |
| |
| template<typename Msg > |
| static drop_indicator_t< Msg > | limit_then_drop (unsigned int limit) |
| | A helper function for creating drop_indicator. More...
|
| |
| template<typename Msg > |
| static abort_app_indicator_t< Msg > | limit_then_abort (unsigned int limit) |
| | A helper function for creating abort_app_indicator. More...
|
| |
| template<typename M , typename L > |
| static log_then_abort_app_indicator_t< M, L > | limit_then_abort (unsigned int limit, L lambda) |
| | A helper function for creating log_then_abort_app_indicator. More...
|
| |
| template<typename Msg , typename Lambda > |
| static redirect_indicator_t< Msg, Lambda > | limit_then_redirect (unsigned int limit, Lambda dest_getter) |
| | A helper function for creating redirect_indicator. More...
|
| |
| template<typename Lambda , typename Arg = typename so_5::details::lambda_traits:: argument_type_if_lambda< Lambda >::type> |
| static transform_indicator_t< Arg > | limit_then_transform (unsigned int limit, Lambda transformator) |
| | A helper function for creating transform_indicator. More...
|
| |
| template<typename Source , typename Lambda > |
| static transform_indicator_t< Source > | limit_then_transform (unsigned int limit, Lambda transformator) |
| | A helper function for creating transform_indicator. More...
|
| |
| template<typename Msg , typename... Args> |
| static transformed_message_t< Msg > | make_transformed (mbox_t mbox, Args &&... args) |
| | Helper method for creating message transformation result. More...
|
| |
| static const state_t::history_t | shallow_history |
| | Short alias for so_5::state_t::history_t::shallow. More...
|
| |
| static const state_t::history_t | deep_history |
| | Short alias for so_5::state_t::history_t::deep. More...
|
| |
| void | so_initiate_agent_definition () |
| | A correct initiation of so_define_agent method call. More...
|
| |
| virtual void | so_define_agent () |
| | Hook on define agent for SObjectizer. More...
|
| |
| bool | so_was_defined () const |
| | Is method define_agent already called? More...
|
| |
| state_t | so_make_state () |
| | Helper method for creation of anonymous state object. More...
|
| |
| state_t | so_make_state (std::string name) |
| | Helper method for creation of named state object. More...
|
| |
| const state_t & | so_default_state () const |
| | Access to the agent's default state. More...
|
| |
Special agent class which would be used as wrapper for ad-hoc agents.
- Since
- v.5.3.0
- Note
- The presence and usefulness of this class is based on the fact that it is not necessary to subscribe agent exactly in so_define_agent() method. The current implementation of agents and SObjectizer Run-Time allows to subscribe and unsubscribe agent in any place and at any time.