1 karl 1.12 //%2006////////////////////////////////////////////////////////////////////////
|
2 kumpf 1.1 //
|
3 karl 1.9 // Copyright (c) 2000, 2001, 2002 BMC Software; Hewlett-Packard Development
4 // Company, L.P.; IBM Corp.; The Open Group; Tivoli Systems.
5 // Copyright (c) 2003 BMC Software; Hewlett-Packard Development Company, L.P.;
|
6 karl 1.8 // IBM Corp.; EMC Corporation, The Open Group.
|
7 karl 1.9 // Copyright (c) 2004 BMC Software; Hewlett-Packard Development Company, L.P.;
8 // IBM Corp.; EMC Corporation; VERITAS Software Corporation; The Open Group.
|
9 karl 1.10 // Copyright (c) 2005 Hewlett-Packard Development Company, L.P.; IBM Corp.;
10 // EMC Corporation; VERITAS Software Corporation; The Open Group.
|
11 karl 1.12 // Copyright (c) 2006 Hewlett-Packard Development Company, L.P.; IBM Corp.;
12 // EMC Corporation; Symantec Corporation; The Open Group.
|
13 kumpf 1.1 //
14 // Permission is hereby granted, free of charge, to any person obtaining a copy
15 // of this software and associated documentation files (the "Software"), to
16 // deal in the Software without restriction, including without limitation the
17 // rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
18 // sell copies of the Software, and to permit persons to whom the Software is
19 // furnished to do so, subject to the following conditions:
|
20 kumpf 1.3 //
|
21 kumpf 1.1 // THE ABOVE COPYRIGHT NOTICE AND THIS PERMISSION NOTICE SHALL BE INCLUDED IN
22 // ALL COPIES OR SUBSTANTIAL PORTIONS OF THE SOFTWARE. THE SOFTWARE IS PROVIDED
23 // "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT
24 // LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
25 // PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
26 // HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
27 // ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
28 // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
29 //
|
30 kumpf 1.3 //==============================================================================
|
31 kumpf 1.1 //
32 //%////////////////////////////////////////////////////////////////////////////
33
34
35 #ifndef ShutdownProvider_h
36 #define ShutdownProvider_h
37
38 ///////////////////////////////////////////////////////////////////////////////
39 // Shutdown Provider
40 ///////////////////////////////////////////////////////////////////////////////
41
42 #include <Pegasus/Common/Config.h>
43 #include <Pegasus/Common/Tracer.h>
44
45 #include <Pegasus/Provider/CIMMethodProvider.h>
46 #include <Pegasus/Server/ShutdownService.h>
|
47 kumpf 1.4 #include <Pegasus/Server/Linkage.h>
|
48 kumpf 1.1
49 PEGASUS_NAMESPACE_BEGIN
50
51 /**
52 The ShutdownProvider is a method provider that implements the shutdown
53 method in the PG_ShutdownService class. It provides response to the
54 shutdown request from clients to shutdown cimom gracefully.
55 */
|
56 kumpf 1.14 class PEGASUS_SERVER_LINKAGE ShutdownProvider : public CIMMethodProvider
|
57 kumpf 1.1 {
58 public:
59
60 /** Constructor */
61 ShutdownProvider(CIMServer* cimserver)
62 {
63 PEG_METHOD_ENTER(TRC_SHUTDOWN, "ShutdownProvider::ShutdownProvider");
64
65 //
66 // get an instance of the Shutdown Service
67 //
68 _shutdownService = ShutdownService::getInstance(cimserver);
69
70 PEG_METHOD_EXIT();
71 }
72
73 /** Destructor */
74 virtual ~ShutdownProvider()
75 {
76 PEG_METHOD_ENTER(TRC_SHUTDOWN,"ShutdownProvider::~ShutdownProvider");
77 PEG_METHOD_EXIT();
78 kumpf 1.1 }
79
|
80 kumpf 1.15 // Note: The initialize() and terminate() methods are not called for
81 // Control Providers.
82 void initialize(CIMOMHandle& cimomHandle) { }
83 void terminate() { }
|
84 kumpf 1.1
85 /**
86 Invoke Method. Used to shutdown cimom.
87 */
88 void invokeMethod(
|
89 kumpf 1.14 const OperationContext& context,
90 const CIMObjectPath& objectReference,
91 const CIMName& methodName,
92 const Array<CIMParamValue>& inParameters,
93 MethodResultResponseHandler& handler);
|
94 kumpf 1.1
95 private:
96
97 //
98 // Shutdown Service Instance variable
99 //
|
100 kumpf 1.14 ShutdownService* _shutdownService;
|
101 kumpf 1.1 };
102
103 PEGASUS_NAMESPACE_END
104
105 #endif // ShutdownProvider_h
|