OnixS C++ ICE Binary Order Entry Handler 1.1.1
API Documentation
Loading...
Searching...
No Matches
BusSession Class Reference

Public Member Functions

 BusSession (const SessionSettings &settings, SessionListener *listener, SessionStorageType::Enum storageType=SessionStorageType::FileBased, SessionStorage *storage=nullptr, const std::string &customKey={}, const Utils::BuildInfo &=Utils::consumerBuildInfo())
 BusSession (SessionReactor &stack, const SessionSettings &settings, SessionListener *listener, SessionStorageType::Enum storageType=SessionStorageType::FileBased, SessionStorage *storage=nullptr, const std::string &customKey={}, const Utils::BuildInfo &=Utils::consumerBuildInfo())
 BusSession (ServiceFactory &service, const SessionSettings &settings, SessionListener *listener, SessionStorageType::Enum storageType=SessionStorageType::FileBased, SessionStorage *storage=nullptr, const std::string &customKey={}, const Utils::BuildInfo &=Utils::consumerBuildInfo())
Sessionconnect (const std::string &host, Port port)
Threading::SharedFuture< void > connectAsync (const std::string &host, Port port)
Threading::SharedFuture< BgwCredentialsgetBgwCredentialsAsync (const std::string &userId, bool forceRequest=0) final
Public Member Functions inherited from Session
 Session (SessionType::Enum sessionType, const SessionSettings &settings, SessionListener *listener, SessionStorageType::Enum storageType=SessionStorageType::FileBased, SessionStorage *storage=nullptr, const std::string &customKey={}, const Utils::BuildInfo &=Utils::consumerBuildInfo())
 Session (SessionReactor &stack, SessionType::Enum sessionType, const SessionSettings &settings, SessionListener *listener, SessionStorageType::Enum storageType=SessionStorageType::FileBased, SessionStorage *storage=nullptr, const std::string &customKey={}, const Utils::BuildInfo &=Utils::consumerBuildInfo())
 Session (ServiceFactory &service, SessionType::Enum sessionType, const SessionSettings &settings, SessionListener *listener, SessionStorageType::Enum storageType=SessionStorageType::FileBased, SessionStorage *storage=nullptr, const std::string &customKey={}, const Utils::BuildInfo &=Utils::consumerBuildInfo())
 ~Session ()
