xrootd
Main Page
Namespaces
Classes
Files
File List
File Members
src
XrdCl
XrdClPostMaster.hh
Go to the documentation of this file.
1
//------------------------------------------------------------------------------
2
// Copyright (c) 2011-2012 by European Organization for Nuclear Research (CERN)
3
// Author: Lukasz Janyst <ljanyst@cern.ch>
4
//------------------------------------------------------------------------------
5
// XRootD is free software: you can redistribute it and/or modify
6
// it under the terms of the GNU Lesser 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
// XRootD 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 Lesser General Public License
16
// along with XRootD. If not, see <http://www.gnu.org/licenses/>.
17
//------------------------------------------------------------------------------
18
19
#ifndef __XRD_CL_POST_MASTER_HH__
20
#define __XRD_CL_POST_MASTER_HH__
21
22
#include <stdint.h>
23
#include <map>
24
#include <vector>
25
26
#include "
XrdCl/XrdClStatus.hh
"
27
#include "
XrdCl/XrdClURL.hh
"
28
#include "
XrdCl/XrdClPostMasterInterfaces.hh
"
29
30
#include "
XrdSys/XrdSysPthread.hh
"
31
32
namespace
XrdCl
33
{
34
class
Poller;
35
class
TaskManager;
36
class
Channel;
37
class
JobManager;
38
39
//----------------------------------------------------------------------------
41
//----------------------------------------------------------------------------
42
class
PostMaster
43
{
44
public
:
45
//------------------------------------------------------------------------
47
//------------------------------------------------------------------------
48
PostMaster
();
49
50
//------------------------------------------------------------------------
52
//------------------------------------------------------------------------
53
virtual
~PostMaster
();
54
55
//------------------------------------------------------------------------
57
//------------------------------------------------------------------------
58
bool
Initialize
();
59
60
//------------------------------------------------------------------------
62
//------------------------------------------------------------------------
63
bool
Finalize
();
64
65
//------------------------------------------------------------------------
67
//------------------------------------------------------------------------
68
bool
Start
();
69
70
//------------------------------------------------------------------------
72
//------------------------------------------------------------------------
73
bool
Stop
();
74
75
//------------------------------------------------------------------------
77
//------------------------------------------------------------------------
78
bool
Reinitialize
();
79
80
//------------------------------------------------------------------------
94
//------------------------------------------------------------------------
95
Status
Send
(
const
URL
&url,
96
Message
*msg,
97
bool
stateful,
98
time_t expires );
99
100
//------------------------------------------------------------------------
116
//------------------------------------------------------------------------
117
Status
Send
(
const
URL
&url,
118
Message
*msg,
119
OutgoingMsgHandler
*handler,
120
bool
stateful,
121
time_t expires );
122
123
//------------------------------------------------------------------------
134
//------------------------------------------------------------------------
135
Status
Receive
(
const
URL
&url,
136
Message
*&msg,
137
MessageFilter
*filter,
138
time_t expires );
139
140
//------------------------------------------------------------------------
148
//------------------------------------------------------------------------
149
Status
Receive
(
const
URL
&url,
150
IncomingMsgHandler
*handler,
151
time_t expires );
152
153
//------------------------------------------------------------------------
161
//------------------------------------------------------------------------
162
Status
QueryTransport
(
const
URL
&url,
163
uint16_t query,
164
AnyObject
&result );
165
166
//------------------------------------------------------------------------
168
//------------------------------------------------------------------------
169
Status
RegisterEventHandler
(
const
URL
&url,
170
ChannelEventHandler
*handler );
171
172
//------------------------------------------------------------------------
174
//------------------------------------------------------------------------
175
Status
RemoveEventHandler
(
const
URL
&url,
176
ChannelEventHandler
*handler );
177
178
//------------------------------------------------------------------------
180
//------------------------------------------------------------------------
181
TaskManager *
GetTaskManager
()
182
{
183
return
pTaskManager
;
184
}
185
186
//------------------------------------------------------------------------
188
//------------------------------------------------------------------------
189
JobManager *
GetJobManager
()
190
{
191
return
pJobManager
;
192
}
193
194
private
:
195
Channel *
GetChannel
(
const
URL
&url );
196
197
typedef
std::map<std::string, Channel*>
ChannelMap
;
198
Poller *
pPoller
;
199
TaskManager *
pTaskManager
;
200
ChannelMap
pChannelMap
;
201
XrdSysMutex
pChannelMapMutex
;
202
bool
pInitialized
;
203
JobManager *
pJobManager
;
204
};
205
}
206
207
#endif // __XRD_CL_POST_MASTER_HH__
Generated by
1.8.3.1