ROOT
v6-32
Reference Guide
Loading...
Searching...
No Matches
XrdClientUnsolMsg.hh
Go to the documentation of this file.
1
#ifndef XRC_UNSOLMSG_H
2
#define XRC_UNSOLMSG_H
3
/******************************************************************************/
4
/* */
5
/* X r d C l i e n t U n s o l M s g . h h */
6
/* */
7
/* Author: Fabrizio Furano (INFN Padova, 2004) */
8
/* Adapted from TXNetFile (root.cern.ch) originally done by */
9
/* Alvise Dorigo, Fabrizio Furano */
10
/* INFN Padova, 2003 */
11
/* */
12
/* This file is part of the XRootD software suite. */
13
/* */
14
/* XRootD is free software: you can redistribute it and/or modify it under */
15
/* the terms of the GNU Lesser General Public License as published by the */
16
/* Free Software Foundation, either version 3 of the License, or (at your */
17
/* option) any later version. */
18
/* */
19
/* XRootD is distributed in the hope that it will be useful, but WITHOUT */
20
/* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or */
21
/* FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public */
22
/* License for more details. */
23
/* */
24
/* You should have received a copy of the GNU Lesser General Public License */
25
/* along with XRootD in a file called COPYING.LESSER (LGPL license) and file */
26
/* COPYING (GPL license). If not, see <http://www.gnu.org/licenses/>. */
27
/* */
28
/* The copyright holder's institutional names and contributor's names may not */
29
/* be used to endorse or promote products derived from this software without */
30
/* specific prior written permission of the institution or contributor. */
31
/******************************************************************************/
32
33
//////////////////////////////////////////////////////////////////////////
34
// //
35
// Base classes for unsolicited msg senders/receivers //
36
// //
37
//////////////////////////////////////////////////////////////////////////
38
39
class
XrdClientMessage
;
40
class
XrdClientUnsolMsgSender
;
41
42
// The processing result for an unsolicited response
43
enum
UnsolRespProcResult
{
44
kUNSOL_CONTINUE
= 0,
// Dispatching must continue to other interested handlers
45
kUNSOL_KEEP
,
// Dispatching ended, but stream still alive (must keep the SID)
46
kUNSOL_DISPOSE
// Dispatching ended, stream no more to be used
47
};
48
49
// Handler
50
51
class
XrdClientAbsUnsolMsgHandler
{
52
public
:
53
54
virtual
~XrdClientAbsUnsolMsgHandler
() { }
55
// To be called when an unsolicited response arrives from the lower layers
56
virtual
UnsolRespProcResult
ProcessUnsolicitedMsg
(
XrdClientUnsolMsgSender
*
sender
,
57
XrdClientMessage
*
unsolmsg
) = 0;
58
59
};
60
61
// Sender
62
63
class
XrdClientUnsolMsgSender
{
64
65
public
:
66
67
virtual
~XrdClientUnsolMsgSender
() { }
68
69
// The upper level handler for unsolicited responses
70
XrdClientAbsUnsolMsgHandler
*
UnsolicitedMsgHandler
;
71
72
inline
UnsolRespProcResult
SendUnsolicitedMsg
(
XrdClientUnsolMsgSender
*
sender
,
XrdClientMessage
*
unsolmsg
) {
73
// We simply send the event
74
if
(
UnsolicitedMsgHandler
)
75
return
(
UnsolicitedMsgHandler
->
ProcessUnsolicitedMsg
(
sender
,
unsolmsg
));
76
77
return
kUNSOL_CONTINUE
;
78
}
79
80
inline
XrdClientUnsolMsgSender
() {
UnsolicitedMsgHandler
= 0; }
81
};
82
#endif
UnsolRespProcResult
UnsolRespProcResult
Definition
XrdClientUnsolMsg.hh:43
kUNSOL_DISPOSE
@ kUNSOL_DISPOSE
Definition
XrdClientUnsolMsg.hh:46
kUNSOL_KEEP
@ kUNSOL_KEEP
Definition
XrdClientUnsolMsg.hh:45
kUNSOL_CONTINUE
@ kUNSOL_CONTINUE
Definition
XrdClientUnsolMsg.hh:44
ROOT::Detail::TRangeCast
Definition
TCollection.h:311
XrdClientAbsUnsolMsgHandler
Definition
XrdClientUnsolMsg.hh:51
XrdClientAbsUnsolMsgHandler::ProcessUnsolicitedMsg
virtual UnsolRespProcResult ProcessUnsolicitedMsg(XrdClientUnsolMsgSender *sender, XrdClientMessage *unsolmsg)=0
XrdClientAbsUnsolMsgHandler::~XrdClientAbsUnsolMsgHandler
virtual ~XrdClientAbsUnsolMsgHandler()
Definition
XrdClientUnsolMsg.hh:54
XrdClientMessage
Definition
XrdClientMessage.hh:49
XrdClientUnsolMsgSender
Definition
XrdClientUnsolMsg.hh:63
XrdClientUnsolMsgSender::UnsolicitedMsgHandler
XrdClientAbsUnsolMsgHandler * UnsolicitedMsgHandler
Definition
XrdClientUnsolMsg.hh:70
XrdClientUnsolMsgSender::XrdClientUnsolMsgSender
XrdClientUnsolMsgSender()
Definition
XrdClientUnsolMsg.hh:80
XrdClientUnsolMsgSender::~XrdClientUnsolMsgSender
virtual ~XrdClientUnsolMsgSender()
Definition
XrdClientUnsolMsg.hh:67
XrdClientUnsolMsgSender::SendUnsolicitedMsg
UnsolRespProcResult SendUnsolicitedMsg(XrdClientUnsolMsgSender *sender, XrdClientMessage *unsolmsg)
Definition
XrdClientUnsolMsg.hh:72
proof
xrdinc
XrdClient
XrdClientUnsolMsg.hh
ROOT v6-32 - Reference Guide Generated on Tue Sep 2 2025 04:18:46 (GVA Time) using Doxygen 1.10.0