fesa::AbstractServerAction Class Reference

This is the based class for all the server actions in the system which will be executed when a property is requested. TODO discuss the DataType parameter. More...

#include <AbstractServerAction.h>

Inheritance diagram for fesa::AbstractServerAction:
fesa::AbstractAction fesa::GetDiagnosticSetting fesa::ServerAction< DeviceType, DataType, FilterType > fesa::SetDiagnosticSetting

List of all members.

Public Member Functions

 AbstractServerAction (ServerActionConfig &actionConfig, const AbstractServiceLocator *serviceLocator, const std::map< std::string, const AbstractServiceLocator * > serviceLocatorRelatedClasses)
virtual ~AbstractServerAction ()
virtual void execute (RequestEvent *evt, AbstractDevice &dev, const rdaData &filter, rdaData &data, IOType ioType, RequestType reqType)=0
 This method is executed by a property when it's requested and it isn't global.
virtual bool needFilter ()
virtual void performCommit (MultiplexingContext &transactionCtxt, AbstractDevice *transactionDevice)=0
virtual void performRollback (MultiplexingContext &transactionCtxt, AbstractDevice *transactionDevice)=0
const std::string & getName ()
virtual void printConfig (FesaStream *configStream)
 this method prints the action configuration into the stream passed by argument
virtual void printState (FesaStream *fesaStream, double elapsedTime)
 this method prints the actual state of the action (frequency of the completed actions) into the stream passed by argument

Static Public Member Functions

static void releaseStaticObjects ()

Protected Member Functions

void checkInvalidatingFields (AbstractDevice *device, MultiplexingContext *ctx)
 this function is supposed to throw the exception when any of the invalidating fault-fields or alarm-fields is raised (set to true)
void notify (MultiplexingContext &transactionCtxt, AbstractDevice &device, RequestType reqType=GET)
 this method notifies the properties in the server action

Protected Attributes

std::vector< std::string > notifiedPropertiesCol_
std::vector< std::string > disablingFieldNamesCol_
std::vector< std::string > disablingGlobalFieldNamesCol_
bool partialSetIsAllowed_
 true if the property can be partially set
bool needFilter_
 true if the action contains filter
bool autoNotification_
bool transactionalSetIsAllowed_
bool defaultImpl_
 true if the server action has a default implementation
AbstractDevicepGlobalDevice_
 Pointer to the Global Device.
NotificationProducertheNotificationProducer_
 the notification producer is used to send properties' notifications to the server side

Detailed Description

This is the based class for all the server actions in the system which will be executed when a property is requested. TODO discuss the DataType parameter.

Definition at line 81 of file AbstractServerAction.h.


Constructor & Destructor Documentation

fesa::AbstractServerAction::AbstractServerAction ( ServerActionConfig actionConfig,
const AbstractServiceLocator serviceLocator,
const std::map< std::string, const AbstractServiceLocator * >  serviceLocatorRelatedClasses 
)
Parameters:
actionConfig which contains all the attributes to create the action

Definition at line 22 of file AbstractServerAction.cpp.

References fesa::NotificationProducer::getInstance(), and theNotificationProducer_.

fesa::AbstractServerAction::~AbstractServerAction (  )  [virtual]

Definition at line 33 of file AbstractServerAction.cpp.


Member Function Documentation

void fesa::AbstractServerAction::checkInvalidatingFields ( AbstractDevice device,
MultiplexingContext ctx 
) [protected]
virtual void fesa::AbstractServerAction::execute ( RequestEvent evt,
AbstractDevice dev,
const rdaData &  filter,
rdaData &  data,
IOType  ioType,
RequestType  reqType 
) [pure virtual]

This method is executed by a property when it's requested and it isn't global.

Parameters:
evt 
dev 
filter 
data 
ioType 
updateFlags 

Implemented in fesa::GetDiagnosticSetting, fesa::ServerAction< DeviceType, DataType, FilterType >, and fesa::SetDiagnosticSetting.

Referenced by fesa::Property::get(), and fesa::Property::set().

const std::string & fesa::AbstractServerAction::getName (  )  [inline]
bool fesa::AbstractServerAction::needFilter (  )  [virtual]
Returns:
true if the action needs a filter

Reimplemented in fesa::GetDiagnosticSetting, and fesa::SetDiagnosticSetting.

Definition at line 125 of file AbstractServerAction.cpp.

References needFilter_.

Referenced by fesa::Property::needFilter().

void fesa::AbstractServerAction::notify ( MultiplexingContext transactionCtxt,
AbstractDevice device,
RequestType  reqType = GET 
) [protected]
virtual void fesa::AbstractServerAction::performCommit ( MultiplexingContext transactionCtxt,
AbstractDevice transactionDevice 
) [pure virtual]
virtual void fesa::AbstractServerAction::performRollback ( MultiplexingContext transactionCtxt,
AbstractDevice transactionDevice 
) [pure virtual]
void fesa::AbstractServerAction::printConfig ( FesaStream configStream  )  [virtual]

this method prints the action configuration into the stream passed by argument

Parameters:
configStream in which the information will be printed

Definition at line 93 of file AbstractServerAction.cpp.

References defaultImpl_, disablingFieldNamesCol_, disablingGlobalFieldNamesCol_, fesa::AbstractAction::name_, and notifiedPropertiesCol_.

Referenced by fesa::Property::printConfig().

void fesa::AbstractServerAction::printState ( FesaStream fesaStream,
double  elapsedTime 
) [virtual]

this method prints the actual state of the action (frequency of the completed actions) into the stream passed by argument

Parameters:
fesaStream in which the information will be printed

Definition at line 120 of file AbstractServerAction.cpp.

void fesa::AbstractServerAction::releaseStaticObjects (  )  [static]

Member Data Documentation

Definition at line 163 of file AbstractServerAction.h.

true if the server action has a default implementation

Definition at line 170 of file AbstractServerAction.h.

Referenced by printConfig().

std::vector<std::string> fesa::AbstractServerAction::disablingFieldNamesCol_ [protected]

Definition at line 149 of file AbstractServerAction.h.

Referenced by checkInvalidatingFields(), and printConfig().

std::vector<std::string> fesa::AbstractServerAction::disablingGlobalFieldNamesCol_ [protected]

Definition at line 151 of file AbstractServerAction.h.

Referenced by checkInvalidatingFields(), and printConfig().

true if the action contains filter

Definition at line 161 of file AbstractServerAction.h.

Referenced by fesa::ServerAction< DeviceType, DataType, FilterType >::execute(), and needFilter().

std::vector<std::string> fesa::AbstractServerAction::notifiedPropertiesCol_ [protected]

Definition at line 147 of file AbstractServerAction.h.

Referenced by notify(), and printConfig().

true if the property can be partially set

Definition at line 156 of file AbstractServerAction.h.

Referenced by fesa::ServerAction< DeviceType, DataType, FilterType >::execute().

Pointer to the Global Device.

Definition at line 176 of file AbstractServerAction.h.

Referenced by checkInvalidatingFields().

the notification producer is used to send properties' notifications to the server side

Definition at line 181 of file AbstractServerAction.h.

Referenced by AbstractServerAction(), and notify().

Definition at line 165 of file AbstractServerAction.h.


The documentation for this class was generated from the following files:

Generated on 18 Jan 2013 for Fesa by  doxygen 1.6.1