AMPS C/C++ Client Class Reference
AMPS C/C++ Client Version 5.3.0.5
|
Core type, function, and class declarations for the AMPS C++ client. More...
#include "amps.h"
#include "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 "MessageRouter.hpp"
#include "util.hpp"
#include "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::BookmarkStoreImpl |
Abstract base class for storing received bookmarks for HA clients. More... | |
class | AMPS::BookmarkStore |
Interface for BookmarkStoreImpl classes. 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::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 contents of an AMPS topic. More... | |
class | AMPS::MessageStream::iterator |
Represents an iterator over messages in an AMPS topic. More... | |
class | AMPS::Client |
The main class for interacting with AMPS. 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... | |
Macros | |
#define | AMPS_BOOKMARK_RECENT "recent" |
Start the subscription at the first undiscarded message in the bookmark store, or at the end of the bookmark store if all messages have been discarded. More... | |
#define | AMPS_BOOKMARK_EPOCH "0" |
Start the subscription at the beginning of the journal. | |
#define | AMPS_BOOKMARK_NOW "0|1|" |
Start the subscription at the point in time when AMPS processes the subscription. | |
Typedefs | |
typedef void(* | AMPS::DisconnectHandlerFunc) (Client &, void *userData) |
A function pointer type for disconnect-handler functions. | |
typedef bool(* | AMPS::BookmarkStoreResizeHandler) (BookmarkStore store_, const Message::Field &subId_, size_t size_, void *userData_) |
Function type for BookmarkStore resize events The store_ param is store which is resizing. More... | |
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::ThrowawayBookmarkResizeHandler (BookmarkStore store_, const Message::Field &subId_, size_t newSize_, void *data_) |
A BookmarkStoreResizeHandler that discards the oldest bookmark assuming that it was used but not discarded when a resize request exceeds size in userData_. More... | |
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... | |
Core type, function, and class declarations for the AMPS C++ client.
typedef bool(* AMPS::BookmarkStoreResizeHandler) (BookmarkStore store_, const Message::Field &subId_, size_t size_, void *userData_) |
Function type for BookmarkStore resize events The store_ param is store which is resizing.
The subId_ param is the subscription id for which a resize is required. 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.
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.
|
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.
|
inline |
A BookmarkStoreResizeHandler that discards the oldest bookmark assuming that it was used but not discarded when a resize request exceeds size in userData_.
WARNING: Using this handler could cause unseen message loss. This should be used primarily as a sample and you should write your own version to at least add some logging.