MACE  1.0.0
 All Classes Namespaces Files Functions Variables Enumerations Defines
Classes | Public Types | Public Member Functions | Public Attributes | Protected Member Functions | Friends
mace::rpc::json::connection Class Reference

#include <connection.hpp>

Inheritance diagram for mace::rpc::json::connection:
mace::rpc::json::http_connection

List of all members.

Classes

struct  function_filter

Public Types

typedef boost::shared_ptr
< connection
ptr
typedef boost::weak_ptr
< connection
wptr

Public Member Functions

 connection (mace::cmt::thread *t=&mace::cmt::thread::current())
mace::cmt::threadget_thread () const
void add_method (const std::string &mid, const rpc_method &m)
std::string add_method (const rpc_method &m)
template<typename ParamSeq >
mace::cmt::future< json::valuecall_fused (const std::string &method_name, const ParamSeq &param)
template<typename ParamSeq >
void create_call (const std::string &method_name, const ParamSeq &param, json::value &msg)
template<typename R , typename ParamSeq >
mace::cmt::future< R > call_fused (const std::string &method_name, const ParamSeq &param)
template<typename ParamSeq >
void notice_fused (const std::string &method_name, const ParamSeq &param)
void handle_call (const json::value &c, json::value &result)
void handle_notice (const json::value &m)

Public Attributes

boost::signal< void()> closed

Protected Member Functions

template<typename Seq >
void pack_params (json::value &v, const Seq &s, const boost::true_type &is_named)
template<typename Seq >
void pack_params (json::value &v, const Seq &s, const boost::false_type &is_named)
void break_promises ()
void handle_call (const json::value &m)
void handle_result (const json::value &m)
void handle_error (const json::value &m)
virtual void send (const json::value &msg)
virtual void send (const json::value &msg, const connection::pending_result::ptr &pr)
virtual uint64_t next_method_id ()

Friends

class connection_private

Detailed Description

Manages RPC call state including:

Does not implement communication details which are provided by derived classes which reimplement send() and call the protected handler methods.

Definition at line 53 of file connection.hpp.


Constructor & Destructor Documentation

Parameters:
t- the thread in which messages will be sent and callbacks invoked

Member Function Documentation

std::string mace::rpc::json::connection::add_method ( const rpc_method &  m)

The connection will generate and return a method name


The documentation for this class was generated from the following file: