Loading...
Searching...
No Matches
RestClient::RestPingPollOperation Class Reference

REST ping polling I/O class with OAuth2 authentication. More...

## Public Member Functions

| constructor (RestConnection conn, RestClient rc, hash< auto > real_opts)
| Creates the poller with the REST client and option hash.
*hash< SocketPollInfo > | continuePoll ()
| Returns a hash to be used for I/O polling or nothing in case the poll operation is complete.
| destructor ()
| Destroys the object and makes any connection option updates.
string | getGoal ()
| Returns the goal.
string | getState ()
| Returns the current state.
bool | goalReached ()
| Returns True when the goal as been reached.

## Public Attributes

const | SPS_COMPLETE = "complete"
| Complete state.
const | SPS_CUSTOM_GET_TOKEN = "custom-refresh"
| Custom refresh token state.
const | SPS_GET_SWAGGER = 'get-swagger'
| Retrieve Swagger schema.
const | SPS_OAUTH2_GET_TOKEN = "oauth2-get-token"
| OAuth2 get token state.
const | SPS_OAUTH2_REFRESH_TOKEN = "oauth2-refresh-token"
| OAuth2 refresh token state.
const | SPS_REST_PING = "rest-ping"
| Execute ping request.

## Protected Member Functions

Mutex | m ()
| Lock for atomicity.

## Protected Attributes

*auto | body
| The message body to send.
RestConnection | conn
| The REST connection.
bool | goal_reached = False
| Goal reached flag.
*hash< auto > | headers
| Headers to send.
bool | in_refresh
| token refresh flag
string | method
| The HTTP method to use.
string | path
| The URI path to use.
AbstractPollOperation | poller
| The polling object.
RestClient | rc
| The RestClient object to use for polling I/O.
hash< auto > | real_opts
| RestClient options.
string | state
| Current state.
bool | use_path_as_is
| Use path directly / ping path already prepared.

## Detailed Description

REST ping polling I/O class with OAuth2 authentication.

Ensures a 200 response to the polling send/receive operation

## Member Function Documentation

## getGoal()

string RestClient::RestPingPollOperation::getGoal | ( |  | ) |

Returns the goal.

Returns
  the goal set in the constructor

## getState()

string RestClient::RestPingPollOperation::getState | ( |  | ) |

Returns the current state.

Returns
  the current state

## goalReached()

bool RestClient::RestPingPollOperation::goalReached | ( |  | ) |

Returns True when the goal as been reached.

Returns
  True when the goal as been reached