AMPS C/C++ Client Class Reference
AMPS C/C++ Client Version 5.3.4.3
ampsplusplus.hpp File Reference

Core type, function, and class declarations for the AMPS C++ client. More...

#include "amps/amps.h"
#include "amps/ampsver.h"
#include <string>
#include <map>
#include <sstream>
#include <iostream>
#include <memory>
#include <stdexcept>
#include <limits.h>
#include <list>
#include <set>
#include <deque>
#include <vector>
#include <assert.h>
#include <inttypes.h>
#include "amps/BookmarkStore.hpp"
#include "amps/MessageRouter.hpp"
#include "amps/util.hpp"
#include "amps/ampscrc.hpp"

Go to the source code of this file.

Classes

class  AMPS::Reason
 Class to hold string versions of failure reasons. More...
 
class  AMPS::ExceptionListener
 Exception listener for unhandled exceptions. More...
 
class  AMPS::Command
 Command is an encapsulation of a single AMPS command sent by the client. More...
 
class  AMPS::Authenticator
 The interface for handling authentication with the AMPS server. More...
 
class  AMPS::DefaultAuthenticator
 A default implementation of Authenticator that only uses an unchanged password and does not implement retry. More...
 
class  AMPS::StoreReplayer
 Abstract base class for replaying a publish message. More...
 
class  AMPS::StoreImpl
 Abstract base class for storing published messages for an HA publisher client. More...
 
class  AMPS::Store
 Handle class for StoreImpl classes that track publish messages. More...
 
class  AMPS::FailedWriteHandler
 Class to handle when a client receives a duplicate publish message, or not entitled message. More...
 
class  AMPS::FailedResubscribeHandler
 Abstract base class where you can implement handling of exceptions that occur when a SubscriptionManager implementation is attempting to restart subscriptions following a connection failure. More...
 
class  AMPS::SubscriptionManager
 Abstract base class to manage all subscriptions placed on a client so that they can be re-established if the client is disconnected and then reconnected. More...
 
class  AMPS::ConnectionStateListener
 Abstract base class for connection state listeners. More...
 
class  AMPS::MessageStream
 An iterable object representing the results of an AMPS subscription and/or query. More...
 
class  AMPS::MessageStream::iterator
 Represents an iterator over messages in an AMPS topic. More...
 
class  AMPS::Client
 Client represents a connection to an AMPS server, but does not provide failover or reconnection behavior by default. More...
 
class  AMPS::_FIXBuilder< T >
 Provides a convenient way of building messages in FIX format, typically referenced using the typedefs AMPS::FIXBuilder or AMPS::NVFIXBuilder. More...
 
class  AMPS::FIXShredder
 Class for parsing a FIX format message into a std::map of keys and values, where the keys and values are represented by AMPS::Field objects. More...
 

Typedefs

typedef void(* AMPS::DisconnectHandlerFunc) (Client &, void *userData)
 A function pointer type for disconnect-handler functions.
 
typedef bool(* AMPS::PublishStoreResizeHandler) (Store store_, size_t size_, void *userData_)
 Function type for PublishStore resize events The store_ param is store which is resizing. More...
 
typedef _FIXBuilder< int > AMPS::FIXBuilder
 Provides convenience methods for creating messages in the format defined by FIX, accepting int values as keys (this typedef is a specialization of _FIXBuilder. More...
 
typedef _FIXBuilder< std::string > AMPS::NVFIXBuilder
 Provides convenience methods for creating messages in the format defined by FIX, accepting std::string values as keys (this typedef is a specialization of _FIXBuilder). More...
 

Functions

bool AMPS::DangerousFlushPublishStoreResizeHandler (Store store_, size_t, void *data_)
 PublishStoreResizeHandler that will block up to the timeout specified in user data milliseconds trying to flush the store. More...
 

Detailed Description

Core type, function, and class declarations for the AMPS C++ client.

Typedef Documentation

typedef _FIXBuilder<int> AMPS::FIXBuilder

Provides convenience methods for creating messages in the format defined by FIX, accepting int values as keys (this typedef is a specialization of _FIXBuilder.

typedef _FIXBuilder<std::string> AMPS::NVFIXBuilder

Provides convenience methods for creating messages in the format defined by FIX, accepting std::string values as keys (this typedef is a specialization of _FIXBuilder).

typedef bool(* AMPS::PublishStoreResizeHandler) (Store store_, size_t size_, void *userData_)

Function type for PublishStore resize events The store_ param is store which is resizing.

The size_ is the number of bytes being requested for the new size. The userData_ is the userData_ that was set when the handler was set on the store. The return value should be true if resize should proceed and false if the the size should be unchanged. A false value should only be returned if some other action was taken to free up space within the Store.

Function Documentation

bool AMPS::DangerousFlushPublishStoreResizeHandler ( Store  store_,
size_t  ,
void *  data_ 
)
inline

PublishStoreResizeHandler that will block up to the timeout specified in user data milliseconds trying to flush the store.

WARNING: This is not a good practice! At a minimum, these resize events should be getting logged. You have no guarantee that the store size will shrink during the call to flush, so the store could continue to grow infinitely.