|
||||
File indexing completed on 2025-01-18 10:15:36
0001 //------------------------------------------------------------------------------ 0002 // Copyright (c) 2013 by European Organization for Nuclear Research (CERN) 0003 // Author: Lukasz Janyst <ljanyst@cern.ch> 0004 //------------------------------------------------------------------------------ 0005 // XRootD is free software: you can redistribute it and/or modify 0006 // it under the terms of the GNU Lesser General Public License as published by 0007 // the Free Software Foundation, either version 3 of the License, or 0008 // (at your option) any later version. 0009 // 0010 // XRootD is distributed in the hope that it will be useful, 0011 // but WITHOUT ANY WARRANTY; without even the implied warranty of 0012 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 0013 // GNU General Public License for more details. 0014 // 0015 // You should have received a copy of the GNU Lesser General Public License 0016 // along with XRootD. If not, see <http://www.gnu.org/licenses/>. 0017 //------------------------------------------------------------------------------ 0018 0019 #ifndef __XRD_CL_RESPONSE_JOB_HH__ 0020 #define __XRD_CL_RESPONSE_JOB_HH__ 0021 0022 #include "XrdCl/XrdClJobManager.hh" 0023 #include "XrdCl/XrdClXRootDResponses.hh" 0024 0025 namespace XrdCl 0026 { 0027 //---------------------------------------------------------------------------- 0028 //! Call the user callback 0029 //---------------------------------------------------------------------------- 0030 class ResponseJob: public Job 0031 { 0032 public: 0033 //------------------------------------------------------------------------ 0034 //! Constructor 0035 //------------------------------------------------------------------------ 0036 ResponseJob( ResponseHandler *handler, 0037 XRootDStatus *status, 0038 AnyObject *response, 0039 HostList *hostList ): 0040 pHandler( handler ), pStatus( status ), pResponse( response ), 0041 pHostList( hostList ) 0042 { 0043 } 0044 0045 //------------------------------------------------------------------------ 0046 //! Destructor 0047 //------------------------------------------------------------------------ 0048 virtual ~ResponseJob() 0049 { 0050 } 0051 0052 0053 //------------------------------------------------------------------------ 0054 //! Run the user handler 0055 //------------------------------------------------------------------------ 0056 virtual void Run( void *arg ) 0057 { 0058 pHandler->HandleResponseWithHosts( pStatus, pResponse, pHostList ); 0059 delete this; 0060 } 0061 0062 private: 0063 ResponseHandler *pHandler; 0064 XRootDStatus *pStatus; 0065 AnyObject *pResponse; 0066 HostList *pHostList; 0067 }; 0068 } 0069 0070 #endif // __XRD_CL_RESPONSE_JOB_HH__
[ Source navigation ] | [ Diff markup ] | [ Identifier search ] | [ general search ] |
This page was automatically generated by the 2.3.7 LXR engine. The LXR team |