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
23#include <cms/Message.h>
24#include <string>
25#include <memory>
26
27namespace activemq {
28namespace 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
45 ActiveMQBlobMessage(const ActiveMQBlobMessage&);
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_*/
#define AMQCPP_API
Definition Config.h:30
virtual void copyDataStructure(const DataStructure *src)
Copy the contents of the passed object into this objects members, overwriting any existing data.
bool isDeletedByBroker() const
Gets if this Blob is deleted by the Broker.
Definition ActiveMQBlobMessage.h:122
static const std::string BINARY_MIME_TYPE
Definition ActiveMQBlobMessage.h:41
virtual cms::Message * clone() const
Clone this message exactly, returns a new instance that the caller is required to delete.
virtual ActiveMQBlobMessage * cloneDataStructure() const
Clone this obbject and return a new instance that the caller now owns, this will be an exact copy of ...
virtual std::string toString() const
Returns a string containing the information for this DataStructure such as its type and value of its ...
std::string getName() const
Gets the Name of the Blob.
Definition ActiveMQBlobMessage.h:106
void setRemoteBlobUrl(const std::string &remoteURL)
Set the Remote URL of the Blob.
Definition ActiveMQBlobMessage.h:82
static const unsigned char ID_ACTIVEMQBLOBMESSAGE
Definition ActiveMQBlobMessage.h:40
void setMimeType(const std::string &mimeType)
Set the Mime Type of the Blob.
Definition ActiveMQBlobMessage.h:98
virtual unsigned char getDataStructureType() const
Get the DataStructure Type as defined in CommandTypes.h.
virtual ~ActiveMQBlobMessage()
Definition ActiveMQBlobMessage.h:52
void setDeletedByBroker(bool value)
Sets the Deleted By Broker flag.
Definition ActiveMQBlobMessage.h:130
void setName(const std::string &name)
Sets the Name of the Blob.
Definition ActiveMQBlobMessage.h:114
std::string getRemoteBlobUrl() const
Get the Remote URL of the Blob.
Definition ActiveMQBlobMessage.h:74
virtual bool equals(const DataStructure *value) const
Compares the DataStructure passed in to this one, and returns if they are equivalent.
std::string getMimeType() const
Get the Mime Type of the Blob.
Definition ActiveMQBlobMessage.h:90
ActiveMQMessageTemplate()
Definition ActiveMQMessageTemplate.h:48
Definition DataStructure.h:27
Root of all messages.
Definition Message.h:88
Definition ActiveMQBlobMessage.h:28
Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements.
Definition CachedConsumer.h:24