version 1.18, 2006/08/30 19:39:52
|
version 1.19, 2006/08/30 20:42:30
|
|
|
// | // |
//============================================================================== | //============================================================================== |
// | // |
|
// Author: Chip Vincent (cvincent@us.ibm.com) |
|
// |
|
// Modified By: |
|
// Brian G. Campbell, EMC (campbell_brian@emc.com) - PEP140/phase2 |
|
// Roger Kumpf, Hewlett-Packard Company (roger_kumpf@hp.com) |
|
// |
//%///////////////////////////////////////////////////////////////////////////// | //%///////////////////////////////////////////////////////////////////////////// |
| |
#include "OperationResponseHandler.h" | #include "OperationResponseHandler.h" |
|
|
// to go through. Only operation classes have a response pointer | // to go through. Only operation classes have a response pointer |
void OperationResponseHandler::send(Boolean isComplete) | void OperationResponseHandler::send(Boolean isComplete) |
{ | { |
// It is possible to instantiate this class directly (not a derived |
// some handlers do not send async because their callers cannot handle |
// class, which would also inherit from SimpleResponseHandler). |
// partial responses. If this is the case, stop here. |
// The caller would do this only if the operation does not have any |
|
// data to be returned. |
if (isAsync() == false) |
|
{ |
SimpleResponseHandler* simpleP = |
// preserve tradional behavior |
dynamic_cast<SimpleResponseHandler*>(this); |
if (isComplete == true) |
if (simpleP == 0) |
|
{ | { |
// if there is no data to be returned, then the message should NEVER be |
transfer(); |
// incomplete (even on an error) |
} |
PEGASUS_ASSERT(isComplete); |
|
return; | return; |
} | } |
| |
// some handlers do not send async because their callers cannot handle |
SimpleResponseHandler *simpleP = dynamic_cast<SimpleResponseHandler*>(this); |
// partial responses. If this is the case, stop here. |
|
| |
if (!isAsync()) |
// It is possible to instantiate this class directly (not derived) |
{ |
// The caller would do this only if the operation does not have any data to |
// preserve traditional behavior |
// be returned |
if (isComplete) |
|
|
if (! simpleP) |
{ | { |
if (_response->operationContext.contains( |
// if there is no data to be returned, then the message should NEVER be |
ContentLanguageListContainer::NAME)) |
// incomplete (even on an error) |
|
if (isComplete == false) |
{ | { |
_response->operationContext.set( |
PEGASUS_ASSERT(false); |
ContentLanguageListContainer(simpleP->getLanguages())); |
|
} |
|
transfer(); |
|
} | } |
| |
return; | return; |