#include <it_bus/servant.h>
Inheritance diagram for IT_Bus::Servant:
Users are free to implement this class themselves. Dynamic bridge style applications will need to implement the Servant class.
Definition at line 26 of file servant.h.
Public Member Functions | |
IT_EXPLICIT | Servant (Bus_ptr bus) |
Constructor. | |
virtual | ~Servant () |
Destructor. | |
virtual void | dispatch (ServerOperation &server_operation)=0 |
This is the entry point from the Bus runtime into service application code. | |
virtual void | asynchronous_exception (IT_Bus::Exception &e) |
Method called by the Bus runtime in association with service lifecycle events. | |
virtual Bus_ptr | get_bus () const |
Returns a pointer to the Bus instance used in initializing this instance. | |
virtual void | activated (Port &) |
Invoked when a Port associated with this servant instance is activated. | |
virtual void | deactivated (Port &) |
Invoked when a Port associated with this servant instance is deactivated. | |
virtual Servant * | clone () const |
Return a pointer to a new instance of this servant class. | |
virtual void | destroy (Servant *servant) const |
Destroy the servant passed in. | |
Protected Attributes | |
Bus_var | m_bus |
virtual void IT_Bus::Servant::dispatch | ( | ServerOperation & | server_operation | ) | [pure virtual] |
This is the entry point from the Bus runtime into service application code.
This method is usually implemented by the generated Servant code which will handle all of the unmarshalling for the user and call the typed operation in the users code.
Alternatively if you are writing a dynamic bridge you may need to implement the dispatch method yourself.
ServerOperation | & server_operation which contains the operation details like message parts and contexts |
Implemented in IT_Bus::PerThreadServant, IT_Bus::PerInvocationServant, and IT_Bus::SerializedServant.
virtual void IT_Bus::Servant::asynchronous_exception | ( | IT_Bus::Exception & | e | ) | [virtual] |
Method called by the Bus runtime in association with service lifecycle events.
Application specific implementation classes override this method if it is required that the servant be aware of service lifecycle difficulties. Cast the exception parameter to the IT_Bus;:ServiceActivationException type and use the get_service_qname() and/or get_port_name() methods to identify the source of the activation error.
IT_Bus::ServiceActivationException* ex = IT_DYNAMIC_CAST(IT_Bus::ServiceActivationException*, &e);
If it is necessary to shutdown the process, servant code should throw the IT_Bus::ShutdownRequestException.
IT_Bus::Exception |
virtual Bus_ptr IT_Bus::Servant::get_bus | ( | ) | const [virtual] |
virtual void IT_Bus::Servant::activated | ( | Port & | ) | [virtual] |
Invoked when a Port associated with this servant instance is activated.
Derived subclasses (i.e., implementation class) optionally provide an implementation of this method. Use this method to perform any Port specific servant initialization.
Port | being activated. |
Reimplemented in IT_Bus::WrapperServant.
virtual void IT_Bus::Servant::deactivated | ( | Port & | ) | [virtual] |
Invoked when a Port associated with this servant instance is deactivated.
Derived subclasses (i.e., implementation class) optionally provide an implementation of this method. Use this method to perform any Port specific servant cleanup.
Port | being deactivated. |
Reimplemented in IT_Bus::WrapperServant.
virtual Servant* IT_Bus::Servant::clone | ( | ) | const [virtual] |
Return a pointer to a new instance of this servant class.
Derived subclasses (i.e., implementation class) optionally provide an implementation of this method.
virtual void IT_Bus::Servant::destroy | ( | Servant * | servant | ) | const [virtual] |