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;
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;
432 std::ostream&
operator << (std::ostream& stream,
const EngineStatus& obj);
433 std::ostream&
operator << (std::ostream& stream,
const EngineStatus* obj);
454 #pragma warning (disable : 4251)
456 class AP_ENGINE_CLIENT_API
StatusIterator :
public std::iterator<std::forward_iterator_tag, int>
460 typedef pair<std::string, std::string>
pair_t;
473 if (m_status && m_opaqueState) m_status->disposeIterator(m_opaqueState);
487 return (m_status == ref.m_status) &&
488 (((0 == m_opaqueState) && (0 == ref.m_opaqueState)) ||
489 (iterPair.first == ref.iterPair.first));
498 bool valid() {
return 0 != m_opaqueState; }
502 : m_status(ref.m_status),
503 m_opaqueState(m_status->copyIterator(ref.m_opaqueState)),
504 iterPair(ref.iterPair)
519 std::swap(m_status, other.m_status);
520 std::swap(m_opaqueState, other.m_opaqueState);
521 std::swap(iterPair, other.iterPair);
543 return getStatusIntValue(
"uptime");
552 return (AP_uint32) getStatusIntValue(
"numContexts");
561 return (AP_uint32) getStatusIntValue(
"numMonitors");
571 return (AP_uint32) getStatusIntValue(
"numProcesses");
580 return (AP_uint32) getStatusIntValue(
"numJavaApplications");
589 return (AP_uint32) getStatusIntValue(
"numListeners");
598 return (AP_uint32) getStatusIntValue(
"numEventTypes");
608 return (AP_uint32) getStatusIntValue(
"numQueuedFastTrack");
618 return (AP_uint32) getStatusIntValue(
"numQueuedInput");
627 return getStatusIntValue(
"numReceived");
636 return getStatusIntValue(
"numFastTracked");
645 return (AP_uint32) getStatusIntValue(
"numConsumers");
654 return (AP_uint32) getStatusIntValue(
"numOutEventsQueued");
664 return getStatusIntValue(
"numEmits");
675 return getStatusIntValue(
"numOutEventsSent");
684 return (AP_uint32) getStatusIntValue(
"numInputQueuedInput");
693 return (*
this)[
"mostBackedUpInputContext"];
702 return (*
this)[
"slowestReceiver"];
711 return (AP_uint32) getStatusIntValue(
"slowestReceiverQueueSize");
720 return (AP_uint32) getStatusIntValue(
"mostBackedUpQueueSize");
729 return (AP_uint32) getStatusIntValue(
"numSubListeners");
739 return getStatusIntValue(
"numProcessed");
757 const_iterator
end()
const {
764 const AP_char8* operator[] (
const char *ref)
const {
765 return getStatusValue(ref);
771 const AP_char8* operator[] (std::string &ref)
const {
772 return this->operator[](ref.c_str());
792 return userIntOr(key, alt);
802 return userFloat(key);
812 return userFloatOr(key, alt);
822 return userBool(key);
832 return userBoolOr(key, alt);
842 return userString(key);
852 return userStringOr(key, alt);
861 std::ostringstream ost;
862 ost << getStandardStatusValues();
864 if (it->first.find(
"user-") != std::string::npos)
865 ost << std::setw(32) << setiosflags(std::ios_base::left) << it->first.append(
":") << it->second << std::endl;
876 std::ostringstream ost;
887 std::ostringstream ost;
888 ost <<
"Uptime (ms),# Contexts,# Monitors,# Sub-monitors,# Java apps,# Listeners,";
889 ost <<
"# Sub-listeners,# Event types,Input queue,# Received events,";
890 ost <<
"Route queue,# Routed events,# Consumers,Output queue,";
891 ost <<
"# Created output events,# Sent output events,# Processed events,";
892 ost <<
"Slowest context name,Slowest context queue size,Slowest receiver,Slowest receiver queue";
902 std::ostringstream ost;
903 ost << getRawHeader();
905 if (it->first.find(
"user-") != std::string::npos)
906 ost <<
"," << it->first;
917 std::ostringstream ost;
919 <<
"," << getNumContexts()
920 <<
"," << getNumMonitors()
921 <<
"," << getNumProcesses()
922 <<
"," << getNumJavaApplications()
923 <<
"," << getNumListeners()
924 <<
"," << getNumSubListeners()
925 <<
"," << getNumEventTypes()
926 <<
"," << getNumQueuedInput()
927 <<
"," << getNumReceived()
928 <<
"," << getNumQueuedFastTrack()
929 <<
"," << getNumFastTracked()
930 <<
"," << getNumConsumers()
931 <<
"," << getNumOutEventsQueued()
932 <<
"," << getNumOutEventsCreated()
933 <<
"," << getNumOutEventsSent()
934 <<
"," << getNumProcessed()
935 <<
"," << getMostBackedUpInput()
936 <<
"," << getMostBackedUpQueueSize()
937 <<
"," << getSlowestReceiver()
938 <<
"," << getSlowestReceiverQueueSize();
948 std::ostringstream ost;
949 ost << getStandardStatusValuesRaw();
951 if (it->first.find(
"user-") != std::string::npos)
952 ost <<
"," << it->second;
963 c_status->functions->deleteStatus(reinterpret_cast<AP_EngineStatus *>(c_status));
984 void swap(EngineStatus &other) {
985 std::swap(c_status, other.c_status);
988 void getNext(
const char *&name,
const char *&value,
void *&opaqueState)
const {
990 c_status->functions->getNextStatusItem(reinterpret_cast<AP_EngineStatus *>(c_status), &name, &value, &opaqueState);
993 const AP_char8* getStatusValue(
const char *name)
const {
994 return c_status->functions->getStatusValue(reinterpret_cast<AP_EngineStatus *>(c_status), name);
997 AP_uint64 getStatusIntValue(
const char *name)
const {
998 return c_status->functions->getStatusIntValue(reinterpret_cast<AP_EngineStatus *>(c_status), name);
1001 void disposeIterator(
void *opaqueState)
const {
1002 c_status->functions->disposeIterator(reinterpret_cast<AP_EngineStatus *>(c_status), opaqueState);
1005 void *copyIterator(
void *opaqueState)
const {
1006 return c_status->functions->copyIterator(reinterpret_cast<AP_EngineStatus *>(c_status), opaqueState);
1010 AP_int64 userIntOr(
const char* key, AP_int64 alt) {
1011 return c_status->functions->getUserIntOr(reinterpret_cast<AP_EngineStatus *>(c_status), key, alt);
1014 AP_float64 userFloatOr(
const char* key, AP_float64 alt) {
1015 return c_status->functions->getUserFloatOr(reinterpret_cast<AP_EngineStatus *>(c_status), key, alt);
1018 AP_bool userBoolOr(
const char* key, AP_bool alt) {
1019 return c_status->functions->getUserBoolOr(reinterpret_cast<AP_EngineStatus *>(c_status), key, alt);
1022 const AP_char8* userStringOr(
const char* key,
const AP_char8* alt) {
1023 return c_status->functions->getUserStringOr(reinterpret_cast<AP_EngineStatus *>(c_status), key, alt);
1026 AP_int64 userInt(
const char* key) {
1027 return c_status->functions->getUserInt(reinterpret_cast<AP_EngineStatus *>(c_status), key);
1030 AP_float64 userFloat(
const char* key) {
1031 return c_status->functions->getUserFloat(reinterpret_cast<AP_EngineStatus *>(c_status), key);
1034 AP_bool userBool(
const char* key) {
1035 return c_status->functions->getUserBool(reinterpret_cast<AP_EngineStatus *>(c_status), key);
1038 const AP_char8* userString(
const char* key) {
1039 return c_status->functions->getUserString(reinterpret_cast<AP_EngineStatus *>(c_status), key);
1050 std::ostringstream ost;
1052 <<
"Uptime(ms): " << obj.
getUptime() << std::endl
1074 stream << ost.str();
1097 if (m_opaqueState) step();
1101 inline void EngineStatus::StatusIterator::step()
1103 const char *name = 0;
1104 const char *value = 0;
1107 m_status->getNext(name, value, m_opaqueState );
1108 if(!name || !value) {
1109 assert(!m_opaqueState);
1111 iterPair = pair_t(name, value);
1131 virtual const char* getName()
const = 0;
1137 virtual const char* getPackage()
const = 0;
1142 virtual const char* getFullyQualifiedName()
const = 0;
1167 virtual unsigned int getNumSubMonitors()
const = 0;
1192 virtual unsigned int getNumListeners()
const = 0;
1217 virtual unsigned int getNumSubMonitors()
const = 0;
1222 virtual unsigned int getQueueSize()
const = 0;
1227 virtual char const *
const *getChannels()
const = 0;
1253 virtual unsigned int getQueueSize()
const = 0;
1258 virtual char const *
const *getChannels()
const = 0;
1263 virtual const AP_char8 *getAddress()
const = 0;
1289 virtual unsigned int getQueueSize()
const = 0;
1294 virtual char const *
const *getChannels()
const = 0;
1319 virtual unsigned int getNumEventTemplates()
const = 0;
1344 virtual unsigned int getNumTimers()
const = 0;
1399 virtual unsigned int getNumMonitors()
const = 0;
1404 virtual unsigned int getNumJavaApplications()
const = 0;
1409 virtual unsigned int getNumEventTypes()
const = 0;
1414 virtual unsigned int getNumTimers()
const = 0;
1419 virtual unsigned int getNumAggregates()
const = 0;
1469 virtual unsigned int getNumContexts()
const = 0;
1483 virtual unsigned int getNumReceivers()
const = 0;
1497 virtual unsigned int getNumPluginReceivers()
const = 0;
1555 virtual void injectMonitorScript(
MonitorScript& script) = 0;
1572 virtual const char*
const* injectMonitorScriptWithWarnings(
MonitorScript& script) = 0;
1590 virtual const char*
const* injectMonitorScriptWithWarningsFilename(
MonitorScript& script,
const char *filename) = 0;
1598 virtual void deleteName(
const char * name) = 0;
1606 virtual void forceDeleteName(
const char * name) = 0;
1614 virtual void killName(
const char * name) = 0;
1619 virtual void deleteAll() = 0;
1629 virtual void injectJava(
const AP_uint8* jarbytes, AP_uint32 size) = 0;
1647 virtual const char*
const* injectJavaWithWarnings(
const AP_uint8* jarbytes, AP_uint32 size) = 0;
1663 virtual const char*
const* injectJavaWithWarningsFilename(
const AP_uint8* jarbytes, AP_uint32 size,
const char *filename) = 0;
1675 virtual void injectCDP(
const AP_uint8* cdpbytes, AP_uint32 size,
const char *filename=NULL) = 0;
1693 virtual const char*
const* injectCDPWithWarnings(
const AP_uint8* cdpbytes, AP_uint32 size) = 0;
1709 virtual const char*
const* injectCDPWithWarningsFilename(
const AP_uint8* cdpbytes, AP_uint32 size,
const char *filename) = 0;
1718 AP_EngineStatus *es_api = engineManagement_getStatusOpaque(
this, &errmsg);
1725 return EngineStatus(reinterpret_cast<AP_EngineStatus_API *>(es_api));
1793 virtual bool attachAsEventConsumerTo(
EngineManagement* target,
const char*
const* channels,
bool disconnectSlow =
false, ConnectMode mode =
CONNECT_LEGACY) = 0;
1818 virtual bool attachAsEventConsumerTo(
const char* host,
int port,
const char*
const* channels,
bool disconnectSlow =
false, ConnectMode mode =
CONNECT_LEGACY) = 0;
1856 virtual void detachAsEventConsumerFrom(
const char* host,
int port,
const char*
const* channels, ConnectMode mode =
CONNECT_LEGACY) = 0;
1882 virtual void flushEvents() = 0;
1910 virtual void ping() = 0;
1917 virtual bool isConnected() = 0;
1934 virtual void setReceiverConnections(
const std::vector<com::apama::engine::EngineConnection>& connections) = 0;
1940 virtual const std::vector<com::apama::engine::EngineConnection> getReceiverConnections() = 0;
1963 std::vector<std::string> channels;
1964 bool disconnectSlow;
1968 if (host == NULL || channels == NULL) {
1969 throw EngineException(
"EngineConnection cannot be created with null host or channels");
1971 if (port < 0 || port > 65535) {
1972 throw EngineException(
"EngineConnection cannot be created with invalid port value");
1975 this->host = std::string(host);
1977 this->disconnectSlow = disconnectSlow;
1978 this->connectMode = connectMode;
1980 for (
const char*
const* c = channels; *c != NULL; c++) {
1981 this->channels.push_back(std::string(*c));
1997 const char *
const * channels) {
1998 init(host, port, disconnectSlow, connectMode, channels);
2042 return disconnectSlow;
2055 std::ostringstream ost;
2056 ost <<
"EngineConnection to " << obj.host <<
":" << obj.port << (obj.disconnectSlow ==
true ?
" diconnectSlow" :
"") <<
" on" <<
2059 if (!obj.channels.empty()) {
2060 std::copy(obj.channels.begin(), obj.channels.end() - 1, std::ostream_iterator<std::string>(ost,
", "));
2061 ost << obj.channels.back();
2064 stream << ost.str();
2085 AP_ENGINE_CLIENT_API
void engineInit(
const char* processName =
"C++ Client");
2094 AP_ENGINE_CLIENT_API
void engineInitMessaging(
const char *processName,
bool initMessaging=
true);
2117 AP_ENGINE_CLIENT_API EngineManagement*
connectToEngine(
const char* host,
unsigned short port,
bool disconnectSlowReceiver =
false);
2181 AP_ENGINE_CLIENT_API
void deleteInfo(EngineInfo* info);
2191 AP_ENGINE_CLIENT_API
void deleteWarnings(
const char*
const* warnings);
2214 #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:1125
const AP_char8 * getMostBackedUpInput() const
Get the name of the most backed up context.
Definition: engine_client_cpp.hpp:692
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:811
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:644
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:683
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:960
AP_uint32 getNumSubListeners() const
Get the number of active sub-listeners.
Definition: engine_client_cpp.hpp:728
EngineStatus getStatus()
Get the Engine's current operational status.
Definition: engine_client_cpp.hpp:1715
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:791
AP_uint64 getNumReceived() const
Get the number of events received since the Engine started.
Definition: engine_client_cpp.hpp:626
The Engine Management class acts as the interface to the Engine, and allows operations to be carried ...
Definition: engine_client_cpp.hpp:1539
bool operator==(const StatusIterator &ref) const
Returns true if two iterators point to the same item.
Definition: engine_client_cpp.hpp:485
virtual const std::vector< std::string > & getChannels() const
Get the channels associated with this connection.
Definition: engine_client_cpp.hpp:2017
virtual const std::string & getHost() const
Get the host associated with this connection.
Definition: engine_client_cpp.hpp:2025
pair< std::string, std::string > pair_t
element type
Definition: engine_client_cpp.hpp:460
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:781
EngineConnection encapsulates the information related to a connection between two Apama messaging com...
Definition: engine_client_cpp.hpp:1959
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:821
AP_uint32 getNumJavaApplications() const
Get the number of Java (JMon) Applications defined in the Engine.
Definition: engine_client_cpp.hpp:579
Definition: sag_connectivity_threading.h:178
StatusIterator & operator=(const StatusIterator &other)
Copy assignment.
Definition: engine_client_cpp.hpp:507
Information about a timer type returned by an engine inspection.
Definition: engine_client_cpp.hpp:1338
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:551
Information about a context returned by an engine inspection.
Definition: engine_client_cpp.hpp:1211
StatusIterator operator++(int dummy)
(postfix) increment this iterator
Definition: engine_client_cpp.hpp:476
pair_t & operator*()
Return a reference to the element pointed to.
Definition: engine_client_cpp.hpp:494
std::string getStandardStatusValues()
Get the standard status values, formatted for terminal output.
Definition: engine_client_cpp.hpp:875
EngineConnection(const char *host, int port, bool disconnectSlow, EngineManagement::ConnectMode connectMode, const char *const *channels)
Definition: engine_client_cpp.hpp:1996
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:607
EngineStatus & operator=(const EngineStatus &other)
Copy assignment.
Definition: engine_client_cpp.hpp:971
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:535
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:886
const AP_char8 * getSlowestReceiver() const
Get the name of the slowest receiver.
Definition: engine_client_cpp.hpp:701
For backwards compatibility, single serial connection.
Definition: engine_client_cpp.hpp:1545
Information about a monitor returned by an engine inspection.
Definition: engine_client_cpp.hpp:1161
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:1247
std::string getRawHeaderAll()
Get a header for the raw output, useful for indentifying values.
Definition: engine_client_cpp.hpp:901
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:1543
For backwards compatibility, single serial connection.
Definition: engine_client_c.h:1610
EngineStatus()
Create a default-constructed (empty) EngineStatus.
Definition: engine_client_cpp.hpp:979
Information messages (default)
Definition: engine_client_cpp.hpp:107
Information about an aggregate function returned by an engine inspection.
Definition: engine_client_cpp.hpp:1364
EngineStatus.
Definition: engine_client_c.h:774
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:710
Information about the monitors and types currently in an engine.
Definition: engine_client_cpp.hpp:1391
std::ostream & operator<<(std::ostream &stream, const EngineStatus &obj)
Stream output operator for a reference.
Definition: engine_client_cpp.hpp:1049
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:1186
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:841
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:560
virtual bool getDisconnectSlow() const
Get the value of disconnectSlow flag associated with this connection.
Definition: engine_client_cpp.hpp:2041
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:719
pair_t * operator->()
Return a pointer to the element pointed to.
Definition: engine_client_cpp.hpp:496
AP_uint64 getUptime() const
Get the time in ms that the Engine has been running for.
Definition: engine_client_cpp.hpp:542
const_iterator begin() const
Returns an instance of the StatusIterator which allows to iterate over all status items...
Definition: engine_client_cpp.hpp:747
virtual ~EngineConnection()
Destroy the underlying connection data.
Definition: engine_client_cpp.hpp:2075
std::string getAllStatusValuesRaw()
Get all the status values available, formatted for parsers (values separated by ,).
Definition: engine_client_cpp.hpp:947
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:653
AP_uint32 getNumEventTypes() const
Get the number of event types defined in the Engine.
Definition: engine_client_cpp.hpp:597
LogLevel
Available logging levels.
Definition: engine_client_cpp.hpp:93
Information about a receiver returned by an engine inspection.
Definition: engine_client_cpp.hpp:1283
std::string getAllStatusValues()
Get all the status values available, formatted for terminal output.
Definition: engine_client_cpp.hpp:860
EngineStatus(const EngineStatus &other)
Copy constructor.
Definition: engine_client_cpp.hpp:967
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:617
AP_uint64 getNumOutEventsSent() const
This is the number of output events sent out by the correlator process.
Definition: engine_client_cpp.hpp:674
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:757
virtual EngineManagement::ConnectMode getConnectMode() const
Get the connection mode associated with this connection.
Definition: engine_client_cpp.hpp:2049
EngineConnection(const char *host, int port, const char *const *channels)
Definition: engine_client_cpp.hpp:2008
EngineStatus represents the operational status of the Engine.
Definition: engine_client_cpp.hpp:441
AP_uint32 getNumListeners() const
Get the number of active listeners.
Definition: engine_client_cpp.hpp:588
AP_uint64 getNumOutEventsCreated() const
Get the number of output events which have been put onto the output queue.
Definition: engine_client_cpp.hpp:663
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.
bool valid()
Returns true if this is a valid iterator over status data.
Definition: engine_client_cpp.hpp:498
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:851
AP_ENGINE_CLIENT_API Event * createEvent(const char *eventString, const char *channelString)
This function allows creation of an Event object.
std::ostream & operator<<(std::ostream &stream, const EngineStatus *obj)
Stream output operator for a pointer.
Definition: engine_client_cpp.hpp:1081
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:801
bool operator!=(const StatusIterator &ref) const
Returns false if two iterators point to the same item.
Definition: engine_client_cpp.hpp:492
Information about a event type returned by an engine inspection.
Definition: engine_client_cpp.hpp:1313
std::string getStandardStatusValuesRaw()
Get the standard status values, formatted for parsers (values separated by ,).
Definition: engine_client_cpp.hpp:916
StatusIterator()
Default-constructed status iterator.
Definition: engine_client_cpp.hpp:465
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:456
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:533
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:570
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:738
~StatusIterator()
Destroy underling status iterator.
Definition: engine_client_cpp.hpp:471
virtual int getPort() const
Get the port associated with this connection.
Definition: engine_client_cpp.hpp:2033
Error messages.
Definition: engine_client_cpp.hpp:103
StatusIterator(const StatusIterator &ref)
Copy constructor.
Definition: engine_client_cpp.hpp:501
AP_uint64 getNumFastTracked() const
Get the number of events received on the internal input queue since the Engine started.
Definition: engine_client_cpp.hpp:635
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:831