Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET
Apache Qpid Documentation
Main Page
Modules
Namespaces
Classes
Files
File List
File Members
qpid
client
FailoverListener.h
Go to the documentation of this file.
1
#ifndef QPID_CLIENT_FAILOVERLISTENER_H
2
#define QPID_CLIENT_FAILOVERLISTENER_H
3
4
/*
5
*
6
* Licensed to the Apache Software Foundation (ASF) under one
7
* or more contributor license agreements. See the NOTICE file
8
* distributed with this work for additional information
9
* regarding copyright ownership. The ASF licenses this file
10
* to you under the Apache License, Version 2.0 (the
11
* "License"); you may not use this file except in compliance
12
* with the License. You may obtain a copy of the License at
13
*
14
* http://www.apache.org/licenses/LICENSE-2.0
15
*
16
* Unless required by applicable law or agreed to in writing,
17
* software distributed under the License is distributed on an
18
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
19
* KIND, either express or implied. See the License for the
20
* specific language governing permissions and limitations
21
* under the License.
22
*
23
*/
24
25
#include "
qpid/client/ClientImportExport.h
"
26
#include "
qpid/client/MessageListener.h
"
27
#include "
qpid/client/Connection.h
"
28
#include "
qpid/client/Session.h
"
29
#include "
qpid/client/SubscriptionManager.h
"
30
#include "
qpid/Url.h
"
31
#include "
qpid/sys/Mutex.h
"
32
#include "
qpid/sys/Runnable.h
"
33
#include "
qpid/sys/Thread.h
"
34
#include <vector>
35
36
namespace
qpid {
37
namespace
client
{
38
39
51
class
QPID_CLIENT_CLASS_EXTERN
FailoverListener
:
private
MessageListener
,
private
qpid::sys::Runnable
52
{
53
public
:
55
static
QPID_CLIENT_EXTERN
const
std::string
AMQ_FAILOVER
;
56
58
static
QPID_CLIENT_EXTERN
std::vector<Url> getKnownBrokers(
const
Message
& m);
59
61
QPID_CLIENT_EXTERN
FailoverListener
(
Connection
);
62
67
QPID_CLIENT_EXTERN
FailoverListener
(
Connection
,
bool
useInitial);
68
69
QPID_CLIENT_EXTERN
~
FailoverListener
();
70
72
QPID_CLIENT_EXTERN
std::vector<Url> getKnownBrokers()
const
;
73
74
private
:
75
void
received(
Message
& msg);
76
void
run();
77
void
init(
bool
);
78
79
mutable
sys::Mutex
lock;
80
Connection
connection;
81
Session
session;
82
SubscriptionManager
subscriptions;
83
sys::Thread
thread;
84
std::vector<Url> knownBrokers;
85
};
86
}}
// namespace qpid::client
87
88
#endif
Qpid C++ API Reference
Generated on Thu Nov 15 2012 for Qpid C++ Client API by
1.8.1.2