IT_Bus::Servant Class Reference

#include <it_bus/servant.h>

Inheritance diagram for IT_Bus::Servant:

IT_Bus::WrapperServant IT_Bus::PerInvocationServant IT_Bus::PerThreadServant IT_Bus::SerializedServant List of all members.

Detailed Description

Base class for stub and implementation classes generated from a WSDL file port type definition.

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 Servantclone () 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


Constructor & Destructor Documentation

IT_EXPLICIT IT_Bus::Servant::Servant ( Bus_ptr  bus  ) 

Constructor.

Parameters:
Bus 


Member Function Documentation

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.

Parameters:
Port being activated.

Reimplemented in IT_Bus::WrapperServant.

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.

Parameters:
IT_Bus::Exception 

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.

Returns:
Pointer to a new servant instance.

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.

Parameters:
Port being deactivated.

Reimplemented in IT_Bus::WrapperServant.

virtual void IT_Bus::Servant::destroy ( Servant servant  )  const [virtual]

Destroy the servant passed in.

The Servant was previously returned from the clone call. This is only called by the runtime when your Servant is wrapped by one of the Servant Wrappers.

Parameters:
Servant* servant that you want deleted

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.

Parameters:
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 Bus_ptr IT_Bus::Servant::get_bus (  )  const [virtual]

Returns a pointer to the Bus instance used in initializing this instance.

Returns:
IT_Bus::Bus


Generated on Thu Sep 7 11:40:10 2006 for Artix by  doxygen 1.4.7