Arc::Service Class Reference

Service - last component in a Message Chain. More...

#include <Service.h>

Inheritance diagram for Arc::Service:
Arc::MCCInterface Arc::Plugin Arc::RegisteredService

Public Member Functions

 Service (Config *, PluginArgument *arg)
virtual void AddSecHandler (Config *cfg, ArcSec::SecHandler *sechandler, const std::string &label="")
virtual bool RegistrationCollector (XMLNode &doc)
virtual std::string getID ()
 operator bool () const
bool operator! () const

Protected Member Functions

bool ProcessSecHandlers (Message &message, const std::string &label="") const

Protected Attributes

std::map< std::string,
std::list< ArcSec::SecHandler * > > 
sechandlers_
bool valid

Static Protected Attributes

static Logger logger

Detailed Description

Service - last component in a Message Chain.

This class which defines interface and common functionality for every Service plugin. Interface is made of method process() which is called by Plexer or MCC class. There is one Service object created for every service description processed by Loader class objects. Classes derived from Service class must implement process() method of MCCInterface. It is up to developer how internal state of service is stored and communicated to other services and external utilities. Service is free to expect any type of payload passed to it and generate any payload as well. Useful types depend on MCCs in chain which leads to that service. For example if service is expected to by linked to SOAP MCC it must accept and generate messages with PayloadSOAP payload. Method process() of class derived from Service class may be called concurrently in multiple threads. Developers must take that into account and write thread-safe implementation. Simple example of service is provided in /src/tests/echo/echo.cpp of source tree. The way to write client counterpart of corresponding service is undefined yet. For example see /src/tests/echo/test.cpp .


Constructor & Destructor Documentation

Arc::Service::Service ( Config ,
PluginArgument arg 
)

Example constructor - Server takes at least its configuration subtree


Member Function Documentation

virtual void Arc::Service::AddSecHandler ( Config cfg,
ArcSec::SecHandler sechandler,
const std::string &  label = "" 
) [virtual]

Add security components/handlers to this MCC. For more information please see description of MCC::AddSecHandler

virtual std::string Arc::Service::getID (  )  [inline, virtual]

Service may implement own service identifier gathering method. This method return identifier of service which is used for registering it Information Services.

Arc::Service::operator bool ( void   )  const [inline]

Returns true if the Service is valid.

References valid.

bool Arc::Service::operator! ( void   )  const [inline]

Returns true if the Service is not valid.

References valid.

bool Arc::Service::ProcessSecHandlers ( Message message,
const std::string &  label = "" 
) const [protected]

Executes security handlers of specified queue. For more information please see description of MCC::ProcessSecHandlers

virtual bool Arc::Service::RegistrationCollector ( XMLNode doc  )  [virtual]

Service specific registration collector, used for generate service registrations. In implemented service this method should generate GLUE2 document with part of service description which service wishes to advertise to Information Services.


Field Documentation

Logger Arc::Service::logger [static, protected]

Logger object used to print messages generated by this class.

std::map<std::string,std::list<ArcSec::SecHandler*> > Arc::Service::sechandlers_ [protected]

Set of labelled authentication and authorization handlers. MCC calls sequence of handlers at specific point depending on associated identifier. in most aces those are "in" and "out" for incoming and outgoing messages correspondingly.

bool Arc::Service::valid [protected]

Is service valid? Services which are not valid should set this to false in their constructor.

Referenced by operator bool(), and operator!().


The documentation for this class was generated from the following file:
Generated on Wed Jun 27 11:54:26 2012 for Hosting Environment (Daemon) by  doxygen 1.6.3