#include <it_bus_pdk/context_attrs/address_context.h>
Inheritance diagram for IT_Bus::AddressContext:
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::String & | get_context () const |
Returns a string containing the extra context. | |
virtual const IT_Bus::String & | get_full_address () const |
Returns a string containing the full address. | |
Protected Attributes | |
IT_Bus::String | m_context |
IT_Bus::String | m_full_address |
IT_Bus::AddressContext::AddressContext | ( | const String & | context | ) |
virtual const IT_Bus::String& IT_Bus::AddressContext::get_context | ( | ) | const [virtual] |
Returns a string containing the extra context.
virtual const IT_Bus::String& IT_Bus::AddressContext::get_full_address | ( | ) | const [virtual] |