ResponseHandler.cc

Go to the documentation of this file.
00001 // OPENDAP_RESPONSEResponseHandler.cc
00002 
00003 #include "OPENDAP_RESPONSEResponseHandler.h"
00004 #include "BESInfoList.h"
00005 #include "BESInfo.h"
00006 
00007 OPENDAP_RESPONSEResponseHandler::OPENDAP_RESPONSEResponseHandler( const string &name )
00008     : BESResponseHandler( name )
00009 {
00010 }
00011 
00012 OPENDAP_RESPONSEResponseHandler::~OPENDAP_RESPONSEResponseHandler( )
00013 {
00014 }
00015 
00016 void
00017 OPENDAP_RESPONSEResponseHandler::execute( BESDataHandlerInterface &dhi )
00018 {
00019     // This is an example. Here you would build the BESResponseObject
00020     // object and set it to the _response protected data member
00021     BESInfo *info = BESInfoList::TheList()->build_info() ;
00022     _response = info ;
00023 
00024     // Here is where your code would fill in the new response object
00025 }
00026 
00027 void
00028 OPENDAP_RESPONSEResponseHandler::transmit( BESTransmitter *transmitter,
00029                                BESDataHandlerInterface &dhi )
00030 {
00031     // Here is where you would transmit your response object using the
00032     // specified transmitter object. This is the example using the BESInfo
00033     // response object
00034     if( _response )
00035     {
00036         BESInfo *info = dynamic_cast<BESInfo *>( _response ) ;
00037         info->transmit( transmitter, dhi ) ;
00038     }
00039 }
00040 
00041 void
00042 OPENDAP_RESPONSEResponseHandler::dump( ostream &strm ) const
00043 {
00044     strm << BESIndent::LMarg << "OPENDAP_RESPONSEResponseHandler::dump - ("
00045                              << (void *)this << ")" << endl ;
00046     BESIndent::Indent() ;
00047     BESResponseHandler::dump( strm ) ;
00048     BESIndent::UnIndent() ;
00049 }
00050 
00051 BESResponseHandler *
00052 OPENDAP_RESPONSEResponseHandler::OPENDAP_RESPONSEResponseBuilder( const string &name )
00053 {
00054     return new OPENDAP_RESPONSEResponseHandler( name ) ;
00055 }
00056 

Generated on Wed Jan 2 06:00:40 2008 for OPeNDAP Back End Server (BES) by  doxygen 1.5.4