Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
Event.h
Go to the documentation of this file.
1 /*
2  *
3  * Licensed to the Apache Software Foundation (ASF) under one
4  * or more contributor license agreements. See the NOTICE file
5  * distributed with this work for additional information
6  * regarding copyright ownership. The ASF licenses this file
7  * to you under the Apache License, Version 2.0 (the
8  * "License"); you may not use this file except in compliance
9  * with the License. You may obtain a copy of the License at
10  *
11  * http://www.apache.org/licenses/LICENSE-2.0
12  *
13  * Unless required by applicable law or agreed to in writing,
14  * software distributed under the License is distributed on an
15  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16  * KIND, either express or implied. See the License for the
17  * specific language governing permissions and limitations
18  * under the License.
19  *
20  */
21 #ifndef _QPID_CONSOLE_EVENT_H_
22 #define _QPID_CONSOLE_EVENT_H_
23 
25 #include "qpid/console/Object.h"
26 #include "qpid/framing/Uuid.h"
28 
29 namespace qpid {
30 namespace framing {
31  class Buffer;
32 }
33 namespace console {
34 
35  class Broker;
36  struct SchemaClass;
37  class ClassKey;
38 
43  class Event {
44  public:
45  typedef enum {
48  } Severity;
49 
51  SchemaClass* schemaClass,
52  framing::Buffer& buffer);
53  Broker* getBroker() const { return broker; }
55  SchemaClass* getSchema() const { return schema; }
56  const Object::AttributeMap& getAttributes() const { return attributes; }
57  uint64_t getTimestamp() const { return timestamp; }
58  uint8_t getSeverity() const { return severity; }
59  QPID_CONSOLE_EXTERN std::string getSeverityString() const;
60 
61  QPID_CONSOLE_EXTERN ObjectId attrRef(const std::string& key) const;
62  QPID_CONSOLE_EXTERN uint32_t attrUint(const std::string& key) const;
63  QPID_CONSOLE_EXTERN int32_t attrInt(const std::string& key) const;
64  QPID_CONSOLE_EXTERN uint64_t attrUint64(const std::string& key) const;
65  QPID_CONSOLE_EXTERN int64_t attrInt64(const std::string& key) const;
66  QPID_CONSOLE_EXTERN std::string attrString(const std::string& key) const;
67  QPID_CONSOLE_EXTERN bool attrBool(const std::string& key) const;
68  QPID_CONSOLE_EXTERN float attrFloat(const std::string& key) const;
69  QPID_CONSOLE_EXTERN double attrDouble(const std::string& key) const;
70  QPID_CONSOLE_EXTERN framing::Uuid attrUuid(const std::string& key) const;
71  QPID_CONSOLE_EXTERN framing::FieldTable attrMap(const std::string& key) const;
72 
73  private:
74  Broker* broker;
75  SchemaClass* schema;
76  uint64_t timestamp;
77  Severity severity;
78  Object::AttributeMap attributes;
79  };
80 
81  QPID_CONSOLE_EXTERN std::ostream& operator<<(std::ostream& o, const Event& event);
82 }
83 }
84 
85 
86 #endif
std::string attrString(const std::string &key) const
uint64_t attrUint64(const std::string &key) const
Event(Broker *broker, SchemaClass *schemaClass, framing::Buffer &buffer)
#define QPID_CONSOLE_EXTERN
std::ostream & operator<<(std::ostream &o, const Agent &agent)
std::string getSeverityString() const
int int32_t
Definition: IntegerTypes.h:28
Broker * getBroker() const
Definition: Event.h:53
double attrDouble(const std::string &key) const
uint64_t getTimestamp() const
Definition: Event.h:57
unsigned int uint32_t
Definition: IntegerTypes.h:27
ObjectId attrRef(const std::string &key) const
SchemaClass * getSchema() const
Definition: Event.h:55
int64_t attrInt64(const std::string &key) const
unsigned char uint8_t
Definition: IntegerTypes.h:24
A UUID is represented as a boost::array of 16 bytes.
Definition: Uuid.h:44
uint32_t attrUint(const std::string &key) const
const ClassKey & getClassKey() const
const Object::AttributeMap & getAttributes() const
Definition: Event.h:56
framing::FieldTable attrMap(const std::string &key) const
A set of name-value pairs.
Definition: FieldTable.h:53
float attrFloat(const std::string &key) const
framing::Uuid attrUuid(const std::string &key) const
int32_t attrInt(const std::string &key) const
bool attrBool(const std::string &key) const
uint8_t getSeverity() const
Definition: Event.h:58

Qpid C++ API Reference
Generated on Tue Aug 19 2014 for Qpid C++ Client API by doxygen 1.8.7