XRootD
XrdCmsClient.cc
Go to the documentation of this file.
1
/******************************************************************************/
2
/* */
3
/* X r d C m s C l i e n t . c c */
4
/* */
5
/* (c) 2012 by the Board of Trustees of the Leland Stanford, Jr., University */
6
/* All Rights Reserved */
7
/* Produced by Andrew Hanushevsky for Stanford University under contract */
8
/* DE-AC02-76-SFO0515 with the Department of Energy */
9
/* */
10
/* This file is part of the XRootD software suite. */
11
/* */
12
/* XRootD is free software: you can redistribute it and/or modify it under */
13
/* the terms of the GNU Lesser General Public License as published by the */
14
/* Free Software Foundation, either version 3 of the License, or (at your */
15
/* option) any later version. */
16
/* */
17
/* XRootD is distributed in the hope that it will be useful, but WITHOUT */
18
/* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or */
19
/* FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public */
20
/* License for more details. */
21
/* */
22
/* You should have received a copy of the GNU Lesser General Public License */
23
/* along with XRootD in a file called COPYING.LESSER (LGPL license) and file */
24
/* COPYING (GPL license). If not, see <http://www.gnu.org/licenses/>. */
25
/* */
26
/* The copyright holder's institutional names and contributor's names may not */
27
/* be used to endorse or promote products derived from this software without */
28
/* specific prior written permission of the institution or contributor. */
29
/******************************************************************************/
30
31
#include "
XrdCms/XrdCmsClient.hh
"
32
#include "
XrdCms/XrdCmsFinder.hh
"
33
34
/******************************************************************************/
35
/* G e t D e f a u l t C l i e n t */
36
/******************************************************************************/
37
38
namespace
XrdCms
39
{
40
XrdCmsClient
*
GetDefaultClient
(
XrdSysLogger
*
Logger
,
41
int
opMode,
42
int
myPort
43
)
44
{
45
// Determine which client to generate for the caller. This function is
46
// provided as an ABI-compatible interface to obtaining a default client.
47
//
48
if
(opMode &
IsRedir
)
49
return
(
XrdCmsClient
*)
new
XrdCmsFinderRMT
(
Logger
, opMode, myPort);
50
if
(opMode &
IsTarget
)
51
return
(
XrdCmsClient
*)
new
XrdCmsFinderTRG
(
Logger
, opMode, myPort);
52
return
0;
53
}
54
};
XrdCmsClient.hh
XrdCmsFinder.hh
XrdCmsClient
Definition:
XrdCmsClient.hh:116
XrdCmsFinderRMT
Definition:
XrdCmsFinder.hh:54
XrdCmsFinderTRG
Definition:
XrdCmsFinder.hh:123
XrdSysLogger
Definition:
XrdSysLogger.hh:53
XrdCms
Definition:
YProtocol.hh:78
XrdCms::GetDefaultClient
XrdCmsClient * GetDefaultClient(XrdSysLogger *Logger, int opMode, int myPort)
Definition:
XrdCmsClient.cc:40
XrdCms::IsTarget
@ IsTarget
The role is server and will be a redirection target.
Definition:
XrdCmsClient.hh:382
XrdCms::IsRedir
@ IsRedir
The role is manager and will redirect users.
Definition:
XrdCmsClient.hh:381
XrdGlobal::Logger
XrdSysLogger Logger
Definition:
XrdGlobals.cc:47
XrdCms
XrdCmsClient.cc
Generated by
1.9.1