15 #ifndef ENGINE_CLIENT_CPP_HPP
16 #define ENGINE_CLIENT_CPP_HPP
19 #include <AP_Platform.h>
69 virtual const
char* what() const throw() {
return m_message; }
78 virtual const char*
const*
getWarnings()
const {
return m_warnings; }
84 const char*
const* m_warnings;
132 AP_ENGINE_CLIENT_API
void setLogFile(
const AP_char8* filename,
bool truncate,
bool utf8 =
false);
139 AP_ENGINE_CLIENT_API
void setLogFD(
int fd);
145 AP_ENGINE_CLIENT_API
void setLogMutex(
void *mutex);
155 AP_ENGINE_CLIENT_API AP_char8*
convertToUTF8(
const AP_char8* s);
163 AP_ENGINE_CLIENT_API
void char8free(
char *
string);
180 friend AP_ENGINE_CLIENT_API
Event*
createEvent(
const char* eventString,
const char* channelString);
190 virtual const char* getText()
const = 0;
200 virtual const char* getChannel()
const = 0;
212 virtual double getTime()
const = 0;
215 inline friend std::ostream& operator << (std::ostream& stream,
const Event& obj) {
220 inline friend std::ostream& operator << (std::ostream& stream,
const Event* obj) {
264 virtual void disconnect() = 0;
305 virtual void sendEvents(
const Event*
const* events) = 0;
333 virtual void disconnect(
const char* reason) = 0;
359 AP_ENGINE_CLIENT_API
Event*
createEvent(
const char* eventString,
const char* channelString);
405 virtual const char* getText()
const = 0;
408 inline friend std::ostream& operator << (std::ostream& stream,
const MonitorScript& obj) {
413 inline friend std::ostream& operator << (std::ostream& stream,
const MonitorScript* obj) {
449 #pragma warning (disable : 4251)
451 class AP_ENGINE_CLIENT_API
StatusIterator :
public std::iterator<std::forward_iterator_tag, int>
455 typedef pair<std::string, std::string>
pair_t;
468 if (m_status && m_opaqueState) m_status->disposeIterator(m_opaqueState);
482 return (m_status == ref.m_status) &&
483 (((0 == m_opaqueState) && (0 == ref.m_opaqueState)) ||
484 (iterPair.first == ref.iterPair.first));
493 bool valid() {
return 0 != m_opaqueState; }
497 : m_status(ref.m_status),
498 m_opaqueState(m_status->copyIterator(ref.m_opaqueState)),
499 iterPair(ref.iterPair)
514 std::swap(m_status, other.m_status);
515 std::swap(m_opaqueState, other.m_opaqueState);
516 std::swap(iterPair, other.iterPair);
538 return getStatusIntValue(
"uptime");
547 return (AP_uint32) getStatusIntValue(
"numContexts");
556 return (AP_uint32) getStatusIntValue(
"numMonitors");
566 return (AP_uint32) getStatusIntValue(
"numProcesses");
575 return (AP_uint32) getStatusIntValue(
"numJavaApplications");
584 return (AP_uint32) getStatusIntValue(
"numListeners");
593 return (AP_uint32) getStatusIntValue(
"numEventTypes");
603 return (AP_uint32) getStatusIntValue(
"numQueuedFastTrack");
613 return (AP_uint32) getStatusIntValue(
"numQueuedInput");
622 return getStatusIntValue(
"numReceived");
631 return getStatusIntValue(
"numFastTracked");
640 return (AP_uint32) getStatusIntValue(
"numConsumers");
649 return (AP_uint32) getStatusIntValue(
"numOutEventsQueued");
659 return getStatusIntValue(
"numEmits");
670 return getStatusIntValue(
"numOutEventsSent");
679 return (AP_uint32) getStatusIntValue(
"numInputQueuedInput");
688 return (*
this)[
"mostBackedUpInputContext"];
697 return (*
this)[
"slowestReceiver"];
706 return (AP_uint32) getStatusIntValue(
"slowestReceiverQueueSize");
715 return (AP_uint32) getStatusIntValue(
"mostBackedUpQueueSize");
724 return (AP_uint32) getStatusIntValue(
"numSubListeners");
734 return getStatusIntValue(
"numProcessed");
752 const_iterator
end()
const {
759 const AP_char8* operator[] (
const char *ref)
const {
760 return getStatusValue(ref);
766 const AP_char8* operator[] (std::string &ref)
const {
767 return this->operator[](ref.c_str());
787 return userIntOr(key, alt);
797 return userFloat(key);
807 return userFloatOr(key, alt);
817 return userBool(key);
827 return userBoolOr(key, alt);
837 return userString(key);
847 return userStringOr(key, alt);
856 std::ostringstream ost;
857 ost << getStandardStatusValues();
859 if (it->first.find(
"user-") != std::string::npos)
860 ost << std::setw(32) << setiosflags(std::ios_base::left) << it->first.append(
":") << it->second << std::endl;
871 std::ostringstream ost;
873 <<
"Uptime(ms): " << getUptime() << std::endl
874 <<
"Number of contexts: " << getNumContexts() << std::endl
875 <<
"Number of monitors: " << getNumMonitors() << std::endl
876 <<
"Number of sub-monitors: " << getNumProcesses() << std::endl
877 <<
"Number of java applications: " << getNumJavaApplications() << std::endl
878 <<
"Number of listeners: " << getNumListeners() << std::endl
879 <<
"Number of sub-listeners: " << getNumSubListeners() << std::endl
880 <<
"Number of event types: " << getNumEventTypes() << std::endl
881 <<
"Events on input queue: " << getNumQueuedInput() << std::endl
882 <<
"Events received: " << getNumReceived() << std::endl
883 <<
"Events processed: " << getNumProcessed() << std::endl
884 <<
"Events on internal queue: " << getNumQueuedFastTrack() << std::endl
885 <<
"Events routed internally: " << getNumFastTracked() << std::endl
886 <<
"Number of consumers: " << getNumConsumers() << std::endl
887 <<
"Events on output queue: " << getNumOutEventsQueued() << std::endl
888 <<
"Output events created: " << getNumOutEventsCreated() << std::endl
889 <<
"Output events sent: " << getNumOutEventsSent() << std::endl
890 <<
"Events on input context queues: " << getNumInputQueuedInput() << std::endl
891 <<
"Slowest context name: " << getMostBackedUpInput() << std::endl
892 <<
"Slowest context queue size: " << getMostBackedUpQueueSize() << std::endl
893 <<
"Slowest receiver name: " << getSlowestReceiver() << std::endl
894 <<
"Slowest receiver queue size: " << getSlowestReceiverQueueSize() << std::endl;
904 std::ostringstream ost;
905 ost <<
"Uptime (ms),# Contexts,# Monitors,# Sub-monitors,# Java apps,# Listeners,";
906 ost <<
"# Sub-listeners,# Event types,Input queue,# Received events,";
907 ost <<
"Route queue,# Routed events,# Consumers,Output queue,";
908 ost <<
"# Created output events,# Sent output events,# Processed events,";
909 ost <<
"Slowest context name,Slowest context queue size,Slowest receiver,Slowest receiver queue";
919 std::ostringstream ost;
920 ost << getRawHeader();
922 if (it->first.find(
"user-") != std::string::npos)
923 ost <<
"," << it->first;
934 std::ostringstream ost;
936 <<
"," << getNumContexts()
937 <<
"," << getNumMonitors()
938 <<
"," << getNumProcesses()
939 <<
"," << getNumJavaApplications()
940 <<
"," << getNumListeners()
941 <<
"," << getNumSubListeners()
942 <<
"," << getNumEventTypes()
943 <<
"," << getNumQueuedInput()
944 <<
"," << getNumReceived()
945 <<
"," << getNumQueuedFastTrack()
946 <<
"," << getNumFastTracked()
947 <<
"," << getNumConsumers()
948 <<
"," << getNumOutEventsQueued()
949 <<
"," << getNumOutEventsCreated()
950 <<
"," << getNumOutEventsSent()
951 <<
"," << getNumProcessed()
952 <<
"," << getMostBackedUpInput()
953 <<
"," << getMostBackedUpQueueSize()
954 <<
"," << getSlowestReceiver()
955 <<
"," << getSlowestReceiverQueueSize();
965 std::ostringstream ost;
966 ost << getStandardStatusValuesRaw();
968 if (it->first.find(
"user-") != std::string::npos)
969 ost <<
"," << it->second;
977 inline friend std::ostream& operator << (std::ostream& stream,
const EngineStatus& obj) {
978 std::ostringstream ost;
980 <<
"Uptime(ms): " << obj.
getUptime() << std::endl
1002 stream << ost.str();
1009 inline friend std::ostream& operator << (std::ostream& stream,
const EngineStatus* obj) {
1020 c_status->functions->deleteStatus(reinterpret_cast<AP_EngineStatus *>(c_status));
1041 void swap(EngineStatus &other) {
1042 std::swap(c_status, other.c_status);
1045 void getNext(
const char *&name,
const char *&value,
void *&opaqueState)
const {
1047 c_status->functions->getNextStatusItem(reinterpret_cast<AP_EngineStatus *>(c_status), &name, &value, &opaqueState);
1050 const AP_char8* getStatusValue(
const char *name)
const {
1051 return c_status->functions->getStatusValue(reinterpret_cast<AP_EngineStatus *>(c_status), name);
1054 AP_uint64 getStatusIntValue(
const char *name)
const {
1055 return c_status->functions->getStatusIntValue(reinterpret_cast<AP_EngineStatus *>(c_status), name);
1058 void disposeIterator(
void *opaqueState)
const {
1059 c_status->functions->disposeIterator(reinterpret_cast<AP_EngineStatus *>(c_status), opaqueState);
1062 void *copyIterator(
void *opaqueState)
const {
1063 return c_status->functions->copyIterator(reinterpret_cast<AP_EngineStatus *>(c_status), opaqueState);
1067 AP_int64 userIntOr(
const char* key, AP_int64 alt) {
1068 return c_status->functions->getUserIntOr(reinterpret_cast<AP_EngineStatus *>(c_status), key, alt);
1071 AP_float64 userFloatOr(
const char* key, AP_float64 alt) {
1072 return c_status->functions->getUserFloatOr(reinterpret_cast<AP_EngineStatus *>(c_status), key, alt);
1075 AP_bool userBoolOr(
const char* key, AP_bool alt) {
1076 return c_status->functions->getUserBoolOr(reinterpret_cast<AP_EngineStatus *>(c_status), key, alt);
1079 const AP_char8* userStringOr(
const char* key,
const AP_char8* alt) {
1080 return c_status->functions->getUserStringOr(reinterpret_cast<AP_EngineStatus *>(c_status), key, alt);
1083 AP_int64 userInt(
const char* key) {
1084 return c_status->functions->getUserInt(reinterpret_cast<AP_EngineStatus *>(c_status), key);
1087 AP_float64 userFloat(
const char* key) {
1088 return c_status->functions->getUserFloat(reinterpret_cast<AP_EngineStatus *>(c_status), key);
1091 AP_bool userBool(
const char* key) {
1092 return c_status->functions->getUserBool(reinterpret_cast<AP_EngineStatus *>(c_status), key);
1095 const AP_char8* userString(
const char* key) {
1096 return c_status->functions->getUserString(reinterpret_cast<AP_EngineStatus *>(c_status), key);
1113 if (m_opaqueState) step();
1117 inline void EngineStatus::StatusIterator::step()
1119 const char *name = 0;
1120 const char *value = 0;
1123 m_status->getNext(name, value, m_opaqueState );
1124 if(!name || !value) {
1125 assert(!m_opaqueState);
1127 iterPair = pair_t(name, value);
1147 virtual const char* getName()
const = 0;
1153 virtual const char* getPackage()
const = 0;
1158 virtual const char* getFullyQualifiedName()
const = 0;
1183 virtual unsigned int getNumSubMonitors()
const = 0;
1233 virtual unsigned int getNumSubMonitors()
const = 0;
1238 virtual unsigned int getQueueSize()
const = 0;
1243 virtual char const *
const *getChannels()
const = 0;
1269 virtual unsigned int getQueueSize()
const = 0;
1274 virtual char const *
const *getChannels()
const = 0;
1279 virtual const AP_char8 *getAddress()
const = 0;
1305 virtual unsigned int getQueueSize()
const = 0;
1310 virtual char const *
const *getChannels()
const = 0;
1335 virtual unsigned int getNumEventTemplates()
const = 0;
1360 virtual unsigned int getNumTimers()
const = 0;
1430 virtual unsigned int getNumTimers()
const = 0;
1435 virtual unsigned int getNumAggregates()
const = 0;
1499 virtual unsigned int getNumReceivers()
const = 0;
1513 virtual unsigned int getNumPluginReceivers()
const = 0;
1571 virtual void injectMonitorScript(
MonitorScript& script) = 0;
1588 virtual const char*
const* injectMonitorScriptWithWarnings(
MonitorScript& script) = 0;
1606 virtual const char*
const* injectMonitorScriptWithWarningsFilename(
MonitorScript& script,
const char *filename) = 0;
1614 virtual void deleteName(
const char * name) = 0;
1622 virtual void forceDeleteName(
const char * name) = 0;
1630 virtual void killName(
const char * name) = 0;
1635 virtual void deleteAll() = 0;
1645 virtual void injectJava(
const AP_uint8* jarbytes, AP_uint32 size) = 0;
1663 virtual const char*
const* injectJavaWithWarnings(
const AP_uint8* jarbytes, AP_uint32 size) = 0;
1679 virtual const char*
const* injectJavaWithWarningsFilename(
const AP_uint8* jarbytes, AP_uint32 size,
const char *filename) = 0;
1691 virtual void injectCDP(
const AP_uint8* cdpbytes, AP_uint32 size,
const char *filename=NULL) = 0;
1709 virtual const char*
const* injectCDPWithWarnings(
const AP_uint8* cdpbytes, AP_uint32 size) = 0;
1725 virtual const char*
const* injectCDPWithWarningsFilename(
const AP_uint8* cdpbytes, AP_uint32 size,
const char *filename) = 0;
1734 AP_EngineStatus *es_api = engineManagement_getStatusOpaque(
this, &errmsg);
1741 return EngineStatus(reinterpret_cast<AP_EngineStatus_API *>(es_api));
1809 virtual bool attachAsEventConsumerTo(
EngineManagement* target,
const char*
const* channels,
bool disconnectSlow =
false, ConnectMode mode =
CONNECT_LEGACY) = 0;
1834 virtual bool attachAsEventConsumerTo(
const char* host,
int port,
const char*
const* channels,
bool disconnectSlow =
false, ConnectMode mode =
CONNECT_LEGACY) = 0;
1872 virtual void detachAsEventConsumerFrom(
const char* host,
int port,
const char*
const* channels, ConnectMode mode =
CONNECT_LEGACY) = 0;
1898 virtual void flushEvents() = 0;
1926 virtual void ping() = 0;
1933 virtual bool isConnected() = 0;
1950 virtual void setReceiverConnections(
const std::vector<com::apama::engine::EngineConnection>& connections) = 0;
1956 virtual const std::vector<com::apama::engine::EngineConnection> getReceiverConnections() = 0;
1979 std::vector<std::string> channels;
1980 bool disconnectSlow;
1984 if (host == NULL || channels == NULL) {
1985 throw EngineException(
"EngineConnection cannot be created with null host or channels");
1987 if (port < 0 || port > 65535) {
1988 throw EngineException(
"EngineConnection cannot be created with invalid port value");
1991 this->host = std::string(host);
1993 this->disconnectSlow = disconnectSlow;
1994 this->connectMode = connectMode;
1996 for (
const char*
const* c = channels; *c != NULL; c++) {
1997 this->channels.push_back(std::string(*c));
2013 const char *
const * channels) {
2014 init(host, port, disconnectSlow, connectMode, channels);
2058 return disconnectSlow;
2071 std::ostringstream ost;
2072 ost <<
"EngineConnection to " << obj.host <<
":" << obj.port << (obj.disconnectSlow ==
true ?
" diconnectSlow" :
"") <<
" on" <<
2075 if (!obj.channels.empty()) {
2076 std::copy(obj.channels.begin(), obj.channels.end() - 1, std::ostream_iterator<std::string>(ost,
", "));
2077 ost << obj.channels.back();
2080 stream << ost.str();
2101 AP_ENGINE_CLIENT_API
void engineInit(
const char* processName =
"C++ Client");
2110 AP_ENGINE_CLIENT_API
void engineInitMessaging(
const char *processName,
bool initMessaging=
true);
2133 AP_ENGINE_CLIENT_API EngineManagement*
connectToEngine(
const char* host,
unsigned short port,
bool disconnectSlowReceiver =
false);
2197 AP_ENGINE_CLIENT_API
void deleteInfo(EngineInfo* info);
2207 AP_ENGINE_CLIENT_API
void deleteWarnings(
const char*
const* warnings);
2230 #endif // ENGINE_CLIENT_CPP_HPP
AP_ENGINE_CLIENT_API void deleteInfo(EngineInfo *info)
This function allows deletion of an EngineInfo object.
AP_ENGINE_CLIENT_API void setLogLevel(LogLevel level)
Sets the level at which the client library will log information.
AP_ENGINE_CLIENT_API void setEngineParams(const char *params)
Set custom parameters for this instance of the client library.
Derived class from EventConsumer which implements the disconnect API.
Definition: engine_client_cpp.hpp:323
Base class for a named object (i.e.
Definition: engine_client_cpp.hpp:1141
const AP_char8 * getMostBackedUpInput() const
Get the name of the most backed up context.
Definition: engine_client_cpp.hpp:687
An EventConsumer can connect to the Engine through an EventSupplier and register to receive events...
Definition: engine_client_cpp.hpp:290
This is the header file for the Apama Engine C SDK.
AP_float64 getUserFloatOr(const char *key, float alt)
Get a user value of type AP_float64 or the alt value if it cannot be found.
Definition: engine_client_cpp.hpp:806
AP_ENGINE_CLIENT_API EngineManagement * connectToEngineMonitorOnly(const char *host, unsigned short port)
Attempt to establish a monitor-only connection to an Engine listening on the named host and port...
virtual const char * getText() const =0
Retrieve the event's type and its contents as a string.
AP_uint32 getNumConsumers() const
Get the number of event consumers connected to the engine.
Definition: engine_client_cpp.hpp:639
AP_ENGINE_CLIENT_API void engineInit(const char *processName="C++ Client")
This function must be called once per process first before any other Engine operations are carried ou...
AP_ENGINE_CLIENT_API EngineManagement * connectToEngineReceiveOnly(const char *host, unsigned short port)
Attempt to establish a receive-only connection to an Engine listening on the named host and port...
AP_uint32 getNumInputQueuedInput() const
Get the total number of events on input contexts' queues.
Definition: engine_client_cpp.hpp:678
virtual const char * getText() const =0
Retrieve the text of a MonitorScript fragment as a string.
~EngineStatus()
Destroy the underlying status data.
Definition: engine_client_cpp.hpp:1017
AP_uint32 getNumSubListeners() const
Get the number of active sub-listeners.
Definition: engine_client_cpp.hpp:723
EngineStatus getStatus()
Get the Engine's current operational status.
Definition: engine_client_cpp.hpp:1731
AP_int64 getUserIntOr(const char *key, int alt)
Get a user value of type AP_int64 or the alt value if it cannot be found.
Definition: engine_client_cpp.hpp:786
AP_uint64 getNumReceived() const
Get the number of events received since the Engine started.
Definition: engine_client_cpp.hpp:621
The Engine Management class acts as the interface to the Engine, and allows operations to be carried ...
Definition: engine_client_cpp.hpp:1555
bool operator==(const StatusIterator &ref) const
Returns true if two iterators point to the same item.
Definition: engine_client_cpp.hpp:480
virtual const std::vector< std::string > & getChannels() const
Get the channels associated with this connection.
Definition: engine_client_cpp.hpp:2033
virtual const std::string & getHost() const
Get the host associated with this connection.
Definition: engine_client_cpp.hpp:2041
pair< std::string, std::string > pair_t
element type
Definition: engine_client_cpp.hpp:455
Fatal messages.
Definition: engine_client_cpp.hpp:101
AP_ENGINE_CLIENT_API void deleteMonitorScript(MonitorScript *mon)
This function allows deletion of MonitorScript objects.
AP_int64 getUserInt(const char *key)
Get a user value of type AP_int64.
Definition: engine_client_cpp.hpp:776
EngineConnection encapsulates the information related to a connection between two Apama messaging com...
Definition: engine_client_cpp.hpp:1975
Nothing logged.
Definition: engine_client_cpp.hpp:95
AP_bool getUserBool(const char *key)
Get a user value of type AP_bool.
Definition: engine_client_cpp.hpp:816
AP_uint32 getNumJavaApplications() const
Get the number of Java (JMon) Applications defined in the Engine.
Definition: engine_client_cpp.hpp:574
Definition: sag_connectivity_threading.h:178
StatusIterator & operator=(const StatusIterator &other)
Copy assignment.
Definition: engine_client_cpp.hpp:502
Information about a timer type returned by an engine inspection.
Definition: engine_client_cpp.hpp:1354
AP_ENGINE_CLIENT_API AP_char8 * convertFromUTF8(const AP_char8 *s)
Convert a string in UTF-8 to the local encoding, since most of the Apama API returns UTF-8...
AP_uint32 getNumContexts() const
Get the number of contexts active in the Engine.
Definition: engine_client_cpp.hpp:546
Information about a context returned by an engine inspection.
Definition: engine_client_cpp.hpp:1227
StatusIterator operator++(int dummy)
(postfix) increment this iterator
Definition: engine_client_cpp.hpp:471
pair_t & operator*()
Return a reference to the element pointed to.
Definition: engine_client_cpp.hpp:489
std::string getStandardStatusValues()
Get the standard status values, formatted for terminal output.
Definition: engine_client_cpp.hpp:870
EngineConnection(const char *host, int port, bool disconnectSlow, EngineManagement::ConnectMode connectMode, const char *const *channels)
Definition: engine_client_cpp.hpp:2012
AP_ENGINE_CLIENT_API void engineInitMessaging(const char *processName, bool initMessaging=true)
This function (or engineInit) must be called once per process first before any other Engine operation...
Startup and other important messages.
Definition: engine_client_cpp.hpp:97
AP_uint32 getNumQueuedFastTrack() const
Get the total number of events waiting on the route queues (value of 'rq' in the correlator status li...
Definition: engine_client_cpp.hpp:602
EngineStatus & operator=(const EngineStatus &other)
Copy assignment.
Definition: engine_client_cpp.hpp:1028
AP_ENGINE_CLIENT_API MonitorScript * createMonitorScript(const char *monitorString)
This function allows creation of MonitorScript objects.
StatusIterator const_iterator
Iterator type for const EngineStatus.
Definition: engine_client_cpp.hpp:530
An EventSupplier represents the resources created by the Engine to service a connection to an externa...
Definition: engine_client_cpp.hpp:250
static std::string getRawHeader()
Get a header for the raw output, useful for indentifying values.
Definition: engine_client_cpp.hpp:903
const AP_char8 * getSlowestReceiver() const
Get the name of the slowest receiver.
Definition: engine_client_cpp.hpp:696
For backwards compatibility, single serial connection.
Definition: engine_client_cpp.hpp:1561
Information about a monitor returned by an engine inspection.
Definition: engine_client_cpp.hpp:1177
Allow parallel connections on multiple channels.
Definition: engine_client_c.h:1612
Information about a receiver returned by an engine inspection.
Definition: engine_client_cpp.hpp:1263
std::string getRawHeaderAll()
Get a header for the raw output, useful for indentifying values.
Definition: engine_client_cpp.hpp:918
AP_ENGINE_CLIENT_API void setLogFile(const AP_char8 *filename, bool truncate, bool utf8=false)
Sets the file to which the client library should log information.
ConnectMode
The mode that attachAsEventConsumerTo and detachAsEventConsumerFrom operate in.
Definition: engine_client_cpp.hpp:1559
For backwards compatibility, single serial connection.
Definition: engine_client_c.h:1610
EngineStatus()
Create a default-constructed (empty) EngineStatus.
Definition: engine_client_cpp.hpp:1036
Information messages (default)
Definition: engine_client_cpp.hpp:107
friend std::ostream & operator<<(std::ostream &stream, const EngineStatus &obj)
Stream output operator for a reference.
Definition: engine_client_cpp.hpp:977
Information about an aggregate function returned by an engine inspection.
Definition: engine_client_cpp.hpp:1380
EngineStatus.
Definition: engine_client_c.h:774
Allow parallel connections on multiple channels.
Definition: engine_client_cpp.hpp:1563
virtual const char *const * getWarnings() const
Retrieve the set of warnings associated with the exception.
Definition: engine_client_cpp.hpp:78
AP_uint32 getSlowestReceiverQueueSize() const
Get the queue size of the slowest receiver.
Definition: engine_client_cpp.hpp:705
Information about the monitors and types currently in an engine.
Definition: engine_client_cpp.hpp:1407
AP_ENGINE_CLIENT_API void engineShutdown()
This function must be called once per process before the application closes down. ...
Information about a java application returned by an engine inspection.
Definition: engine_client_cpp.hpp:1202
AP_ENGINE_CLIENT_API void disconnectFromEngine(EngineManagement *corr)
This function allows disconnection from an Engine.
const AP_char8 * getUserString(const char *key)
Get a user value of type AP_char8*.
Definition: engine_client_cpp.hpp:836
An Event object represents an event instance.
Definition: engine_client_cpp.hpp:178
AP_uint32 getNumMonitors() const
Get the number of monitors defined in the Engine.
Definition: engine_client_cpp.hpp:555
virtual bool getDisconnectSlow() const
Get the value of disconnectSlow flag associated with this connection.
Definition: engine_client_cpp.hpp:2057
Critical messages.
Definition: engine_client_cpp.hpp:99
AP_uint32 getMostBackedUpQueueSize() const
Get the queue size of the most backed up context.
Definition: engine_client_cpp.hpp:714
pair_t * operator->()
Return a pointer to the element pointed to.
Definition: engine_client_cpp.hpp:491
AP_uint64 getUptime() const
Get the time in ms that the Engine has been running for.
Definition: engine_client_cpp.hpp:537
const_iterator begin() const
Returns an instance of the StatusIterator which allows to iterate over all status items...
Definition: engine_client_cpp.hpp:742
virtual ~EngineConnection()
Destroy the underlying connection data.
Definition: engine_client_cpp.hpp:2091
std::string getAllStatusValuesRaw()
Get all the status values available, formatted for parsers (values separated by ,).
Definition: engine_client_cpp.hpp:964
AP_ENGINE_CLIENT_API void reOpenLog()
Re-opens the log file.
AP_uint32 getNumOutEventsQueued() const
Get the number of events waiting on the output queue.
Definition: engine_client_cpp.hpp:648
AP_uint32 getNumEventTypes() const
Get the number of event types defined in the Engine.
Definition: engine_client_cpp.hpp:592
LogLevel
Available logging levels.
Definition: engine_client_cpp.hpp:93
Information about a receiver returned by an engine inspection.
Definition: engine_client_cpp.hpp:1299
std::string getAllStatusValues()
Get all the status values available, formatted for terminal output.
Definition: engine_client_cpp.hpp:855
EngineStatus(const EngineStatus &other)
Copy constructor.
Definition: engine_client_cpp.hpp:1024
AP_uint32 getNumQueuedInput() const
Get the total number of events waiting on the input queues (value of 'iq' in the correlator status li...
Definition: engine_client_cpp.hpp:612
AP_uint64 getNumOutEventsSent() const
This is the number of output events sent out by the correlator process.
Definition: engine_client_cpp.hpp:669
AP_ENGINE_CLIENT_API void deleteWarnings(const char *const *warnings)
This function allows deletion of the lists of warnings returned by injectMonitorScriptWithWarnings()...
const_iterator end() const
Returns an instance of the StatusIterator which allows to iterate over all status items...
Definition: engine_client_cpp.hpp:752
virtual EngineManagement::ConnectMode getConnectMode() const
Get the connection mode associated with this connection.
Definition: engine_client_cpp.hpp:2065
EngineConnection(const char *host, int port, const char *const *channels)
Definition: engine_client_cpp.hpp:2024
EngineStatus represents the operational status of the Engine.
Definition: engine_client_cpp.hpp:436
AP_uint32 getNumListeners() const
Get the number of active listeners.
Definition: engine_client_cpp.hpp:583
AP_uint64 getNumOutEventsCreated() const
Get the number of output events which have been put onto the output queue.
Definition: engine_client_cpp.hpp:658
struct AP_EngineStatus_Stubs AP_EngineStatus
AP_EngineStatus allows access to the operational status of the Engine.
Definition: engine_client_c.h:128
Warning messages.
Definition: engine_client_cpp.hpp:105
AP_ENGINE_CLIENT_API AP_char8 * convertToUTF8(const AP_char8 *s)
Convert a string in local encoding to UTF-8, as required by most of the Apama API.
StatusIterator & operator++()
(prefix) increment this iterator
Definition: engine_client_cpp.hpp:1111
bool valid()
Returns true if this is a valid iterator over status data.
Definition: engine_client_cpp.hpp:493
const AP_char8 * getUserStringOr(const char *key, const char *alt)
Get a user value of type AP_char8* or the alt value if it cannot be found.
Definition: engine_client_cpp.hpp:846
AP_ENGINE_CLIENT_API Event * createEvent(const char *eventString, const char *channelString)
This function allows creation of an Event object.
Debugging messages.
Definition: engine_client_cpp.hpp:109
AP_float64 getUserFloat(const char *key)
Get a user value of type AP_float64.
Definition: engine_client_cpp.hpp:796
bool operator!=(const StatusIterator &ref) const
Returns false if two iterators point to the same item.
Definition: engine_client_cpp.hpp:487
Information about a event type returned by an engine inspection.
Definition: engine_client_cpp.hpp:1329
std::string getStandardStatusValuesRaw()
Get the standard status values, formatted for parsers (values separated by ,).
Definition: engine_client_cpp.hpp:933
StatusIterator()
Default-constructed status iterator.
Definition: engine_client_cpp.hpp:460
An EngineException is thrown by methods in this library if any problems are encountered.
Definition: engine_client_cpp.hpp:46
More-verbose debug messages.
Definition: engine_client_cpp.hpp:111
A MonitorScript object encapsulates a MonitorScript code fragment, containing package, event and monitor definitions to be injected into an Engine.
Definition: engine_client_cpp.hpp:392
AP_ENGINE_CLIENT_API void setLogFD(int fd)
Sets the file descriptor to which the client library should log information.
AP_ENGINE_CLIENT_API void char8free(char *string)
Free any char* string returned from the client API.
A class used for the iterating through all status items.
Definition: engine_client_cpp.hpp:451
AP_ENGINE_CLIENT_API void deleteEvent(Event *ev)
This function allows deletion of an Event object.
StatusIterator iterator
Iterator type.
Definition: engine_client_cpp.hpp:528
AP_ENGINE_CLIENT_API void deleteEventSupplier(EventSupplier *evsup)
This function disconnects and deletes an EventSupplier object.
AP_uint32 getNumProcesses() const
Get the number of monitor processes or active sub-monitors.
Definition: engine_client_cpp.hpp:565
AP_uint64 getNumProcessed() const
Get the number of events taken off the input queue and processed since the engine started...
Definition: engine_client_cpp.hpp:733
~StatusIterator()
Destroy underling status iterator.
Definition: engine_client_cpp.hpp:466
virtual int getPort() const
Get the port associated with this connection.
Definition: engine_client_cpp.hpp:2049
Error messages.
Definition: engine_client_cpp.hpp:103
StatusIterator(const StatusIterator &ref)
Copy constructor.
Definition: engine_client_cpp.hpp:496
AP_uint64 getNumFastTracked() const
Get the number of events received on the internal input queue since the Engine started.
Definition: engine_client_cpp.hpp:630
AP_ENGINE_CLIENT_API EngineManagement * connectToEngine(const char *host, unsigned short port, bool disconnectSlowReceiver=false)
This function attempts to establish a connection to an Engine.
AP_bool getUserBoolOr(const char *key, bool alt)
Get a user value of type AP_bool or the alt value if it cannot be found.
Definition: engine_client_cpp.hpp:826