#include <ConsumerUtils.h>
Handles consumer requests and responses
Definition at line 45 of file ConsumerUtils.h.
stor::ConsumerUtils< Configuration_t, EventQueueCollection_t >::ConsumerUtils | ( | boost::shared_ptr< Configuration_t > | , |
RegistrationCollectionPtr | , | ||
RegistrationQueuePtr | , | ||
InitMsgCollectionPtr | , | ||
boost::shared_ptr< EventQueueCollection_t > | , | ||
DQMEventQueueCollectionPtr | , | ||
AlarmHandlerPtr | |||
) |
bool stor::ConsumerUtils< Configuration_t, EventQueueCollection_t >::addRegistrationInfo | ( | const RegPtr | ) | const [private] |
Add registration information to RegistrationCollection and to registration queue. Return true on success.
bool stor::ConsumerUtils< Configuration_t, EventQueueCollection_t >::createDQMEventConsumerQueue | ( | DQMEventConsRegPtr | ) | const [private] |
Create a DQM event consumer queue. Returns true on success.
DQMEventConsRegPtr stor::ConsumerUtils< Configuration_t, EventQueueCollection_t >::createDQMEventConsumerRegistrationInfo | ( | xgi::Input * | , |
xgi::Output * | |||
) | const [private] |
Create the DQM event consumer registration info for this request
bool stor::ConsumerUtils< Configuration_t, EventQueueCollection_t >::createEventConsumerQueue | ( | EventConsRegPtr | ) | const [private] |
Create an event consumer queue. Returns true on success.
EventConsRegPtr stor::ConsumerUtils< Configuration_t, EventQueueCollection_t >::createEventConsumerRegistrationInfo | ( | xgi::Input * | , |
xgi::Output * | |||
) | const [private] |
Create the event consumer registration info for this request
ConsumerID stor::ConsumerUtils< Configuration_t, EventQueueCollection_t >::getConsumerId | ( | xgi::Input * | ) | const [private] |
Extract consumer ID from header request:
DQMEventConsRegPtr stor::ConsumerUtils< Configuration_t, EventQueueCollection_t >::parseDQMEventConsumerRegistration | ( | xgi::Input * | ) | const [private] |
Parse DQM consumer registration request
EventConsRegPtr stor::ConsumerUtils< Configuration_t, EventQueueCollection_t >::parseEventConsumerRegistration | ( | xgi::Input * | ) | const [private] |
Parse consumer registration request
void stor::ConsumerUtils< Configuration_t, EventQueueCollection_t >::processConsumerEventRequest | ( | xgi::Input * | , |
xgi::Output * | |||
) | const |
Process event request from an event consumer
void stor::ConsumerUtils< Configuration_t, EventQueueCollection_t >::processConsumerHeaderRequest | ( | xgi::Input * | , |
xgi::Output * | |||
) | const |
Process header (init msg) request from an event consumer
void stor::ConsumerUtils< Configuration_t, EventQueueCollection_t >::processConsumerRegistrationRequest | ( | xgi::Input * | , |
xgi::Output * | |||
) | const |
Process registration request from an event consumer
void stor::ConsumerUtils< Configuration_t, EventQueueCollection_t >::processDQMConsumerEventRequest | ( | xgi::Input * | , |
xgi::Output * | |||
) | const |
Process DQM event (histogram) request from a DQM event consumer
void stor::ConsumerUtils< Configuration_t, EventQueueCollection_t >::processDQMConsumerRegistrationRequest | ( | xgi::Input * | , |
xgi::Output * | |||
) | const |
Process registration request from a DQM event (histogram) consumer
void stor::ConsumerUtils< Configuration_t, EventQueueCollection_t >::writeConsumerEvent | ( | xgi::Output * | , |
const smproxy::EventMsg & | |||
) | const [private] |
void stor::ConsumerUtils< Configuration_t, EventQueueCollection_t >::writeConsumerEvent | ( | xgi::Output * | , |
const stor::I2OChain & | |||
) | const [private] |
Send event to consumer:
void stor::ConsumerUtils< smproxy::Configuration, smproxy::EventQueueCollection >::writeConsumerEvent | ( | xgi::Output * | out, |
const smproxy::EventMsg & | evt | ||
) | const [private] |
Definition at line 384 of file SMProxyServer.cc.
References smproxy::EventMsg::dataLocation(), and smproxy::EventMsg::totalDataSize().
{ writeHTTPHeaders( out ); out->write( (char*)evt.dataLocation(), evt.totalDataSize() ); }
void stor::ConsumerUtils< Configuration, EventQueueCollection >::writeConsumerEvent | ( | xgi::Output * | out, |
const I2OChain & | evt | ||
) | const [private] |
Definition at line 747 of file StorageManager.cc.
References gather_cfg::cout, stor::I2OChain::dataLocation(), stor::I2OChain::dataSize(), stor::I2OChain::fragmentCount(), h, i, tests::location, EventHeader::protocolVersion_, and alignCSCRings::r.
{ writeHTTPHeaders( out ); #ifdef STOR_DEBUG_CORRUPTED_EVENT_HEADER double r = rand()/static_cast<double>(RAND_MAX); if (r < 0.1) { std::cout << "Simulating corrupted event header" << std::endl; EventHeader* h = (EventHeader*)evt.dataLocation(0); h->protocolVersion_ = 1; } #endif // STOR_DEBUG_CORRUPTED_EVENT_HEADER const unsigned int nfrags = evt.fragmentCount(); for ( unsigned int i = 0; i < nfrags; ++i ) { const unsigned long len = evt.dataSize( i ); unsigned char* location = evt.dataLocation( i ); out->write( (char*)location, len ); } }
void stor::ConsumerUtils< Configuration_t, EventQueueCollection_t >::writeConsumerHeader | ( | xgi::Output * | , |
const InitMsgSharedPtr | |||
) | const [private] |
Send header to consumer:
void stor::ConsumerUtils< Configuration_t, EventQueueCollection_t >::writeConsumerRegistration | ( | xgi::Output * | , |
const ConsumerID | |||
) | const [private] |
Send ID to consumer:
void stor::ConsumerUtils< Configuration_t, EventQueueCollection_t >::writeDone | ( | xgi::Output * | ) | const [private] |
Send a "done" message to consumer:
void stor::ConsumerUtils< Configuration_t, EventQueueCollection_t >::writeDQMConsumerEvent | ( | xgi::Output * | , |
const DQMEventMsgView & | |||
) | const [private] |
Send DQM event to DQM consumer:
void stor::ConsumerUtils< Configuration_t, EventQueueCollection_t >::writeEmptyBuffer | ( | xgi::Output * | ) | const [private] |
Send empty buffer to consumer:
void stor::ConsumerUtils< Configuration_t, EventQueueCollection_t >::writeErrorString | ( | xgi::Output * | , |
const std::string | |||
) | const [private] |
Send an error message to consumer:
void stor::ConsumerUtils< Configuration_t, EventQueueCollection_t >::writeHTTPHeaders | ( | xgi::Output * | ) | const [private] |
Write HTTP headers:
void stor::ConsumerUtils< Configuration_t, EventQueueCollection_t >::writeNotReady | ( | xgi::Output * | ) | const [private] |
Tell consumer we're not ready:
AlarmHandlerPtr stor::ConsumerUtils< Configuration_t, EventQueueCollection_t >::alarmHandler_ [private] |
Definition at line 183 of file ConsumerUtils.h.
boost::shared_ptr<Configuration_t> stor::ConsumerUtils< Configuration_t, EventQueueCollection_t >::configuration_ [private] |
Definition at line 177 of file ConsumerUtils.h.
DQMEventQueueCollectionPtr stor::ConsumerUtils< Configuration_t, EventQueueCollection_t >::dqmEventQueueCollection_ [private] |
Definition at line 182 of file ConsumerUtils.h.
boost::shared_ptr<EventQueueCollection_t> stor::ConsumerUtils< Configuration_t, EventQueueCollection_t >::eventQueueCollection_ [private] |
Definition at line 181 of file ConsumerUtils.h.
InitMsgCollectionPtr stor::ConsumerUtils< Configuration_t, EventQueueCollection_t >::initMsgCollection_ [private] |
Definition at line 180 of file ConsumerUtils.h.
RegistrationCollectionPtr stor::ConsumerUtils< Configuration_t, EventQueueCollection_t >::registrationCollection_ [private] |
Definition at line 178 of file ConsumerUtils.h.
RegistrationQueuePtr stor::ConsumerUtils< Configuration_t, EventQueueCollection_t >::registrationQueue_ [private] |
Definition at line 179 of file ConsumerUtils.h.