OW_NAMESPACE::RequestHandlerIFC Class Reference

This is an abstract base class for a CIM product requiring a HTTP Server. More...

#include <OW_RequestHandlerIFC.hpp>

Inheritance diagram for OW_NAMESPACE::RequestHandlerIFC:

Inheritance graph
[legend]
Collaboration diagram for OW_NAMESPACE::RequestHandlerIFC:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 RequestHandlerIFC ()
virtual ~RequestHandlerIFC ()
void process (std::istream *istr, std::ostream *ostrEntity, std::ostream *ostrError, OperationContext &context)
 The HTTP server calls this once all HTTP headers have been processed and removed from the input stream.
bool hasError (Int32 &errCode, String &errDescr)
 Did an error occur during process()? (should ostrEntity be sent back, or osrtError?).
bool hasError ()
void options (CIMFeatures &cf, OperationContext &context)
 What options are available for a particular path?
virtual RequestHandlerIFCclone () const =0
ServiceEnvironmentIFCRef getEnvironment () const
virtual void setEnvironment (const ServiceEnvironmentIFCRef &env)
virtual StringArray getSupportedContentTypes () const =0
virtual String getContentType () const =0
String getCIMError () const
void setError (Int32 errorCode, const String &errorDescription)
void clearError ()

Protected Member Functions

virtual void doProcess (std::istream *istr, std::ostream *ostrEntity, std::ostream *ostrError, OperationContext &context)=0
 The HTTP server calls this once all HTTP headers have been processed and removed from the input stream.
virtual void doOptions (CIMFeatures &cf, OperationContext &context)=0
 Fill out the Features that the request handler at the path supports.
String getHost ()

Protected Attributes

String m_cimError
String m_cachedHost

Private Attributes

bool m_hasError
Int32 m_errorCode
String m_errorDescription
ServiceEnvironmentIFCRef m_env

Detailed Description

This is an abstract base class for a CIM product requiring a HTTP Server.

(a CIM Server or a CIM Listener). The HTTPServer contains a reference to one of these. When a [M-]POST or OPTIONS is done, the process() and options() functions for this class are called, respectively.

Definition at line 62 of file OW_RequestHandlerIFC.hpp.


Constructor & Destructor Documentation

OW_NAMESPACE::RequestHandlerIFC::RequestHandlerIFC  ) 
 

Definition at line 48 of file OW_RequestHandlerIFC.cpp.

OW_NAMESPACE::RequestHandlerIFC::~RequestHandlerIFC  )  [virtual]
 

Definition at line 57 of file OW_RequestHandlerIFC.cpp.


Member Function Documentation

void OW_NAMESPACE::RequestHandlerIFC::clearError  )  [inline]
 

Definition at line 103 of file OW_RequestHandlerIFC.hpp.

References OW_NAMESPACE::String::erase().

Referenced by OW_NAMESPACE::BinaryRequestHandler::doProcess().

virtual RequestHandlerIFC* OW_NAMESPACE::RequestHandlerIFC::clone  )  const [pure virtual]
 

Implemented in OW_NAMESPACE::XMLListener, OW_NAMESPACE::BinaryRequestHandler, and OW_NAMESPACE::XMLExecute.

virtual void OW_NAMESPACE::RequestHandlerIFC::doOptions CIMFeatures cf,
OperationContext context
[protected, pure virtual]
 

Fill out the Features that the request handler at the path supports.

Parameters:
cf The features to fill out.
path The requested path

Implemented in OW_NAMESPACE::XMLListener, OW_NAMESPACE::BinaryRequestHandler, and OW_NAMESPACE::XMLExecute.

virtual void OW_NAMESPACE::RequestHandlerIFC::doProcess std::istream *  istr,
std::ostream *  ostrEntity,
std::ostream *  ostrError,
OperationContext context
[protected, pure virtual]
 

The HTTP server calls this once all HTTP headers have been processed and removed from the input stream.

Also, the http server takes care of any necessary content coding (SSL, chunking, compression).

Parameters:
istr The input for the request to be processed.
ostrEntity Non-error output gets written here.
ostrError Error output gets written here. the path portion of the HTTP URL used to access the cimom the operation context.

Implemented in OW_NAMESPACE::BinaryRequestHandler, and OW_NAMESPACE::RequestHandlerIFCXML.

Referenced by process().

String OW_NAMESPACE::RequestHandlerIFC::getCIMError  )  const [inline]
 

Definition at line 96 of file OW_RequestHandlerIFC.hpp.

virtual String OW_NAMESPACE::RequestHandlerIFC::getContentType  )  const [pure virtual]
 

Implemented in OW_NAMESPACE::XMLListener, OW_NAMESPACE::BinaryRequestHandler, and OW_NAMESPACE::RequestHandlerIFCXML.

