fintp_base
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
MqWatcher.h
Go to the documentation of this file.
1 /*
2 * FinTP - Financial Transactions Processing Application
3 * Copyright (C) 2013 Business Information Systems (Allevo) S.R.L.
4 *
5 * This program is free software: you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation, either version 3 of the License, or
8 * (at your option) any later version.
9 *
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
14 *
15 * You should have received a copy of the GNU General Public License
16 * along with this program. If not, see <http://www.gnu.org/licenses/>
17 * or contact Allevo at : 031281 Bucuresti, 23C Calea Vitan, Romania,
18 * phone +40212554577, office@allevo.ro <mailto:office@allevo.ro>, www.allevo.ro.
19 */
20 
21 #ifndef MQWATCHER_H
22 #define MQWATCHER_H
23 
24 #include <string>
25 #include <pthread.h>
26 
27 #include "../DllMain.h"
28 #include "../AbstractWatcher.h"
29 #include "../InstrumentedObject.h"
30 #include "TransportHelper.h"
31 
32 using namespace std;
33 
34 namespace FinTP
35 {
37  {
38  public :
39 
41  {
42  NotifyGroups = 1,
43  NotifyMessage = 2,
44  NotifyUnique = 4
45  };
46 
47  explicit MqWatcher( NotificationPool* notificationPool, const string& queue = "", const string& queueManager = "", const string& channelDefinition = "", const string& connectionString = "" );
48 
49  ~MqWatcher();
50 
51  void setHelperType ( const TransportHelper::TRANSPORT_HELPER_TYPE& helperType );
52  void setQueue( const string& queue );
53  void setQueueManager( const string& queue );
54  void setTransportURI( const string& transportURI );
55  void setWatchOptions( int options ) { m_WatchOptions = options; }
56 
57  void setSSLCypherSpec( const string& cypherSpec ) { m_SSLCypherSpec = cypherSpec; }
58  void setSSLPeerName( const string& peerName ) { m_SSLPeerName = peerName; }
59  void setSSLKeyRepository( const string& keyRepository ) { m_SSLKeyRepos = keyRepository; }
60 
61  protected :
62 
63  void internalScan();
64 
65  private :
66 
68  string m_Queue, m_QueueManager, m_TransportURI;
69  string m_SSLKeyRepos, m_SSLCypherSpec, m_SSLPeerName;
70  TransportHelper::TRANSPORT_HELPER_TYPE m_HelperType;
71  };
72 }
73 
74 #endif //MQWATCHER_H