version 1.18, 2005/02/11 16:47:41
|
version 1.22, 2005/03/11 01:51:56
|
|
|
_normalizer = | _normalizer = |
ObjectNormalizer( | ObjectNormalizer( |
cimClass, | cimClass, |
request->localOnly, |
|
request->includeQualifiers, | request->includeQualifiers, |
request->includeClassOrigin); | request->includeClassOrigin); |
#endif | #endif |
} | } |
| |
#ifdef PEGASUS_ENABLE_OBJECT_NORMALIZATION |
|
virtual void deliver(const CIMInstance & cimInstance) | virtual void deliver(const CIMInstance & cimInstance) |
{ | { |
// Normalize (if seeded, otherwise do nothing) and pass to subclass method for delivery. |
if(cimInstance.isUninitialized()) |
SimpleInstanceResponseHandler::deliver(_normalizer.processInstance(cimInstance)); |
{ |
|
MessageLoaderParms message( |
|
"Common.Exception.UNINITIALIZED_OBJECT_EXCEPTION", |
|
"The object is not initialized."); |
|
|
|
throw CIMException(CIM_ERR_FAILED, message); |
} | } |
|
|
|
#ifdef PEGASUS_ENABLE_OBJECT_NORMALIZATION |
|
SimpleInstanceResponseHandler::deliver(_normalizer.processInstance(cimInstance)); |
|
#else |
|
SimpleInstanceResponseHandler::deliver(cimInstance); |
#endif | #endif |
|
} |
| |
protected: | protected: |
virtual String getClass(void) const | virtual String getClass(void) const |
|
|
_normalizer = | _normalizer = |
ObjectNormalizer( | ObjectNormalizer( |
cimClass, | cimClass, |
request->localOnly, |
|
request->includeQualifiers, | request->includeQualifiers, |
request->includeClassOrigin); | request->includeClassOrigin); |
#endif | #endif |
} | } |
| |
#ifdef PEGASUS_ENABLE_OBJECT_NORMALIZATION |
|
virtual void deliver(const CIMInstance & cimInstance) | virtual void deliver(const CIMInstance & cimInstance) |
{ | { |
// Normalize (if seeded, otherwise do nothing) and pass to subclass method for delivery. |
if(cimInstance.isUninitialized()) |
SimpleInstanceResponseHandler::deliver(_normalizer.processInstance(cimInstance)); |
{ |
|
MessageLoaderParms message( |
|
"Common.Exception.UNINITIALIZED_OBJECT_EXCEPTION", |
|
"The object is not initialized."); |
|
|
|
throw CIMException(CIM_ERR_FAILED, message); |
} | } |
|
|
|
#ifdef PEGASUS_ENABLE_OBJECT_NORMALIZATION |
|
SimpleInstanceResponseHandler::deliver(_normalizer.processInstance(cimInstance)); |
|
#else |
|
SimpleInstanceResponseHandler::deliver(cimInstance); |
#endif | #endif |
|
} |
| |
protected: | protected: |
virtual String getClass(void) const | virtual String getClass(void) const |
|
|
ObjectNormalizer( | ObjectNormalizer( |
cimClass, | cimClass, |
false, | false, |
false, |
|
false); | false); |
#endif | #endif |
} | } |
| |
#ifdef PEGASUS_ENABLE_OBJECT_NORMALIZATION |
|
virtual void deliver(const CIMObjectPath & cimObjectPath) | virtual void deliver(const CIMObjectPath & cimObjectPath) |
{ | { |
// Normalize (if seeded, otherwise do nothing) and pass to subclass method for delivery. |
if(cimObjectPath.getClassName().isNull()) |
SimpleObjectPathResponseHandler::deliver(_normalizer.processInstanceObjectPath(cimObjectPath)); |
{ |
|
MessageLoaderParms message( |
|
"Common.Exception.UNINITIALIZED_OBJECT_EXCEPTION", |
|
"The object is not initialized."); |
|
|
|
throw CIMException(CIM_ERR_FAILED, message); |
} | } |
|
|
|
#ifdef PEGASUS_ENABLE_OBJECT_NORMALIZATION |
|
SimpleObjectPathResponseHandler::deliver(_normalizer.processInstanceObjectPath(cimObjectPath)); |
|
#else |
|
SimpleObjectPathResponseHandler::deliver(cimObjectPath); |
#endif | #endif |
|
} |
| |
protected: | protected: |
virtual String getClass(void) const | virtual String getClass(void) const |
|
|
{ | { |
} | } |
| |
|
virtual void deliver(const CIMObjectPath & cimObjectPath) |
|
{ |
|
if(cimObjectPath.getClassName().isNull()) |
|
{ |
|
MessageLoaderParms message( |
|
"Common.Exception.UNINITIALIZED_OBJECT_EXCEPTION", |
|
"The object is not initialized."); |
|
|
|
throw CIMException(CIM_ERR_FAILED, message); |
|
} |
|
|
|
SimpleObjectPathResponseHandler::deliver(cimObjectPath); |
|
} |
|
|
protected: | protected: |
virtual String getClass(void) const | virtual String getClass(void) const |
{ | { |
|
|
{ | { |
} | } |
| |
|
virtual void deliver(const CIMValue & cimValue) |
|
{ |
|
if(cimValue.isNull()) |
|
{ |
|
MessageLoaderParms message( |
|
"Common.Exception.UNINITIALIZED_OBJECT_EXCEPTION", |
|
"The object is not initialized."); |
|
|
|
throw CIMException(CIM_ERR_FAILED, message); |
|
} |
|
|
|
SimpleValueResponseHandler::deliver(cimValue); |
|
} |
|
|
protected: | protected: |
virtual String getClass(void) const | virtual String getClass(void) const |
{ | { |
|
|
{ | { |
} | } |
| |
|
virtual void deliver(const CIMInstance & cimInstance) |
|
{ |
|
if(cimInstance.isUninitialized()) |
|
{ |
|
MessageLoaderParms message( |
|
"Common.Exception.UNINITIALIZED_OBJECT_EXCEPTION", |
|
"The object is not initialized."); |
|
|
|
throw CIMException(CIM_ERR_FAILED, message); |
|
} |
|
|
|
SimpleInstance2ObjectResponseHandler::deliver(cimInstance); |
|
} |
|
|
protected: | protected: |
virtual String getClass(void) const | virtual String getClass(void) const |
{ | { |
|
|
{ | { |
} | } |
| |
|
virtual void deliver(const CIMObject & cimObject) |
|
{ |
|
if(cimObject.isUninitialized()) |
|
{ |
|
MessageLoaderParms message( |
|
"Common.Exception.UNINITIALIZED_OBJECT_EXCEPTION", |
|
"The object is not initialized."); |
|
|
|
throw CIMException(CIM_ERR_FAILED, message); |
|
} |
|
|
|
SimpleObjectResponseHandler::deliver(cimObject); |
|
} |
|
|
protected: | protected: |
virtual String getClass(void) const | virtual String getClass(void) const |
{ | { |
|
|
{ | { |
} | } |
| |
|
virtual void deliver(const CIMObjectPath & cimObjectPath) |
|
{ |
|
if(cimObjectPath.getClassName().isNull()) |
|
{ |
|
MessageLoaderParms message( |
|
"Common.Exception.UNINITIALIZED_OBJECT_EXCEPTION", |
|
"The object is not initialized."); |
|
|
|
throw CIMException(CIM_ERR_FAILED, message); |
|
} |
|
|
|
SimpleObjectPathResponseHandler::deliver(cimObjectPath); |
|
} |
|
|
protected: | protected: |
virtual String getClass(void) const | virtual String getClass(void) const |
{ | { |
|
|
{ | { |
} | } |
| |
|
virtual void deliver(const CIMObject & cimObject) |
|
{ |
|
if(cimObject.isUninitialized()) |
|
{ |
|
MessageLoaderParms message( |
|
"Common.Exception.UNINITIALIZED_OBJECT_EXCEPTION", |
|
"The object is not initialized."); |
|
|
|
throw CIMException(CIM_ERR_FAILED, message); |
|
} |
|
|
|
SimpleObjectResponseHandler::deliver(cimObject); |
|
} |
|
|
protected: | protected: |
virtual String getClass(void) const | virtual String getClass(void) const |
{ | { |
|
|
{ | { |
} | } |
| |
|
virtual void deliver(const CIMObjectPath & cimObjectPath) |
|
{ |
|
if(cimObjectPath.getClassName().isNull()) |
|
{ |
|
MessageLoaderParms message( |
|
"Common.Exception.UNINITIALIZED_OBJECT_EXCEPTION", |
|
"The object is not initialized."); |
|
|
|
throw CIMException(CIM_ERR_FAILED, message); |
|
} |
|
|
|
SimpleObjectPathResponseHandler::deliver(cimObjectPath); |
|
} |
|
|
protected: | protected: |
virtual String getClass(void) const | virtual String getClass(void) const |
{ | { |
|
|
{ | { |
} | } |
| |
|
virtual void deliverParamValue(const CIMParamValue & cimParamValue) |
|
{ |
|
if(cimParamValue.isUninitialized()) |
|
{ |
|
MessageLoaderParms message( |
|
"Common.Exception.UNINITIALIZED_OBJECT_EXCEPTION", |
|
"The object is not initialized."); |
|
|
|
throw CIMException(CIM_ERR_FAILED, message); |
|
} |
|
|
|
SimpleMethodResultResponseHandler::deliverParamValue(cimParamValue); |
|
} |
|
|
|
virtual void deliver(const CIMValue & cimValue) |
|
{ |
|
if(cimValue.isNull()) |
|
{ |
|
MessageLoaderParms message( |
|
"Common.Exception.UNINITIALIZED_OBJECT_EXCEPTION", |
|
"The object is not initialized."); |
|
|
|
throw CIMException(CIM_ERR_FAILED, message); |
|
} |
|
|
|
SimpleMethodResultResponseHandler::deliver(cimValue); |
|
} |
|
|
protected: | protected: |
virtual String getClass(void) const | virtual String getClass(void) const |
{ | { |
|
|
{ | { |
public: | public: |
EnableIndicationsResponseHandler( | EnableIndicationsResponseHandler( |
CIMEnableIndicationsRequestMessage * request, |
CIMRequestMessage * request, |
CIMEnableIndicationsResponseMessage * response, |
CIMResponseMessage * response, |
CIMInstance & provider, | CIMInstance & provider, |
PEGASUS_INDICATION_CALLBACK indicationCallback) | PEGASUS_INDICATION_CALLBACK indicationCallback) |
: OperationResponseHandler(request, response), | : OperationResponseHandler(request, response), |
_request_copy(*request), |
|
_response_copy(*response), |
|
_indicationCallback(indicationCallback) | _indicationCallback(indicationCallback) |
{ | { |
_provider = provider; | _provider = provider; |
|
|
| |
virtual void deliver(const OperationContext & context, const CIMIndication & cimIndication) | virtual void deliver(const OperationContext & context, const CIMIndication & cimIndication) |
{ | { |
|
if(cimIndication.isUninitialized()) |
|
{ |
|
MessageLoaderParms message( |
|
"Common.Exception.UNINITIALIZED_OBJECT_EXCEPTION", |
|
"The object is not initialized."); |
|
|
|
throw CIMException(CIM_ERR_FAILED, message); |
|
} |
|
|
// ATTN: temporarily convert indication to instance | // ATTN: temporarily convert indication to instance |
CIMInstance cimInstance(cimIndication); | CIMInstance cimInstance(cimIndication); |
| |
|
|
} | } |
| |
private: | private: |
CIMEnableIndicationsRequestMessage _request_copy; |
|
CIMEnableIndicationsResponseMessage _response_copy; |
|
PEGASUS_INDICATION_CALLBACK _indicationCallback; | PEGASUS_INDICATION_CALLBACK _indicationCallback; |
| |
}; | }; |