activemq-cpp-3.9.5
StompHelper.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_WIREFORMAT_STOMP_MARSHAL_STOMPHELPER_H_
19#define _ACTIVEMQ_WIREFORMAT_STOMP_MARSHAL_STOMPHELPER_H_
20
30#include <decaf/lang/Pointer.h>
31
32namespace activemq {
33namespace wireformat {
34namespace stomp {
35
36 class StompWireFormat;
37
38 using decaf::lang::Pointer;
39 using activemq::commands::Message;
40 using activemq::commands::MessageId;
41 using activemq::commands::ProducerId;
42 using activemq::commands::ConsumerId;
43 using activemq::commands::TransactionId;
44 using activemq::commands::ActiveMQDestination;
45
51 class StompHelper {
52 private:
53
55 StompWireFormat* wireFormat;
56
57 private:
58
59 StompHelper(const StompHelper&);
60 StompHelper& operator=(const StompHelper&);
61
62 public:
63
65
66 virtual ~StompHelper();
67
68 public:
69
77 void convertProperties(const Pointer<StompFrame>& frame, const Pointer<Message>& message);
78
86 void convertProperties(const Pointer<Message>& message, const Pointer<StompFrame>& frame);
87
94 Pointer<ActiveMQDestination> convertDestination(const std::string& destination);
95
102 std::string convertDestination(const Pointer<ActiveMQDestination>& destination);
103
110 std::string convertMessageId(const Pointer<MessageId>& messageId);
111
118 Pointer<MessageId> convertMessageId(const std::string& messageId);
119
126 std::string convertConsumerId(const Pointer<ConsumerId>& consumerId);
127
134 Pointer<ConsumerId> convertConsumerId(const std::string& consumerId);
135
142 std::string convertProducerId(const Pointer<ProducerId>& producerId);
143
150 Pointer<ProducerId> convertProducerId(const std::string& producerId);
151
158 std::string convertTransactionId(const Pointer<TransactionId>& transactionId);
159
166 Pointer<TransactionId> convertTransactionId(const std::string& transactionId);
167
168 };
169
170}}}
171
172#endif /* _ACTIVEMQ_WIREFORMAT_STOMP_MARSHAL_STOMPHELPER_H_ */
This class is used to generate a sequence of long long values that are incremented each time a new va...
Definition LongSequenceGenerator.h:32
std::string convertMessageId(const Pointer< MessageId > &messageId)
Converts a MessageId instance to a Stomp MessageId String.
Pointer< MessageId > convertMessageId(const std::string &messageId)
Converts a Stomp MessageId string to a MessageId.
std::string convertDestination(const Pointer< ActiveMQDestination > &destination)
Converts from a ActiveMQDestination to a Stomp Destination Name.
StompHelper(StompWireFormat *wireFormat)
Pointer< TransactionId > convertTransactionId(const std::string &transactionId)
Converts a Stomp TransactionId string to a TransactionId.
std::string convertConsumerId(const Pointer< ConsumerId > &consumerId)
Converts a ConsumerId instance to a Stomp ConsumerId String.
std::string convertProducerId(const Pointer< ProducerId > &producerId)
Converts a ProducerId instance to a Stomp ProducerId String.
void convertProperties(const Pointer< Message > &message, const Pointer< StompFrame > &frame)
Converts the Properties in a Message Command to Valid Headers and Properties in the StompFrame.
Pointer< ConsumerId > convertConsumerId(const std::string &consumerId)
Converts a Stomp ConsumerId string to a ConsumerId.
Pointer< ActiveMQDestination > convertDestination(const std::string &destination)
Converts from a Stomp Destination to an ActiveMQDestination.
std::string convertTransactionId(const Pointer< TransactionId > &transactionId)
Converts a TransactionId instance to a Stomp TransactionId String.
void convertProperties(const Pointer< StompFrame > &frame, const Pointer< Message > &message)
Converts the Headers in a Stomp Frame into Headers in the given Message Command.
Pointer< ProducerId > convertProducerId(const std::string &producerId)
Converts a Stomp ProducerId string to a ProducerId.
Definition StompWireFormat.h:38
Decaf's implementation of a Smart Pointer that is a template on a Type and is Thread Safe if the defa...
Definition Pointer.h:53
Definition StompCommandConstants.h:29
Definition BaseDataStructure.h:28
Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements.
Definition CachedConsumer.h:24