com::softwareag::umtransport::ClientSocketTransportContext::Builder Class Reference

This Builder object is used to build a ClientSocketTransportContext. The ClientSocketTransportContext is configured using the builder so that once build() is called, the ClientSocketTransportContext is only returned if it is valid. You can use the Builder to create simple readable code like this: More...

#include <ClientSocketTransportContext.h>

Inheritance diagram for com::softwareag::umtransport::ClientSocketTransportContext::Builder:
com::softwareag::umtransport::ClientContextBuilder com::softwareag::umtransport::ContextBuilder com::softwareag::umtransport::ClientSSLTransportContext::Builder

Public Member Functions

std::unique_ptr
< ClientTransportContext
build ()
 Builds the ClientSocketTransportContext based on the configuration that has been set on the Builder. More...
 
 Builder ()
 Construct a new instance of this Builder object. More...
 

Additional Inherited Members

- Protected Member Functions inherited from com::softwareag::umtransport::ClientContextBuilder
std::string getCiphers ()
 Get the value that is currently set for the OpenSSL formatted cipher string list More...
 
std::string getFilePath ()
 Get the file path that is currently set. The path will be used to store the memory mapped files required by the SHM Transport. More...
 
std::string getHost ()
 Returns the current value that has been set for the host name More...
 
int getLockWait ()
 Get the current wait time for yielding a spin lock. Advanced option for SHM transports only. More...
 
int getPort ()
 Returns the current value that has been set for the port More...
 
longlong getSpinCount ()
 Gets the current active spin count. Advanced option for SHM transports only. More...
 
std::string getTrustStore ()
 Get the value that is currently set for the path to the trust store on the local machine More...
 
bool isLowLatency ()
 Determines whether low latency mode is enabled. More...
 
ClientContextBuilderwithCiphers (const std::string &ciphers)
 Set the cipher list to use for SSL, the format of the string is OpenSSL formatted cipher string More...
 
ClientContextBuilderwithFilePath (const std::string &path)
 Set the path to the directory which will be used to store the memory mapped files used by the SHM Transport. More...
 
ClientContextBuilderwithHost (const std::string &host)
 Sets the host of the server that you want to connect to e.g. um.terracotta.org More...
 
ClientContextBuilderwithLockWait (const int count)
 Sets the waiting time (in nanoseconds) for yielding a spin lock. Advanced configuration option, use judiciously. More...
 
ClientContextBuilderwithLowLatency (bool flag)
 Used to disable/enable low latency mode (on by default). If low latency mode is true then the application will be very CPU intensive and ideally consume an core of the machine. This allows the Transport to respond as fast as possible when new data arrives. If this mode is set to false then the Transport will be less CPU intensive but latency will be increased slightly as a consequence. More...
 
ClientContextBuilderwithPort (int port)
 Sets the port of the server that you want to connect to e.g. 9000 More...
 
ClientContextBuilderwithSpinCount (const longlong count)
 Sets the spin count for reading data from an SHM input stream. Advanced configuration option, use judiciously. More...
 
ClientContextBuilderwithTrustStore (const std::string &trustStore)
 Set the path the the trust store that will be used to validate the server provided certificate More...
 

Detailed Description

This Builder object is used to build a ClientSocketTransportContext. The ClientSocketTransportContext is configured using the builder so that once build() is called, the ClientSocketTransportContext is only returned if it is valid. You can use the Builder to create simple readable code like this:

context = ClientSocketTransportContext::Builder()
.withHost("localhost")
.withPort(8080)
.build();

Constructor & Destructor Documentation

com::softwareag::umtransport::ClientSocketTransportContext::Builder::Builder ( )

Construct a new instance of this Builder object.

Member Function Documentation

std::unique_ptr<ClientTransportContext> com::softwareag::umtransport::ClientSocketTransportContext::Builder::build ( )

Builds the ClientSocketTransportContext based on the configuration that has been set on the Builder.

Exceptions
IllegalStateExceptionif the Builder has not be configured with the required/correct information to construct the ClientTransportContext;
Returns
ClientSocketTransportContext used by the TransportFactory.connect method to construct Transports