com::softwareag::umtransport::ClientTransportContextFactory Class Reference

This factory allows you to construct ClientTransportContexts by passing a String URL. This way you can compile an application which is Transport agnostic and simply change the URL passed to the application to switch from SHM to Sockets etc. A URL is of the form protocol://host:port?Property=value&Property2=value2 The relevant ClientContextBuilder will be constructed based on the protocol and then the properties will be set internally. So on a ClientSHMTransportContext there is a property called "LowLatency" that you could set to true using a URL like this: More...

#include <ClientTransportContextFactory.h>

Static Public Member Functions

static std::unique_ptr
< ClientTransportContext
build (const std::string &url)
 Creates a ClientContextBuilder based on the protocol in the url and sets the host/port (the port is a file path in SHM) as well as any other parameters which are passed in the url query string. For example you can construct a ClientSocketTransportContext like this: More...
 

Detailed Description

This factory allows you to construct ClientTransportContexts by passing a String URL. This way you can compile an application which is Transport agnostic and simply change the URL passed to the application to switch from SHM to Sockets etc. A URL is of the form protocol://host:port?Property=value&Property2=value2 The relevant ClientContextBuilder will be constructed based on the protocol and then the properties will be set internally. So on a ClientSHMTransportContext there is a property called "LowLatency" that you could set to true using a URL like this:

std::string url = "shm://localhost:/path/to/file?LowLatency=true";
ClientTransportContext *context = ClientTransportContextFactory::build(url);

Member Function Documentation

static std::unique_ptr<ClientTransportContext> com::softwareag::umtransport::ClientTransportContextFactory::build ( const std::string &  url)
static

Creates a ClientContextBuilder based on the protocol in the url and sets the host/port (the port is a file path in SHM) as well as any other parameters which are passed in the url query string. For example you can construct a ClientSocketTransportContext like this:

ClientTransportContext *context = ClientTransportContextFactory::build("tcp://locahost:9000"); </summary>
<param name="ur"> protocol://host:port?property1=value provides the required information to construct a ClientContextBuilder
@return </param>