std::string id () const
int clientId () const noexcept
std::string userId () const noexcept
std::string customKey () const
Sessionconnect (const std::string &host, Port port, const std::string &ipSessionToken={})
Threading::SharedFuture< void > connectAsync (const std::string &host, Port port, const std::string &ipSessionToken={})
Sessiondisconnect (const std::string &reason={})
Threading::SharedFuture< void > disconnectAsync (const std::string &reason={})
SessionbreakConnection ()
Threading::SharedFuture< void > breakConnectionAsync ()
template<typename SbeMessageType, size_t MaxMessageSize, typename MessageInitializer>
Sessionsend (Messaging::MessageHolder< SbeMessageType, MaxMessageSize, MessageInitializer > &msg, Messaging::Timestamp sendingTime=UtcWatch::now())
template<typename SbeMessageType, size_t MaxMessageSize, typename MessageInitializer>
Sessionsend (Messaging::MessageHolder< SbeMessageType, MaxMessageSize, MessageInitializer > &&msg, Messaging::Timestamp sendingTime=UtcWatch::now())
template<typename SbeMessageType, size_t MaxMessageSize, typename MessageInitializer>
Sessionsend (MessageBatch< SbeMessageType, MaxMessageSize, MessageInitializer > &msgs, Messaging::Timestamp sendingTime=UtcWatch::now(), size_t maxPacketSize=MaxPacketSize)
Sessionsend (MessageBatchCombiner &msgs, Messaging::Timestamp sendingTime=UtcWatch::now(), size_t maxPacketSize=MaxPacketSize)
Sessionsend (NetworkMessage *begin, NetworkMessage *end, Messaging::Timestamp sendingTime=UtcWatch::now(), size_t maxPacketSize=MaxPacketSize) ONIXS_ICEBOE_NONULL
Sessionsend (NetMessagesRange range, Messaging::Timestamp sendingTime=UtcWatch::now(), size_t maxPacketSize=MaxPacketSize)
SessionsendSequenceMessage ()
template<typename SbeMessageType, size_t MaxMessageSize>
SessionwarmUp (Messaging::MessageHolder< SbeMessageType, MaxMessageSize > &msg, Messaging::Timestamp sendingTime=UtcWatch::now(), int warmupFlags=0)
template<typename SbeMessageType, size_t MaxMessageSize, typename MessageInitializer>
SessionwarmUp (MessageBatch< SbeMessageType, MaxMessageSize, MessageInitializer > &msgs, Messaging::Timestamp sendingTime=UtcWatch::now(), size_t maxPacketSize=MaxPacketSize, int warmupFlags=0)
SessionwarmUp (MessageBatchCombiner &msgs, Messaging::Timestamp sendingTime=UtcWatch::now(), size_t maxPacketSize=MaxPacketSize, int warmupFlags=0)
SessionwarmUp (NetworkMessage *begin, NetworkMessage *end, Messaging::Timestamp sendingTime=UtcWatch::now(), size_t maxPacketSize=MaxPacketSize, int warmupFlags=0) ONIXS_ICEBOE_NONULL
SessionwarmUp (NetMessagesRange range, Messaging::Timestamp sendingTime=UtcWatch::now(), size_t maxPacketSize=MaxPacketSize, int warmupFlags=0)
Sessionthrottle ()
size_t tryThrottle ()
SessionthrottlingLimit (size_t messagesCount, size_t intervalInMs=1000)
std::string remoteHost () const
std::string remoteIpAddress () const
Port remotePort () const
std::pair< Port, PortlocalPortRange () const noexcept
SessionlocalPortRange (std::pair< Port, Port > portRange)
std::string localNetworkInterface () const
SessionlocalNetworkInterface (const std::string &value)
Port localPort () const
bool tcpNoDelayOption () const
SessiontcpNoDelayOption (bool value)
const SocketOptionssocketOptions () const
SessionsocketOptions (const SocketOptions &options)
SessionreceivingThreadAffinity (CpuIndex cpuIndex)
SessionreceivingThreadAffinity (const CpuIndexes &cpuIndexes)
const CpuIndexesreceivingThreadAffinity () const
SessionsendingThreadAffinity (CpuIndex cpuIndex)
SessionsendingThreadAffinity (const CpuIndexes &cpuIndexes)
const CpuIndexessendingThreadAffinity () const
int receivingThreadPriority () const
SessionreceivingThreadPriority (int priority)
int sendingThreadPriority () const
SessionsendingThreadPriority (int priority)
int receivingThreadPolicy () const
SessionreceivingThreadPolicy (int policy)
int sendingThreadPolicy () const
SessionsendingThreadPolicy (int policy)
unsigned receiveSpinningTimeout () const noexcept
SessionreceiveSpinningTimeout (unsigned timeoutInUs)
unsigned sendSpinningTimeout () const noexcept
SessionsendSpinningTimeout (unsigned timeoutInUs)
bool reportNewMessagesWhileWaitingForMissedMessages () const
SessionreportNewMessagesWhileWaitingForMissedMessages (bool value)
unsigned messageGrouping () const noexcept
SessionmessageGrouping (unsigned numberOfMessagesToGroup)
SessionStorageType::Enum storageType () const noexcept
const std::string & storageId () const noexcept
SeqNumber outSeqNum () const noexcept
SessionoutSeqNum (SeqNumber nextOutSeqNum)
SeqNumber inSeqNum () const
SessioninSeqNum (SeqNumber nextExpectedInSeqNum)
Sessionreset ()
SessionStateId::Enum state () const
Messaging::Timestamp creationTime () const noexcept
void flushSessionStorage ()
unsigned reconnectAttempts () const
SessionreconnectAttempts (unsigned reconnectAttempts)
unsigned reconnectInterval () const
SessionreconnectInterval (unsigned seconds)
bool localTimeUsage () const
SessionlocalTimeUsage (bool useLocalTime)
const std::string & storageDirectory () const
bool logBeforeSending () const
SessionlogBeforeSending (bool value)
size_t incomingMessageGapQueueMaximumSize () const
SessionincomingMessageGapQueueMaximumSize (size_t value)
const Sessionlog (const std::string &message) const
std::string toString () const
Messaging::Timestamp licenseExpirationDate () const
Messaging::SchemaVersion messagingVersion () const noexcept
Handle socketHandle ()
size_t outboundQueueBytes ()
bool getTcpInfo (TcpInfo &)
Public Member Functions inherited from IBgwCredentialsProvider
virtual ~IBgwCredentialsProvider ()=default

Additional Inherited Members

Static Public Member Functions inherited from Session
static const char * version () noexcept
Static Public Attributes inherited from Session
static const size_t MaxPacketSize = 1420
static const int UndefinedAffinity = -1
static const Handle InvalidSocketHandle
Protected Member Functions inherited from Session
Threading::SharedFuture< BgwCredentialsgetBgwCredentialsAsync (const std::string &userId, bool forceRequest)

Detailed Description

Definition at line 28 of file BusSession.h.

Constructor & Destructor Documentation

◆ BusSession() [1/3]

BusSession ( const SessionSettings & settings,
SessionListener * listener,
SessionStorageType::Enum storageType = SessionStorageType::FileBased,
SessionStorage * storage = nullptr,
const std::string & customKey = {},
const Utils::BuildInfo & = Utils::consumerBuildInfo() )
inline

Constructor.

Parameters
settingsSession settings.
listenerSession listener.
storageTypeSession storage type.
storageSession storage.
customKeyCustom key that could be used to distinguish sessions with the same UserID and ClientId values.

Definition at line 40 of file BusSession.h.

42 {}, const Utils::BuildInfo & = Utils::consumerBuildInfo())
43 : Session(SessionType::BUS, settings, listener, storageType, storage, customKey)
44 {}

◆ BusSession() [2/3]

BusSession ( SessionReactor & stack,
const SessionSettings & settings,
SessionListener * listener,
SessionStorageType::Enum storageType = SessionStorageType::FileBased,
SessionStorage * storage = nullptr,
const std::string & customKey = {},
const Utils::BuildInfo & = Utils::consumerBuildInfo() )
inline

Constructor.

Parameters
stackSession reactor stack.
settingsSession settings.
listenerSession listener.
storageTypeSession storage type.
storageSession storage.
customKeyCustom key that could be used to distinguish sessions with the same UserID and ClientId values.

Definition at line 56 of file BusSession.h.

58 {}, const Utils::BuildInfo & = Utils::consumerBuildInfo())
59 : Session(stack, SessionType::BUS, settings, listener, storageType, storage, customKey)
60 {}

◆ BusSession() [3/3]

BusSession ( ServiceFactory & service,
const SessionSettings & settings,
SessionListener * listener,
SessionStorageType::Enum storageType = SessionStorageType::FileBased,
SessionStorage * storage = nullptr,
const std::string & customKey = {},
const Utils::BuildInfo & = Utils::consumerBuildInfo() )
inline

Constructor.

Parameters
serviceService factory.
settingsSession settings.
listenerSession listener.
storageTypeSession storage type.
storageSession storage.
customKeyCustom key that could be used to distinguish sessions with the same UserID and ClientId values.

Definition at line 72 of file BusSession.h.

74 {}, const Utils::BuildInfo & = Utils::consumerBuildInfo())
75 : Session(service, SessionType::BUS, settings, listener, storageType, storage, customKey)
76 {}

Member Function Documentation

◆ connect()

Session & connect ( const std::string & host,
Port port )

Establishes the connection.

Parameters
hostGateway host.
portGateway port.
Returns
This session.

◆ connectAsync()

Threading::SharedFuture< void > connectAsync ( const std::string & host,
Port port )

Establishes the connection asynchronously.

Parameters
hostGateway host.
portGateway port.

◆ getBgwCredentialsAsync()

Threading::SharedFuture< BgwCredentials > getBgwCredentialsAsync ( const std::string & userId,
bool forceRequest = 0 )
finalvirtual

Asynchronously provides the BGW session connection credentials for the given user id.

Parameters
userIdGateway id.
forceRequestIf true, forces to request credentials even if they are already available.
Returns
A future to the BGW session connection credentials.

Implements IBgwCredentialsProvider.