activemq-cpp-3.9.5
ActiveMQBlobMessage.h
Go to the documentation of this file.
1 /*
2  * Licensed to the Apache Software Foundation (ASF) under one or more
3  * contributor license agreements. See the NOTICE file distributed with
4  * this work for additional information regarding copyright ownership.
5  * The ASF licenses this file to You under the Apache License, Version 2.0
6  * (the "License"); you may not use this file except in compliance with
7  * the License. You may obtain a copy of the License at
8  *
9  * http://www.apache.org/licenses/LICENSE-2.0
10  *
11  * Unless required by applicable law or agreed to in writing, software
12  * distributed under the License is distributed on an "AS IS" BASIS,
13  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14  * See the License for the specific language governing permissions and
15  * limitations under the License.
16  */
17 
18 #ifndef _ACTIVEMQ_COMMANDS_ACTIVEMQBLOBMESSAGE_H_
19 #define _ACTIVEMQ_COMMANDS_ACTIVEMQBLOBMESSAGE_H_
20 
21 #include <activemq/util/Config.h>
23 #include <cms/Message.h>
24 #include <string>
25 #include <memory>
26 
27 namespace activemq {
28 namespace commands {
29 
30  class AMQCPP_API ActiveMQBlobMessage : public ActiveMQMessageTemplate< cms::Message > {
31  private:
32 
33  std::string remoteBlobUrl;
34  std::string mimeType;
35  std::string name;
36  bool deletedByBroker;
37 
38  public:
39 
40  static const unsigned char ID_ACTIVEMQBLOBMESSAGE;
41  static const std::string BINARY_MIME_TYPE;
42 
43  private:
44 
46  ActiveMQBlobMessage& operator=(const ActiveMQBlobMessage&);
47 
48  public:
49 
51 
52  virtual ~ActiveMQBlobMessage() throw() {}
53 
54  virtual unsigned char getDataStructureType() const;
55 
56  virtual ActiveMQBlobMessage* cloneDataStructure() const;
57 
58  virtual void copyDataStructure(const DataStructure* src);
59 
60  virtual std::string toString() const;
61 
62  virtual bool equals(const DataStructure* value) const;
63 
64  public: // CMS Message
65 
66  virtual cms::Message* clone() const;
67 
68  public: // CMS BlobMessage
69 
74  std::string getRemoteBlobUrl() const {
75  return this->remoteBlobUrl;
76  }
77 
82  void setRemoteBlobUrl( const std::string& remoteURL ) {
83  this->remoteBlobUrl = remoteURL;
84  }
85 
90  std::string getMimeType() const {
91  return this->mimeType;
92  }
93 
98  void setMimeType( const std::string& mimeType ) {
99  this->mimeType = mimeType;
100  }
101 
106  std::string getName() const {
107  return this->name;
108  }
109 
114  void setName( const std::string& name ) {
115  this->name = name;
116  }
117 
122  bool isDeletedByBroker() const {
123  return this->deletedByBroker;
124  }
125 
130  void setDeletedByBroker( bool value ) {
131  this->deletedByBroker = value;
132  }
133 
134  };
135 
136 }}
137 
138 #endif /*_ACTIVEMQ_COMMANDS_ACTIVEMQBLOBMESSAGE_H_*/
static const unsigned char ID_ACTIVEMQBLOBMESSAGE
Definition: ActiveMQBlobMessage.h:40
static const std::string BINARY_MIME_TYPE
Definition: ActiveMQBlobMessage.h:41
Root of all messages.
Definition: Message.h:88
#define AMQCPP_API
Definition: Config.h:30
std::string getRemoteBlobUrl() const
Get the Remote URL of the Blob.
Definition: ActiveMQBlobMessage.h:74
bool isDeletedByBroker() const
Gets if this Blob is deleted by the Broker.
Definition: ActiveMQBlobMessage.h:122
void setMimeType(const std::string &mimeType)
Set the Mime Type of the Blob.
Definition: ActiveMQBlobMessage.h:98
std::string getMimeType() const
Get the Mime Type of the Blob.
Definition: ActiveMQBlobMessage.h:90
Definition: DataStructure.h:27
void setRemoteBlobUrl(const std::string &remoteURL)
Set the Remote URL of the Blob.
Definition: ActiveMQBlobMessage.h:82
Definition: ActiveMQBlobMessage.h:30
void setDeletedByBroker(bool value)
Sets the Deleted By Broker flag.
Definition: ActiveMQBlobMessage.h:130
std::string getName() const
Gets the Name of the Blob.
Definition: ActiveMQBlobMessage.h:106
virtual ~ActiveMQBlobMessage()
Definition: ActiveMQBlobMessage.h:52
void setName(const std::string &name)
Sets the Name of the Blob.
Definition: ActiveMQBlobMessage.h:114
Definition: ActiveMQMessageTemplate.h:41