com::softwareag::umtransport::ServerSHMTransportContext::Builder Class Reference

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

#include <ServerSHMTransportContext.h>

Inheritance diagram for com::softwareag::umtransport::ServerSHMTransportContext::Builder:
com::softwareag::umtransport::ServerContextBuilder com::softwareag::umtransport::ContextBuilder

Public Member Functions

std::unique_ptr
< ServerTransportContext
build ()
 Builds the ServerSHMTransportContext based on the configuration that has been set on the Builder. More...
 
 Builder ()
 Construct a new instance of this Builder object. More...
 
int getBufferSize ()
 Get the buffer size in bytes that will be used by the ServerTransports 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...
 
int getLockWait ()
 Get the current wait time for yielding a spin lock. Advanced option for SHM transports only. More...
 
longlong getSpinCount ()
 Gets the current active spin count. Advanced option for SHM transports only. More...
 
int getTimeout ()
 Returns the current time in ms that the SHM Transport should wait for information before timing out a connection More...
 
BuilderwithBufferSize (int bufferSize)
 Set the buffer size in bytes that will be used by the SHM ServerTransports More...
 
BuilderwithFilePath (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...
 
BuilderwithLockWait (const int count)
 Sets the waiting time (in nanoseconds) for yielding a spin lock. Advanced configuration option, use judiciously. More...
 
BuilderwithSpinCount (const longlong count)
 Sets the spin count for reading data from an SHM input stream. Advanced configuration option, use judiciously. More...
 
BuilderwithTimeout (int timeout)
 Sets the time in ms that the SHM Transport should wait for information before timing out a connection More...
 

Additional Inherited Members

- Protected Member Functions inherited from com::softwareag::umtransport::ServerContextBuilder
std::string getAdapter ()
 Get the value that is currently set for the adapter on this machine that Socket Transport will bind to, or gets the value that is currently set for the adapter on this machine that RDMA Transport will bind to. Connections will only be accepted on this adapter. "0.0.0.0" means all adapters on the machine. More...
 
int getBufferSize ()
 Get the buffer size in bytes that will be used by the ServerTransports More...
 
std::string getEnabledCiphers ()
 Get the ciphers that should be enabled (if supported) on the ServerTransport 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 getKeyStore ()
 Get the location of the key store where the server certificate is stored More...
 
std::string getKeyStorePassword ()
 Get the password that should be used to access the key store on the local machine 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...
 
int getReadBufferSize ()
 Get the current value that has been set for the read buffer size More...
 
longlong getSpinCount ()
 Gets the current active spin count. Advanced option for SHM transports only. More...
 
int getTimeout ()
 Returns the current value that has been set for the socket timeout, or gets the current value for the time in ms that the SHM Transport should wait for information before timing out a connection More...
 
std::string getTrustStore ()
 Get the location set of the trust store on the local machine More...
 
int getWriteBufferSize ()
 Get the current value that has been set for the write buffer size More...
 
bool isClientCertificateValidationRequired ()
 Used to determine whether or not the client is required to present a certificate. Currently client certificate validation is not supported. More...
 
ServerContextBuilderwithAdapter (const std::string &s)
 Set the value for the adapter on this machine that SocketTransport will bind to, or sets the value for the adapter on this machine that the Infiniband RDMA driver will bind to. Connections will only be accepted on this adapter. "0.0.0.0" means all adapters on the machine. More...
 
ServerContextBuilderwithBufferSize (int bufferSize)
 Set the buffer size in bytes that will be used by the SHM ServerTransports More...
 
ServerContextBuilderwithEnabledCiphers (const std::string &enabledCiphers)
 Set the ciphers that should be enabled (if supported) on the ServerTransport More...
 
ServerContextBuilderwithFilePath (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...
 
ServerContextBuilderwithKeyStore (const std::string &keyStore)
 Set the location of the key store where the server certificate is stored More...
 
ServerContextBuilderwithKeyStorePassword (const std::string &keyStorePassword)
 Set the password that should be used to access the key store keyStorePassword the key store password More...
 
ServerContextBuilderwithLockWait (const int count)
 Sets the waiting time (in nanoseconds) for yielding a spin lock. Advanced configuration option, use judiciously. More...
 
ServerContextBuilderwithPort (int port)
 Sets the server port that the ServerTransport should bind to More...
 
ServerContextBuilderwithReadBufferSize (int readBufferSize)
 Set the size in bytes of the read buffer that the ServerTransport should use More...
 
ServerContextBuilderwithSpinCount (const longlong count)
 Sets the spin count for reading data from an SHM input stream. Advanced configuration option, use judiciously. More...
 
ServerContextBuilderwithTimeout (int timeout)
 Sets the server timeout that any ServerSocket's created from this Builder will adhere to, or sets the time in ms that the SHM Transport should wait for information before timing out a connection More...
 
ServerContextBuilderwithTrustStore (const std::string &trustStore)
 Set the location of the trust store where certificates will be validated More...
 
ServerContextBuilderwithWriteBufferSize (int writeBufferSize)
 Set the size in bytes of the write buffer that the ServerTransport should use More...
 

Detailed Description

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

context = ServerSHMTransportContext::Builder()
.withFilePath("/path/to/directory")
.build();

Constructor & Destructor Documentation

com::softwareag::umtransport::ServerSHMTransportContext::Builder::Builder ( )

Construct a new instance of this Builder object.

Member Function Documentation

std::unique_ptr<ServerTransportContext> com::softwareag::umtransport::ServerSHMTransportContext::Builder::build ( )

Builds the ServerSHMTransportContext 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 ServerTransportContext;
Returns
ServerSHMTransportContext used by the TransportFactory.bind method to construct ServerTransports
int com::softwareag::umtransport::ServerSHMTransportContext::Builder::getBufferSize ( )

Get the buffer size in bytes that will be used by the ServerTransports

Returns
the size that has been set for the buffer
std::string com::softwareag::umtransport::ServerSHMTransportContext::Builder::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.

Returns
the file path that will be used by the Transport
int com::softwareag::umtransport::ServerSHMTransportContext::Builder::getLockWait ( )

Get the current wait time for yielding a spin lock. Advanced option for SHM transports only.

Returns
the wait time (in nanoseconds) used by the SHM Transport. Returns 0 if the value is not set, or could not be converted/translated.
longlong com::softwareag::umtransport::ServerSHMTransportContext::Builder::getSpinCount ( )

Gets the current active spin count. Advanced option for SHM transports only.

Returns
the spin count used by the SHM Transport. Returns 0 if the value is not set, or could not be converted/translated.
int com::softwareag::umtransport::ServerSHMTransportContext::Builder::getTimeout ( )

Returns the current time in ms that the SHM Transport should wait for information before timing out a connection

Returns
the timeout that this Builder will set for the ServerTransportContext
Builder& com::softwareag::umtransport::ServerSHMTransportContext::Builder::withBufferSize ( int  bufferSize)

Set the buffer size in bytes that will be used by the SHM ServerTransports

Returns
this Builder object so that methods can be chained
Builder& com::softwareag::umtransport::ServerSHMTransportContext::Builder::withFilePath ( 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.

Parameters
pathof the directory used for communication
Returns
this Builder object to allow methods to be chained
Builder& com::softwareag::umtransport::ServerSHMTransportContext::Builder::withLockWait ( const int  count)

Sets the waiting time (in nanoseconds) for yielding a spin lock. Advanced configuration option, use judiciously.

Parameters
countthe time (in nanoseconds) to yield a spin lock
Returns
this Builder object to allow methods to be chained
Builder& com::softwareag::umtransport::ServerSHMTransportContext::Builder::withSpinCount ( const longlong  count)

Sets the spin count for reading data from an SHM input stream. Advanced configuration option, use judiciously.

Parameters
countthe number of times to spin waiting for data to arrive
Returns
this Builder object to allow methods to be chained
Builder& com::softwareag::umtransport::ServerSHMTransportContext::Builder::withTimeout ( int  timeout)

Sets the time in ms that the SHM Transport should wait for information before timing out a connection

Parameters
timeoutthe timeout that will be bound to by the ServerTransport in milliseconds
Returns
this Builder object so that method calls can be chained