Public Member Functions

GridClientHttpConnection Class Reference

#include <gridclienthttpconnection.hpp>

Inheritance diagram for GridClientHttpConnection:
GridClientConnection

List of all members.

Public Member Functions

 GridClientHttpConnection ()
 GridClientHttpConnection (boost::shared_ptr< boost::asio::ssl::context > &ctx)
virtual ~GridClientHttpConnection ()
virtual void connect (const std::string &host, int port)
virtual void authenticate (std::string clientId, std::string creds)
virtual void sessionToken (std::string sessTok)
virtual std::string sessionToken ()
virtual void send (TRequestParams request, boost::property_tree::ptree &jsonObj)
virtual void sendPing ()

Detailed Description

Client HTTP connection class.


Constructor & Destructor Documentation

GridClientHttpConnection::GridClientHttpConnection (  )  [inline]

Non-SSL HTTP connection constructor.

GridClientHttpConnection::GridClientHttpConnection ( boost::shared_ptr< boost::asio::ssl::context > &  ctx  )  [inline]

SSL HTTP connection constructor.

Parameters:
ctx Shared pointer to a Boost SSL context.
virtual GridClientHttpConnection::~GridClientHttpConnection (  )  [inline, virtual]

Destructor


Member Function Documentation

virtual void GridClientHttpConnection::authenticate ( std::string  clientId,
std::string  creds 
) [virtual]

Authenticate client and store session token for later use.

Parameters:
clientId Client ID to authenticate.
creds Credentials to use.
virtual void GridClientHttpConnection::connect ( const std::string &  host,
int  port 
) [virtual]

Connect to a host/port.

Parameters:
pHost Host name.
pPort Port to connect to.
void GridClientHttpConnection::send ( TRequestParams  requestParams,
boost::property_tree::ptree &  jsonObj 
) [virtual]

Send a request to the host and receive reply.

Parameters:
requestParams Key-value pairs.
jsonObj Boost property tree to be filled with response.
virtual void GridClientHttpConnection::sendPing (  )  [inline, virtual]

Ping does not make sense for HTTP connection, so this method does nothing.

Implements GridClientConnection.

virtual std::string GridClientHttpConnection::sessionToken (  )  [inline, virtual]

Retrieves session token associated with the connection.

Returns:
Session token.
virtual void GridClientHttpConnection::sessionToken ( std::string  sessTok  )  [inline, virtual]

Method that allows explicitly set session token for HTTP connection.

Parameters:
sessTok New session token for the connection.

The documentation for this class was generated from the following files:
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends