IT_Bus::AddressContext Class Reference

#include <it_bus_pdk/context_attrs/address_context.h>

Inheritance diagram for IT_Bus::AddressContext:

IT_Bus::Context List of all members.

Detailed Description

Class representing context that is accesible using the IT_ContextAttributes::SERVER_ADDRESS_CONTEXT key.

It is only available when services are using Default servants. This context is to allow the Default servant to determine the true target. It provides information about what endpoint the client was targetting. Using Default Servant you have a single Servant that is acting on behalf of many services. To fulfil this properly the Service needs to figure out at runtime who the client is targeting. This is achieved using addressing context.

Users typically do not create this class but access it through the ContextContainer during an operation invocation in their Service.

For example, when a client sends a Message to http://localhost:9000/Accounts/JoeBloggs the context would be JoeBlogg the full addresst would be http://localhost:9000/Accounts/JoeBloggs

The context is the difference between the target address and the base address. See Service::get_reference_with_id for details

Definition at line 32 of file address_context.h.

Public Member Functions

 AddressContext (const String &context)
 Constructor.
 AddressContext (const String &context, const String &full_address)
 Constructor.
virtual ~AddressContext ()
 Destructor.
virtual const IT_Bus::Stringget_context () const
 Returns a string containing the extra context.
virtual const IT_Bus::Stringget_full_address () const
 Returns a string containing the full address.

Protected Attributes

IT_Bus::String m_context
IT_Bus::String m_full_address


Constructor & Destructor Documentation

IT_Bus::AddressContext::AddressContext ( const String context  ) 

Constructor.

Parameters:
String for context


Member Function Documentation

virtual const IT_Bus::String& IT_Bus::AddressContext::get_context (  )  const [virtual]

Returns a string containing the extra context.

Returns:
String containing the extra context in the endpoint address.

virtual const IT_Bus::String& IT_Bus::AddressContext::get_full_address (  )  const [virtual]

Returns a string containing the full address.

Returns:
String containing the full endpoint address


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