CMS 3D CMS Logo

Public Member Functions | Private Member Functions | Private Attributes

stor::ConsumerUtils< Configuration_t, EventQueueCollection_t > Class Template Reference

#include <ConsumerUtils.h>

List of all members.

Public Member Functions

 ConsumerUtils (boost::shared_ptr< Configuration_t >, RegistrationCollectionPtr, RegistrationQueuePtr, InitMsgCollectionPtr, boost::shared_ptr< EventQueueCollection_t >, DQMEventQueueCollectionPtr, AlarmHandlerPtr)
void processConsumerEventRequest (xgi::Input *, xgi::Output *) const
void processConsumerHeaderRequest (xgi::Input *, xgi::Output *) const
void processConsumerRegistrationRequest (xgi::Input *, xgi::Output *) const
void processDQMConsumerEventRequest (xgi::Input *, xgi::Output *) const
void processDQMConsumerRegistrationRequest (xgi::Input *, xgi::Output *) const

Private Member Functions

bool addRegistrationInfo (const RegPtr) const
bool createDQMEventConsumerQueue (DQMEventConsRegPtr) const
DQMEventConsRegPtr createDQMEventConsumerRegistrationInfo (xgi::Input *, xgi::Output *) const
bool createEventConsumerQueue (EventConsRegPtr) const
EventConsRegPtr createEventConsumerRegistrationInfo (xgi::Input *, xgi::Output *) const
ConsumerID getConsumerId (xgi::Input *) const
DQMEventConsRegPtr parseDQMEventConsumerRegistration (xgi::Input *) const
EventConsRegPtr parseEventConsumerRegistration (xgi::Input *) const
void writeConsumerEvent (xgi::Output *, const stor::I2OChain &) const
void writeConsumerEvent (xgi::Output *, const smproxy::EventMsg &) const
void writeConsumerHeader (xgi::Output *, const InitMsgSharedPtr) const
void writeConsumerRegistration (xgi::Output *, const ConsumerID) const
void writeDone (xgi::Output *) const
void writeDQMConsumerEvent (xgi::Output *, const DQMEventMsgView &) const
void writeEmptyBuffer (xgi::Output *) const
void writeErrorString (xgi::Output *, const std::string) const
void writeHTTPHeaders (xgi::Output *) const
void writeNotReady (xgi::Output *) const

Private Attributes

AlarmHandlerPtr alarmHandler_
boost::shared_ptr
< Configuration_t > 
configuration_
DQMEventQueueCollectionPtr dqmEventQueueCollection_
boost::shared_ptr
< EventQueueCollection_t > 
eventQueueCollection_
InitMsgCollectionPtr initMsgCollection_
RegistrationCollectionPtr registrationCollection_
RegistrationQueuePtr registrationQueue_

Detailed Description

template<typename Configuration_t, typename EventQueueCollection_t>
class stor::ConsumerUtils< Configuration_t, EventQueueCollection_t >

Handles consumer requests and responses

Author:
mommsen
Revision:
1.9
Date:
2011/03/07 15:31:31

Definition at line 41 of file ConsumerUtils.h.


Constructor & Destructor Documentation

template<typename Configuration_t , typename EventQueueCollection_t >
stor::ConsumerUtils< Configuration_t, EventQueueCollection_t >::ConsumerUtils ( boost::shared_ptr< Configuration_t >  ,
RegistrationCollectionPtr  ,
RegistrationQueuePtr  ,
InitMsgCollectionPtr  ,
boost::shared_ptr< EventQueueCollection_t >  ,
DQMEventQueueCollectionPtr  ,
AlarmHandlerPtr   
)

Member Function Documentation

template<typename Configuration_t , typename EventQueueCollection_t >
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.

template<typename Configuration_t , typename EventQueueCollection_t >
bool stor::ConsumerUtils< Configuration_t, EventQueueCollection_t >::createDQMEventConsumerQueue ( DQMEventConsRegPtr  ) const [private]

Create a DQM event consumer queue. Returns true on success.

template<typename Configuration_t , typename EventQueueCollection_t >
DQMEventConsRegPtr stor::ConsumerUtils< Configuration_t, EventQueueCollection_t >::createDQMEventConsumerRegistrationInfo ( xgi::Input *  ,
xgi::Output *   
) const [private]

Create the DQM event consumer registration info for this request

template<typename Configuration_t , typename EventQueueCollection_t >
bool stor::ConsumerUtils< Configuration_t, EventQueueCollection_t >::createEventConsumerQueue ( EventConsRegPtr  ) const [private]

Create an event consumer queue. Returns true on success.

template<typename Configuration_t , typename EventQueueCollection_t >
EventConsRegPtr stor::ConsumerUtils< Configuration_t, EventQueueCollection_t >::createEventConsumerRegistrationInfo ( xgi::Input *  ,
xgi::Output *   
) const [private]

Create the event consumer registration info for this request

template<typename Configuration_t , typename EventQueueCollection_t >
ConsumerID stor::ConsumerUtils< Configuration_t, EventQueueCollection_t >::getConsumerId ( xgi::Input *  ) const [private]

Extract consumer ID from header request:

template<typename Configuration_t , typename EventQueueCollection_t >
DQMEventConsRegPtr stor::ConsumerUtils< Configuration_t, EventQueueCollection_t >::parseDQMEventConsumerRegistration ( xgi::Input *  ) const [private]

Parse DQM consumer registration request

template<typename Configuration_t , typename EventQueueCollection_t >
EventConsRegPtr stor::ConsumerUtils< Configuration_t, EventQueueCollection_t >::parseEventConsumerRegistration ( xgi::Input *  ) const [private]

Parse consumer registration request

