Apama  10.0.0.2
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
engine_client_cpp.hpp
Go to the documentation of this file.
1 /*
2  * engine_client_cpp.hpp
3  *
4  * $Copyright(c) 2002-2012 Progress Software Corporation and/or its subsidiaries and affiliates. All rights reserved.$
5  * $Copyright (c) 2013-2016 Software AG, Darmstadt, Germany and/or Software AG USA Inc., Reston, VA, USA, and/or its subsidiaries and/or its affiliates and/or their licensors.$
6  * Use, reproduction, transfer, publication or disclosure is prohibited except as specifically provided for in your License Agreement with Software AG
7  *
8  * $Id: engine_client_cpp.hpp 294044 2016-10-31 13:20:30Z mben $
9  */
10 
15 #ifndef ENGINE_CLIENT_CPP_HPP
16 #define ENGINE_CLIENT_CPP_HPP
17 
18 #include <AP_Types.h>
19 #include <AP_Platform.h>
20 #include <iostream>
21 #include <sstream>
22 #include <exception>
23 #include <iterator>
24 #include <algorithm>
25 #include <utility>
26 #include <string>
27 #include <assert.h>
28 #include <engine_client_c.h>
29 #include <iomanip>
30 #include <vector>
31 
32 
33 using std::pair;
34 
35 #undef ERROR
36 
37 namespace com {
38 
40 namespace apama {
41 
46  class AP_ENGINE_CLIENT_API EngineException : public std::exception
47  {
48  public:
50  EngineException(const char *message);
53 
55  EngineException& operator= (const EngineException& ce) {
56  EngineException(ce).swap(*this);
57  return *this;
58  }
59 
61  virtual ~EngineException() throw();
62 
69  virtual const char* what() const throw() { return m_message; }
70 
78  virtual const char* const* getWarnings() const { return m_warnings; }
79 
80  protected:
82  void swap(EngineException &);
84  const char* const* m_warnings;
85 
86  private:
88  char *m_message;
89  };
90 
91 
93  typedef enum {
112  } LogLevel;
113 
114 
120  AP_ENGINE_CLIENT_API void setLogLevel(LogLevel level);
121 
132  AP_ENGINE_CLIENT_API void setLogFile(const AP_char8* filename, bool truncate, bool utf8 = false);
133 
139  AP_ENGINE_CLIENT_API void setLogFD(int fd);
140 
145  AP_ENGINE_CLIENT_API void setLogMutex(void *mutex);
146 
151  AP_ENGINE_CLIENT_API void reOpenLog();
152 
153 
155  AP_ENGINE_CLIENT_API AP_char8* convertToUTF8(const AP_char8* s);
156 
158  AP_ENGINE_CLIENT_API AP_char8* convertFromUTF8(const AP_char8* s);
159 
163  AP_ENGINE_CLIENT_API void char8free(char *string);
164 
168  namespace event {
169 
178  class AP_ENGINE_CLIENT_API Event
179  {
180  friend AP_ENGINE_CLIENT_API Event* createEvent(const char* eventString, const char* channelString);
181  friend AP_ENGINE_CLIENT_API void deleteEvent(Event* ev);
182 
183  public:
190  virtual const char* getText() const = 0;
191 
200  virtual const char* getChannel() const = 0;
201 
212  virtual double getTime() const = 0;
213 
215  inline friend std::ostream& operator << (std::ostream& stream, const Event& obj) {
216  stream << obj.getText();
217  return stream;
218  }
220  inline friend std::ostream& operator << (std::ostream& stream, const Event* obj) {
221  stream << obj->getText();
222  return stream;
223  }
224 
225  private:
227  Event(const Event&);
229  Event& operator= (const Event&);
230 
231  protected:
233  Event();
235  virtual ~Event();
236  };
237 
238 
250  class AP_ENGINE_CLIENT_API EventSupplier
251  {
252  friend AP_ENGINE_CLIENT_API void deleteEventSupplier(EventSupplier* evsup);
253 
254  public:
264  virtual void disconnect() = 0;
265 
266  protected:
268  EventSupplier();
270  virtual ~EventSupplier();
271 
272  private:
276  EventSupplier& operator= (const EventSupplier&);
277  };
278 
279 
290  class AP_ENGINE_CLIENT_API EventConsumer
291  {
292  public:
305  virtual void sendEvents(const Event* const* events) = 0;
306 
307  protected:
309  EventConsumer();
311  virtual ~EventConsumer();
312 
313  private:
317  EventConsumer& operator= (const EventConsumer&);
318  };
319 
323  class AP_ENGINE_CLIENT_API DisconnectableEventConsumer : public EventConsumer
324  {
325  public:
333  virtual void disconnect(const char* reason) = 0;
334 
335  protected:
339  virtual ~DisconnectableEventConsumer();
340 
341  private:
346  };
347 
348 
359  AP_ENGINE_CLIENT_API Event* createEvent(const char* eventString, const char* channelString);
360 
366  AP_ENGINE_CLIENT_API void deleteEvent(Event* ev);
367 
368 
377  AP_ENGINE_CLIENT_API void deleteEventSupplier(EventSupplier* evsup);
378 
379  } // namespace event
380 
382  namespace engine {
383 
392  class AP_ENGINE_CLIENT_API MonitorScript
393  {
394  friend AP_ENGINE_CLIENT_API MonitorScript* createMonitorScript(const char* monitorString);
395  friend AP_ENGINE_CLIENT_API void deleteMonitorScript(MonitorScript* mon);
396 
397  public:
405  virtual const char* getText() const = 0;
406 
408  inline friend std::ostream& operator << (std::ostream& stream, const MonitorScript& obj) {
409  stream << obj.getText();
410  return stream;
411  }
413  inline friend std::ostream& operator << (std::ostream& stream, const MonitorScript* obj) {
414  stream << obj->getText();
415  return stream;
416  }
417 
418  private:
422  MonitorScript& operator= (const MonitorScript&);
423 
424  protected:
426  MonitorScript();
428  virtual ~MonitorScript();
429  };
430 
431  class EngineStatus;
432  std::ostream& operator << (std::ostream& stream, const EngineStatus& obj);
433  std::ostream& operator << (std::ostream& stream, const EngineStatus* obj);
434 
435 
441  class AP_ENGINE_CLIENT_API EngineStatus
442  {
443  friend class EngineManagement; /* getStatus */
444 
445  public:
446 
452 #ifdef _MSC_VER
453 // needed or MSVC complains about the use of pair<string> here, even though it's all inlined
454 #pragma warning (disable : 4251)
455 #endif
456  class AP_ENGINE_CLIENT_API StatusIterator : public std::iterator<std::forward_iterator_tag, int>
457  {
458  public:
460  typedef pair<std::string, std::string> pair_t;
461 
463  explicit StatusIterator(const EngineStatus &es, bool end=false);
466  m_status(0),
467  m_opaqueState(0),
468  iterPair()
469  {}
472  {
473  if (m_status && m_opaqueState) m_status->disposeIterator(m_opaqueState);
474  }
476  StatusIterator operator++(int dummy/*@unused@*/)
477  {
478  StatusIterator current(*this);
479  ++(*this); //this->operator++() // prefix ++
480  return current;
481  }
483  StatusIterator& operator++();
485  bool operator==(const StatusIterator& ref) const
486  {
487  return (m_status == ref.m_status) &&
488  (((0 == m_opaqueState) && (0 == ref.m_opaqueState)) ||
489  (iterPair.first == ref.iterPair.first));
490  }
492  bool operator!=(const StatusIterator& ref) const { return !((*this)==ref); }
494  pair_t &operator*() { return iterPair; }
496  pair_t *operator->() { return &iterPair; }
498  bool valid() { return 0 != m_opaqueState; }
499 
502  : m_status(ref.m_status),
503  m_opaqueState(m_status->copyIterator(ref.m_opaqueState)),
504  iterPair(ref.iterPair)
505  {}
508  {
509  StatusIterator(other).swap(*this);
510  return *this;
511  }
512 
513  private:
515  void step();
517  void swap(StatusIterator &other)
518  {
519  std::swap(m_status, other.m_status);
520  std::swap(m_opaqueState, other.m_opaqueState);
521  std::swap(iterPair, other.iterPair);
522  }
523 
525  const EngineStatus *m_status;
527  void *m_opaqueState;
529  pair_t iterPair;
530  };
531 
536 
542  AP_uint64 getUptime() const {
543  return getStatusIntValue("uptime");
544  }
545 
551  AP_uint32 getNumContexts() const {
552  return (AP_uint32) getStatusIntValue("numContexts");
553  }
554 
560  AP_uint32 getNumMonitors() const {
561  return (AP_uint32) getStatusIntValue("numMonitors");
562  }
563 
570  AP_uint32 getNumProcesses() const {
571  return (AP_uint32) getStatusIntValue("numProcesses");
572  }
573 
579  AP_uint32 getNumJavaApplications() const {
580  return (AP_uint32) getStatusIntValue("numJavaApplications");
581  }
582 
588  AP_uint32 getNumListeners() const {
589  return (AP_uint32) getStatusIntValue("numListeners");
590  }
591 
597  AP_uint32 getNumEventTypes() const {
598  return (AP_uint32) getStatusIntValue("numEventTypes");
599  }
600 
607  AP_uint32 getNumQueuedFastTrack() const {
608  return (AP_uint32) getStatusIntValue("numQueuedFastTrack");
609  }
610 
617  AP_uint32 getNumQueuedInput() const {
618  return (AP_uint32) getStatusIntValue("numQueuedInput");
619  }
620 
626  AP_uint64 getNumReceived() const {
627  return getStatusIntValue("numReceived");
628  }
629 
635  AP_uint64 getNumFastTracked() const {
636  return getStatusIntValue("numFastTracked");
637  }
638 
644  AP_uint32 getNumConsumers() const {
645  return (AP_uint32) getStatusIntValue("numConsumers");
646  }
647 
653  AP_uint32 getNumOutEventsQueued() const {
654  return (AP_uint32) getStatusIntValue("numOutEventsQueued");
655  }
656 
663  AP_uint64 getNumOutEventsCreated() const {
664  return getStatusIntValue("numEmits");
665  }
666 
674  AP_uint64 getNumOutEventsSent() const {
675  return getStatusIntValue("numOutEventsSent");
676  }
677 
683  AP_uint32 getNumInputQueuedInput() const {
684  return (AP_uint32) getStatusIntValue("numInputQueuedInput");
685  }
686 
692  const AP_char8* getMostBackedUpInput() const {
693  return (*this)["mostBackedUpInputContext"];
694  }
695 
701  const AP_char8 *getSlowestReceiver() const {
702  return (*this)["slowestReceiver"];
703  }
704 
710  AP_uint32 getSlowestReceiverQueueSize() const {
711  return (AP_uint32) getStatusIntValue("slowestReceiverQueueSize");
712  }
713 
719  AP_uint32 getMostBackedUpQueueSize() const {
720  return (AP_uint32) getStatusIntValue("mostBackedUpQueueSize");
721  }
722 
728  AP_uint32 getNumSubListeners() const {
729  return (AP_uint32) getStatusIntValue("numSubListeners");
730  }
731 
738  AP_uint64 getNumProcessed() const {
739  return getStatusIntValue("numProcessed");
740  }
747  const_iterator begin() const {
748  return StatusIterator(*this);
749  }
750 
757  const_iterator end() const {
758  return StatusIterator(*this, true);
759  }
760 
764  const AP_char8* operator[] (const char *ref) const {
765  return getStatusValue(ref);
766  }
767 
771  const AP_char8* operator[] (std::string &ref) const {
772  return this->operator[](ref.c_str());
773  }
774 
781  AP_int64 getUserInt(const char* key) {
782  return userInt(key);
783  }
784 
791  AP_int64 getUserIntOr(const char* key, int alt) {
792  return userIntOr(key, alt);
793  }
794 
801  AP_float64 getUserFloat(const char* key) {
802  return userFloat(key);
803  }
804 
811  AP_float64 getUserFloatOr(const char* key, float alt) {
812  return userFloatOr(key, alt);
813  }
814 
821  AP_bool getUserBool(const char* key) {
822  return userBool(key);
823  }
824 
831  AP_bool getUserBoolOr(const char* key, bool alt) {
832  return userBoolOr(key, alt);
833  }
834 
841  const AP_char8* getUserString(const char* key) {
842  return userString(key);
843  }
844 
851  const AP_char8* getUserStringOr(const char* key, const char* alt) {
852  return userStringOr(key, alt);
853  }
854 
860  std::string getAllStatusValues() {
861  std::ostringstream ost;
862  ost << getStandardStatusValues();
863  for (EngineStatus::StatusIterator it = begin(); it != end(); ++it) {
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;
866  }
867  return ost.str();
868  }
869 
875  std::string getStandardStatusValues() {
876  std::ostringstream ost;
877  ost << *this;
878  return ost.str();
879  }
880 
886  static std::string getRawHeader() {
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";
893  return ost.str();
894  }
895 
901  std::string getRawHeaderAll() {
902  std::ostringstream ost;
903  ost << getRawHeader();
904  for (EngineStatus::StatusIterator it = begin(); it != end(); ++it) {
905  if (it->first.find("user-") != std::string::npos)
906  ost << "," << it->first;
907  }
908  return ost.str();
909  }
910 
917  std::ostringstream ost;
918  ost << getUptime()
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();
939  return ost.str();
940  }
941 
947  std::string getAllStatusValuesRaw() {
948  std::ostringstream ost;
949  ost << getStandardStatusValuesRaw();
950  for (EngineStatus::StatusIterator it = begin(); it != end(); ++it) {
951  if (it->first.find("user-") != std::string::npos)
952  ost << "," << it->second;
953  }
954  return ost.str();
955  }
956 
961  {
962  if (c_status) {
963  c_status->functions->deleteStatus(reinterpret_cast<AP_EngineStatus *>(c_status));
964  }
965  }
968  : c_status(other.c_status ? reinterpret_cast<AP_EngineStatus_API*>(other.c_status->functions->copyStatus(reinterpret_cast<AP_EngineStatus *>(other.c_status))) : 0)
969  {}
972  {
973  EngineStatus(other).swap(*this);
974  return *this;
975  }
979  EngineStatus(): c_status(0) {}
980  private:
982  EngineStatus(AP_EngineStatus_API *api): c_status(api) {}
984  void swap(EngineStatus &other) {
985  std::swap(c_status, other.c_status);
986  }
988  void getNext(const char *&name, const char *&value, void *&opaqueState) const {
989  if (c_status)
990  c_status->functions->getNextStatusItem(reinterpret_cast<AP_EngineStatus *>(c_status), &name, &value, &opaqueState);
991  }
993  const AP_char8* getStatusValue(const char *name) const {
994  return c_status->functions->getStatusValue(reinterpret_cast<AP_EngineStatus *>(c_status), name);
995  }
997  AP_uint64 getStatusIntValue(const char *name) const {
998  return c_status->functions->getStatusIntValue(reinterpret_cast<AP_EngineStatus *>(c_status), name);
999  }
1001  void disposeIterator(void *opaqueState) const {
1002  c_status->functions->disposeIterator(reinterpret_cast<AP_EngineStatus *>(c_status), opaqueState);
1003  }
1005  void *copyIterator(void *opaqueState) const {
1006  return c_status->functions->copyIterator(reinterpret_cast<AP_EngineStatus *>(c_status), opaqueState);
1007  }
1008 
1010  AP_int64 userIntOr(const char* key, AP_int64 alt) {
1011  return c_status->functions->getUserIntOr(reinterpret_cast<AP_EngineStatus *>(c_status), key, alt);
1012  }
1014  AP_float64 userFloatOr(const char* key, AP_float64 alt) {
1015  return c_status->functions->getUserFloatOr(reinterpret_cast<AP_EngineStatus *>(c_status), key, alt);
1016  }
1018  AP_bool userBoolOr(const char* key, AP_bool alt) {
1019  return c_status->functions->getUserBoolOr(reinterpret_cast<AP_EngineStatus *>(c_status), key, alt);
1020  }
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);
1024  }
1026  AP_int64 userInt(const char* key) {
1027  return c_status->functions->getUserInt(reinterpret_cast<AP_EngineStatus *>(c_status), key);
1028  }
1030  AP_float64 userFloat(const char* key) {
1031  return c_status->functions->getUserFloat(reinterpret_cast<AP_EngineStatus *>(c_status), key);
1032  }
1034  AP_bool userBool(const char* key) {
1035  return c_status->functions->getUserBool(reinterpret_cast<AP_EngineStatus *>(c_status), key);
1036  }
1038  const AP_char8* userString(const char* key) {
1039  return c_status->functions->getUserString(reinterpret_cast<AP_EngineStatus *>(c_status), key);
1040  }
1042  AP_EngineStatus_API *c_status;
1043  };
1044 
1045 
1049  inline std::ostream& operator << (std::ostream& stream, const EngineStatus& obj) {
1050  std::ostringstream ost;
1051  ost
1052  << "Uptime(ms): " << obj.getUptime() << std::endl
1053  << "Number of contexts: " << obj.getNumContexts() << std::endl
1054  << "Number of monitors: " << obj.getNumMonitors() << std::endl
1055  << "Number of sub-monitors: " << obj.getNumProcesses() << std::endl
1056  << "Number of Java applications: " << obj.getNumJavaApplications() << std::endl
1057  << "Number of listeners: " << obj.getNumListeners() << std::endl
1058  << "Number of sub-listeners: " << obj.getNumSubListeners() << std::endl
1059  << "Number of event types: " << obj.getNumEventTypes() << std::endl
1060  << "Events on input queue: " << obj.getNumQueuedInput() << std::endl
1061  << "Events received: " << obj.getNumReceived() << std::endl
1062  << "Events processed: " << obj.getNumProcessed() << std::endl
1063  << "Events on internal queue: " << obj.getNumQueuedFastTrack() << std::endl
1064  << "Events routed internally: " << obj.getNumFastTracked() << std::endl
1065  << "Number of consumers: " << obj.getNumConsumers() << std::endl
1066  << "Events on output queue: " << obj.getNumOutEventsQueued() << std::endl
1067  << "Output events created: " << obj.getNumOutEventsCreated() << std::endl
1068  << "Output events sent: " << obj.getNumOutEventsSent() << std::endl
1069  << "Events on input context queues: " << obj.getNumInputQueuedInput() << std::endl
1070  << "Slowest context name: " << obj.getMostBackedUpInput() << std::endl
1071  << "Slowest context queue size: " << obj.getMostBackedUpQueueSize() << std::endl
1072  << "Slowest receiver name: " << obj.getSlowestReceiver() << std::endl
1073  << "Slowest receiver queue size: " << obj.getSlowestReceiverQueueSize() << std::endl;
1074  stream << ost.str();
1075  return stream;
1076  }
1077 
1081  inline std::ostream& operator << (std::ostream& stream, const EngineStatus* obj) {
1082  stream << *obj;
1083  return stream;
1084  }
1085 
1086  inline EngineStatus::StatusIterator::StatusIterator(const EngineStatus &es, bool end):
1087  m_status(&es),
1088  m_opaqueState(0),
1089  iterPair()
1090  {
1091  if (!end) step(); // get the first item in the map
1092  }
1093 
1095  inline EngineStatus::StatusIterator& EngineStatus::StatusIterator::operator++()
1096  {
1097  if (m_opaqueState) step();// don't step past the end
1098  return *this;
1099  }
1100 
1101  inline void EngineStatus::StatusIterator::step()
1102  {
1103  const char *name = 0;
1104  const char *value = 0;
1105 
1106  /* get the next item from the library map */
1107  m_status->getNext(name, value, m_opaqueState );
1108  if(!name || !value) {
1109  assert(!m_opaqueState);
1110  } else {
1111  iterPair = pair_t(name, value);
1112  }
1113  }
1114 
1125  class AP_ENGINE_CLIENT_API NameInfo
1126  {
1127  public:
1131  virtual const char* getName() const = 0;
1132 
1137  virtual const char* getPackage() const = 0;
1138 
1142  virtual const char* getFullyQualifiedName() const = 0;
1143 
1144  private:
1146  NameInfo(const NameInfo&);
1148  NameInfo& operator= (const NameInfo&);
1149 
1150  protected:
1152  NameInfo();
1154  virtual ~NameInfo();
1155  };
1156 
1161  class AP_ENGINE_CLIENT_API NamedMonitorInfo : public NameInfo
1162  {
1163  public:
1167  virtual unsigned int getNumSubMonitors() const = 0;
1168 
1169  private:
1173  NamedMonitorInfo& operator= (const NamedMonitorInfo&);
1174 
1175  protected:
1177  NamedMonitorInfo();
1179  virtual ~NamedMonitorInfo();
1180  };
1181 
1186  class AP_ENGINE_CLIENT_API NamedJavaApplicationInfo : public NameInfo {
1187 
1188  public:
1192  virtual unsigned int getNumListeners() const = 0;
1193 
1194  private:
1199 
1200  protected:
1204  virtual ~NamedJavaApplicationInfo();
1205  };
1206 
1211  class AP_ENGINE_CLIENT_API NamedContextInfo : public NameInfo {
1212 
1213  public:
1217  virtual unsigned int getNumSubMonitors() const = 0;
1218 
1222  virtual unsigned int getQueueSize() const = 0;
1223 
1227  virtual char const *const *getChannels() const = 0;
1228 
1229  private:
1233  NamedContextInfo& operator= (const NamedContextInfo&);
1234 
1235  protected:
1237  NamedContextInfo();
1239  virtual ~NamedContextInfo();
1240  };
1241 
1242 
1247  class AP_ENGINE_CLIENT_API NamedReceiverInfo : public NameInfo {
1248 
1249  public:
1253  virtual unsigned int getQueueSize() const = 0;
1254 
1258  virtual char const *const *getChannels() const = 0;
1259 
1263  virtual const AP_char8 *getAddress() const = 0;
1264 
1265  private:
1269  NamedReceiverInfo& operator= (const NamedReceiverInfo&);
1270 
1271  protected:
1275  virtual ~NamedReceiverInfo();
1276  };
1277 
1278 
1283  class AP_ENGINE_CLIENT_API NamedPluginReceiverInfo : public NameInfo {
1284 
1285  public:
1289  virtual unsigned int getQueueSize() const = 0;
1290 
1294  virtual char const *const *getChannels() const = 0;
1295 
1296  private:
1301 
1302  protected:
1306  virtual ~NamedPluginReceiverInfo();
1307  };
1308 
1313  class AP_ENGINE_CLIENT_API NamedEventTypeInfo : public NameInfo {
1314 
1315  public:
1319  virtual unsigned int getNumEventTemplates() const = 0;
1320 
1321  private:
1325  NamedEventTypeInfo& operator= (const NamedEventTypeInfo&);
1326 
1327  protected:
1331  virtual ~NamedEventTypeInfo();
1332  };
1333 
1338  class AP_ENGINE_CLIENT_API NamedTimerInfo : public NameInfo {
1339 
1340  public:
1344  virtual unsigned int getNumTimers() const = 0;
1345 
1346  private:
1350  NamedTimerInfo& operator= (const NamedTimerInfo&);
1351 
1352  protected:
1354  NamedTimerInfo();
1356  virtual ~NamedTimerInfo();
1357  };
1358 
1364  class AP_ENGINE_CLIENT_API NamedAggregateInfo : public NameInfo {
1365 
1366  private:
1370  NamedAggregateInfo& operator= (const NamedAggregateInfo&);
1371 
1372  protected:
1376  virtual ~NamedAggregateInfo();
1377  };
1378 
1391  class AP_ENGINE_CLIENT_API EngineInfo
1392  {
1393  friend AP_ENGINE_CLIENT_API void deleteInfo(EngineInfo* info);
1394 
1395  public:
1399  virtual unsigned int getNumMonitors() const = 0;
1400 
1404  virtual unsigned int getNumJavaApplications() const = 0;
1405 
1409  virtual unsigned int getNumEventTypes() const = 0;
1410 
1414  virtual unsigned int getNumTimers() const = 0;
1415 
1419  virtual unsigned int getNumAggregates() const = 0;
1420 
1428  virtual NamedMonitorInfo** getMonitors() const = 0;
1429 
1437  virtual NamedJavaApplicationInfo** getJavaApplications() const = 0;
1438 
1446  virtual NamedEventTypeInfo** getEventTypes() const = 0;
1447 
1455  virtual NamedTimerInfo** getTimers() const = 0;
1456 
1464  virtual NamedAggregateInfo** getAggregates() const = 0;
1465 
1469  virtual unsigned int getNumContexts() const = 0;
1470 
1478  virtual NamedContextInfo** getContexts() const = 0;
1479 
1483  virtual unsigned int getNumReceivers() const = 0;
1484 
1492  virtual NamedReceiverInfo **getReceivers() const = 0;
1493 
1497  virtual unsigned int getNumPluginReceivers() const = 0;
1498 
1506  virtual NamedPluginReceiverInfo **getPluginReceivers() const = 0;
1507 
1508  private:
1510  EngineInfo(const EngineInfo&);
1512  EngineInfo& operator= (const EngineInfo&);
1513 
1514  protected:
1516  EngineInfo();
1518  virtual ~EngineInfo();
1519  };
1520 
1521  class AP_ENGINE_CLIENT_API EngineConnection;
1522 
1539  class AP_ENGINE_CLIENT_API EngineManagement : public com::apama::event::EventConsumer
1540  {
1541  public:
1548  };
1555  virtual void injectMonitorScript(MonitorScript& script) = 0;
1556 
1572  virtual const char* const* injectMonitorScriptWithWarnings(MonitorScript& script) = 0;
1573 
1590  virtual const char* const* injectMonitorScriptWithWarningsFilename(MonitorScript& script, const char *filename) = 0;
1591 
1598  virtual void deleteName(const char * name) = 0;
1599 
1606  virtual void forceDeleteName(const char * name) = 0;
1607 
1614  virtual void killName(const char * name) = 0;
1615 
1619  virtual void deleteAll() = 0;
1620 
1629  virtual void injectJava(const AP_uint8* jarbytes, AP_uint32 size) = 0;
1630 
1647  virtual const char* const* injectJavaWithWarnings(const AP_uint8* jarbytes, AP_uint32 size) = 0;
1648 
1663  virtual const char* const* injectJavaWithWarningsFilename(const AP_uint8* jarbytes, AP_uint32 size, const char *filename) = 0;
1664 
1665 
1675  virtual void injectCDP(const AP_uint8* cdpbytes, AP_uint32 size, const char *filename=NULL) = 0;
1676 
1693  virtual const char* const* injectCDPWithWarnings(const AP_uint8* cdpbytes, AP_uint32 size) = 0;
1694 
1709  virtual const char* const* injectCDPWithWarningsFilename(const AP_uint8* cdpbytes, AP_uint32 size, const char *filename) = 0;
1710 
1716  {
1717  char *errmsg = 0;
1718  AP_EngineStatus *es_api = engineManagement_getStatusOpaque(this, &errmsg);
1719  if (errmsg) {
1720  com::apama::EngineException e(errmsg);
1721  free(errmsg);
1722  throw e;
1723  }
1724 
1725  return EngineStatus(reinterpret_cast<AP_EngineStatus_API *>(es_api));
1726  }
1727 
1751  virtual com::apama::event::EventSupplier* connectEventConsumer(com::apama::event::EventConsumer* consumer, const char* const* channels, bool disconnectSlow) = 0;
1752 
1769  virtual com::apama::event::EventSupplier* connectEventConsumer(com::apama::event::EventConsumer* consumer, const char* const* channels) = 0;
1770 
1793  virtual bool attachAsEventConsumerTo(EngineManagement* target, const char* const* channels, bool disconnectSlow = false, ConnectMode mode = CONNECT_LEGACY) = 0;
1794 
1795 
1818  virtual bool attachAsEventConsumerTo(const char* host, int port, const char* const* channels, bool disconnectSlow = false, ConnectMode mode = CONNECT_LEGACY) = 0;
1819 
1820 
1837  virtual void detachAsEventConsumerFrom(EngineManagement* target, const char* const* channels, ConnectMode mode = CONNECT_LEGACY) = 0;
1838 
1856  virtual void detachAsEventConsumerFrom(const char* host, int port, const char* const* channels, ConnectMode mode = CONNECT_LEGACY) = 0;
1857 
1868  virtual void sendEvents(const com::apama::event::Event* const* events) = 0;
1869 
1877  virtual void sendEventsNoBatching(const com::apama::event::Event* const* events) = 0;
1878 
1882  virtual void flushEvents() = 0;
1883 
1892  virtual EngineInfo* inspectEngine() = 0;
1893 
1910  virtual void ping() = 0;
1911 
1917  virtual bool isConnected() = 0;
1918 
1934  virtual void setReceiverConnections(const std::vector<com::apama::engine::EngineConnection>& connections) = 0;
1935 
1940  virtual const std::vector<com::apama::engine::EngineConnection> getReceiverConnections() = 0;
1941 
1942  protected:
1944  EngineManagement();
1946  virtual ~EngineManagement();
1947 
1948  private:
1952  EngineManagement& operator= (const EngineManagement&);
1953  };
1954 
1959  class AP_ENGINE_CLIENT_API EngineConnection {
1960  private:
1961  std::string host;
1962  int port;
1963  std::vector<std::string> channels;
1964  bool disconnectSlow;
1965  EngineManagement::ConnectMode connectMode;
1966 
1967  void init(const char * host, int port, bool disconnectSlow, EngineManagement::ConnectMode connectMode, const char * const * channels) {
1968  if (host == NULL || channels == NULL) {
1969  throw EngineException("EngineConnection cannot be created with null host or channels");
1970  }
1971  if (port < 0 || port > 65535) {
1972  throw EngineException("EngineConnection cannot be created with invalid port value");
1973  }
1974 
1975  this->host = std::string(host);
1976  this->port = port;
1977  this->disconnectSlow = disconnectSlow;
1978  this->connectMode = connectMode;
1979 
1980  for (const char* const* c = channels; *c != NULL; c++) {
1981  this->channels.push_back(std::string(*c));
1982  }
1983  }
1984 
1985  public:
1996  EngineConnection(const char * host, int port, bool disconnectSlow, EngineManagement::ConnectMode connectMode,
1997  const char * const * channels) {
1998  init(host, port, disconnectSlow, connectMode, channels);
1999  }
2000 
2008  EngineConnection(const char * host, int port, const char * const * channels) {
2009  init(host, port, false, EngineManagement::CONNECT_LEGACY, channels);
2010  }
2011 
2017  virtual const std::vector<std::string>& getChannels() const {
2018  return channels;
2019  }
2020 
2025  virtual const std::string& getHost() const {
2026  return host;
2027  }
2028 
2033  virtual int getPort() const {
2034  return port;
2035  }
2036 
2041  virtual bool getDisconnectSlow() const{
2042  return disconnectSlow;
2043  }
2044 
2050  return connectMode;
2051  }
2052 
2054  inline friend std::ostream& operator << (std::ostream& stream, const EngineConnection& obj) {
2055  std::ostringstream ost;
2056  ost << "EngineConnection to " << obj.host << ":" << obj.port << (obj.disconnectSlow == true ? " diconnectSlow" : "") << " on" <<
2057  (obj.connectMode == EngineManagement::CONNECT_PARALLEL ? " parallel" : "") << " channels [";
2058 
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();
2062  }
2063  ost << "]";
2064  stream << ost.str();
2065  return stream;
2066  }
2067 
2069  inline friend std::ostream& operator << (std::ostream& stream, const EngineConnection* obj) {
2070  stream << *obj;
2071  return stream;
2072  }
2073 
2075  virtual ~EngineConnection() {
2076  }
2077  };
2078 
2085  AP_ENGINE_CLIENT_API void engineInit(const char* processName = "C++ Client");
2086 
2087 
2094  AP_ENGINE_CLIENT_API void engineInitMessaging(const char *processName, bool initMessaging=true);
2095 
2101  AP_ENGINE_CLIENT_API void engineShutdown();
2102 
2103 
2117  AP_ENGINE_CLIENT_API EngineManagement* connectToEngine(const char* host, unsigned short port, bool disconnectSlowReceiver = false);
2118 
2131  AP_ENGINE_CLIENT_API EngineManagement* connectToEngineReceiveOnly(const char* host, unsigned short port);
2132 
2144  AP_ENGINE_CLIENT_API EngineManagement* connectToEngineMonitorOnly(const char* host, unsigned short port);
2145 
2155  AP_ENGINE_CLIENT_API void disconnectFromEngine(EngineManagement* corr);
2156 
2163  AP_ENGINE_CLIENT_API MonitorScript* createMonitorScript(const char* monitorString);
2164 
2170  AP_ENGINE_CLIENT_API void deleteMonitorScript(MonitorScript* mon);
2171 
2181  AP_ENGINE_CLIENT_API void deleteInfo(EngineInfo* info);
2182 
2183 
2191  AP_ENGINE_CLIENT_API void deleteWarnings(const char* const* warnings);
2192 
2205  AP_ENGINE_CLIENT_API void setEngineParams(const char* params);
2206 
2207  } // namespace engine
2208 
2209 } // namespace apama
2210 
2211 } // namespace com
2212 
2213 
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