ServiceEnvironmentIFCRef OW_NAMESPACE::RequestHandlerIFC::getEnvironment  )  const
 

Definition at line 79 of file OW_RequestHandlerIFC.cpp.

References m_env.

Referenced by OW_NAMESPACE::XMLExecute::doOptions(), OW_NAMESPACE::XMLExecute::shutdown(), and OW_NAMESPACE::BinaryRequestHandler::writeFileName().

String OW_NAMESPACE::RequestHandlerIFC::getHost  )  [protected]
 

Definition at line 91 of file OW_RequestHandlerIFC.cpp.

References OW_NAMESPACE::String::empty(), and m_cachedHost.

Referenced by OW_NAMESPACE::BinaryRequestHandler::associatorNames(), OW_NAMESPACE::BinaryRequestHandler::enumInstanceNames(), and OW_NAMESPACE::BinaryRequestHandler::referenceNames().

virtual StringArray OW_NAMESPACE::RequestHandlerIFC::getSupportedContentTypes  )  const [pure virtual]
 

Implemented in OW_NAMESPACE::XMLListener, OW_NAMESPACE::BinaryRequestHandler, and OW_NAMESPACE::RequestHandlerIFCXML.

bool OW_NAMESPACE::RequestHandlerIFC::hasError  )  [inline]
 

Definition at line 84 of file OW_RequestHandlerIFC.hpp.

bool OW_NAMESPACE::RequestHandlerIFC::hasError Int32 errCode,
String errDescr
 

Did an error occur during process()? (should ostrEntity be sent back, or osrtError?).

Returns:
true if an error occurred.

Definition at line 68 of file OW_RequestHandlerIFC.cpp.

References m_errorCode, m_errorDescription, and m_hasError.

void OW_NAMESPACE::RequestHandlerIFC::options CIMFeatures cf,
OperationContext context
[inline]
 

What options are available for a particular path?

Parameters:
cf a CIMFeatures object to fill out.

Definition at line 89 of file OW_RequestHandlerIFC.hpp.

References context.

void OW_NAMESPACE::RequestHandlerIFC::process std::istream *  istr,
std::ostream *  ostrEntity,
std::ostream *  ostrError,
OperationContext context
 

The HTTP server calls this once all HTTP headers have been processed and removed from the input stream.

Also, the http server takes care of any necessary content coding (SSL, chunking, compression).

Parameters:
istr The input for the request to be processed.
ostrEntity Non-error output gets written here.
ostrError Error output gets written here. the name of the user accessing the CIM Product.

Definition at line 61 of file OW_RequestHandlerIFC.cpp.

References context, and doProcess().

void OW_NAMESPACE::RequestHandlerIFC::setEnvironment const ServiceEnvironmentIFCRef env  )  [virtual]
 

Reimplemented in OW_NAMESPACE::BinaryRequestHandler.

Definition at line 85 of file OW_RequestHandlerIFC.cpp.

References env, and m_env.

Referenced by OW_NAMESPACE::XMLExecute::init(), OW_NAMESPACE::BinaryRequestHandler::setEnvironment(), and OW_NAMESPACE::XMLExecute::shutdown().

void OW_NAMESPACE::RequestHandlerIFC::setError Int32  errorCode,
const String errorDescription
[inline]
 

Definition at line 97 of file OW_RequestHandlerIFC.hpp.


Member Data Documentation

String OW_NAMESPACE::RequestHandlerIFC::m_cachedHost [protected]
 

Definition at line 130 of file OW_RequestHandlerIFC.hpp.

Referenced by getHost().

String OW_NAMESPACE::RequestHandlerIFC::m_cimError [protected]
 

Definition at line 128 of file OW_RequestHandlerIFC.hpp.

ServiceEnvironmentIFCRef OW_NAMESPACE::RequestHandlerIFC::m_env [private]
 

Definition at line 142 of file OW_RequestHandlerIFC.hpp.

Referenced by getEnvironment(), and setEnvironment().

Int32 OW_NAMESPACE::RequestHandlerIFC::m_errorCode [private]
 

Definition at line 134 of file OW_RequestHandlerIFC.hpp.

Referenced by hasError().

String OW_NAMESPACE::RequestHandlerIFC::m_errorDescription [private]
 

Definition at line 135 of file OW_RequestHandlerIFC.hpp.

Referenced by hasError().

bool OW_NAMESPACE::RequestHandlerIFC::m_hasError [private]
 

Definition at line 133 of file OW_RequestHandlerIFC.hpp.

Referenced by hasError().


The documentation for this class was generated from the following files:
Generated on Thu Feb 9 09:15:13 2006 for openwbem by  doxygen 1.4.6