template<typename Configuration_t , typename EventQueueCollection_t >
void stor::ConsumerUtils< Configuration_t, EventQueueCollection_t >::processConsumerEventRequest ( xgi::Input *  ,
xgi::Output *   
) const

Process event request from an event consumer

template<typename Configuration_t , typename EventQueueCollection_t >
void stor::ConsumerUtils< Configuration_t, EventQueueCollection_t >::processConsumerHeaderRequest ( xgi::Input *  ,
xgi::Output *   
) const

Process header (init msg) request from an event consumer

template<typename Configuration_t , typename EventQueueCollection_t >
void stor::ConsumerUtils< Configuration_t, EventQueueCollection_t >::processConsumerRegistrationRequest ( xgi::Input *  ,
xgi::Output *   
) const

Process registration request from an event consumer

template<typename Configuration_t , typename EventQueueCollection_t >
void stor::ConsumerUtils< Configuration_t, EventQueueCollection_t >::processDQMConsumerEventRequest ( xgi::Input *  ,
xgi::Output *   
) const

Process DQM event (histogram) request from a DQM event consumer

template<typename Configuration_t , typename EventQueueCollection_t >
void stor::ConsumerUtils< Configuration_t, EventQueueCollection_t >::processDQMConsumerRegistrationRequest ( xgi::Input *  ,
xgi::Output *   
) const

Process registration request from a DQM event (histogram) consumer

template<typename Configuration_t , typename EventQueueCollection_t >
void stor::ConsumerUtils< Configuration_t, EventQueueCollection_t >::writeConsumerEvent ( xgi::Output *  ,
const stor::I2OChain  
) const [private]

Send event to consumer:

template<typename Configuration_t , typename EventQueueCollection_t >
void stor::ConsumerUtils< Configuration_t, EventQueueCollection_t >::writeConsumerEvent ( xgi::Output *  ,
const smproxy::EventMsg  
) const [private]
template<typename Configuration_t , typename EventQueueCollection_t >
void stor::ConsumerUtils< Configuration_t, EventQueueCollection_t >::writeConsumerHeader ( xgi::Output *  ,
const InitMsgSharedPtr   
) const [private]

Send header to consumer:

template<typename Configuration_t , typename EventQueueCollection_t >
void stor::ConsumerUtils< Configuration_t, EventQueueCollection_t >::writeConsumerRegistration ( xgi::Output *  ,
const ConsumerID   
) const [private]

Send ID to consumer:

template<typename Configuration_t , typename EventQueueCollection_t >
void stor::ConsumerUtils< Configuration_t, EventQueueCollection_t >::writeDone ( xgi::Output *  ) const [private]

Send a "done" message to consumer:

template<typename Configuration_t , typename EventQueueCollection_t >
void stor::ConsumerUtils< Configuration_t, EventQueueCollection_t >::writeDQMConsumerEvent ( xgi::Output *  ,
const DQMEventMsgView  
) const [private]

Send DQM event to DQM consumer:

template<typename Configuration_t , typename EventQueueCollection_t >
void stor::ConsumerUtils< Configuration_t, EventQueueCollection_t >::writeEmptyBuffer ( xgi::Output *  ) const [private]

Send empty buffer to consumer:

template<typename Configuration_t , typename EventQueueCollection_t >
void stor::ConsumerUtils< Configuration_t, EventQueueCollection_t >::writeErrorString ( xgi::Output *  ,
const std::string   
) const [private]

Send an error message to consumer:

template<typename Configuration_t , typename EventQueueCollection_t >
void stor::ConsumerUtils< Configuration_t, EventQueueCollection_t >::writeHTTPHeaders ( xgi::Output *  ) const [private]

Write HTTP headers:

template<typename Configuration_t , typename EventQueueCollection_t >
void stor::ConsumerUtils< Configuration_t, EventQueueCollection_t >::writeNotReady ( xgi::Output *  ) const [private]

Tell consumer we're not ready:


Member Data Documentation

template<typename Configuration_t , typename EventQueueCollection_t >
AlarmHandlerPtr stor::ConsumerUtils< Configuration_t, EventQueueCollection_t >::alarmHandler_ [private]

Definition at line 179 of file ConsumerUtils.h.

template<typename Configuration_t , typename EventQueueCollection_t >
boost::shared_ptr<Configuration_t> stor::ConsumerUtils< Configuration_t, EventQueueCollection_t >::configuration_ [private]

Definition at line 173 of file ConsumerUtils.h.

template<typename Configuration_t , typename EventQueueCollection_t >
DQMEventQueueCollectionPtr stor::ConsumerUtils< Configuration_t, EventQueueCollection_t >::dqmEventQueueCollection_ [private]

Definition at line 178 of file ConsumerUtils.h.

template<typename Configuration_t , typename EventQueueCollection_t >
boost::shared_ptr<EventQueueCollection_t> stor::ConsumerUtils< Configuration_t, EventQueueCollection_t >::eventQueueCollection_ [private]

Definition at line 177 of file ConsumerUtils.h.

template<typename Configuration_t , typename EventQueueCollection_t >
InitMsgCollectionPtr stor::ConsumerUtils< Configuration_t, EventQueueCollection_t >::initMsgCollection_ [private]

Definition at line 176 of file ConsumerUtils.h.

template<typename Configuration_t , typename EventQueueCollection_t >
RegistrationCollectionPtr stor::ConsumerUtils< Configuration_t, EventQueueCollection_t >::registrationCollection_ [private]

Definition at line 174 of file ConsumerUtils.h.

template<typename Configuration_t , typename EventQueueCollection_t >
RegistrationQueuePtr stor::ConsumerUtils< Configuration_t, EventQueueCollection_t >::registrationQueue_ [private]

Definition at line 175 of file ConsumerUtils.h.