Represents a server side session, associated with a client connection. More...
#include <RcfSession.hpp>
Inherits enable_shared_from_this< RcfSession >.
Public Member Functions | |
RcfServer & | getRcfServer () |
Returns a reference to the RcfServer that owns this RcfSession. More... | |
void | disconnect () |
Disconnects this RcfSession. More... | |
Session objects | |
This section describes functions related to session objects. Session objects are objects created by application code, which are stored as part of the RcfSession. Their scope is limited to that of the RcfSession they are created within. If you need to create server-side objects which outlive individual RCF sessions, use server objects instead (see RcfServer). | |
template<typename T > | |
void | deleteSessionObject () |
Deletes a session object. More... | |
template<typename T > | |
T & | createSessionObject () |
Creates a session object. More... | |
template<typename T > | |
T & | getSessionObject (bool createIfDoesntExist=false) |
Retrieves a session object, and optionally creates it. More... | |
template<typename T > | |
T * | querySessionObject () |
Queries for the existence of a session object. More... | |
Custom request/response user data | |
The application data in a remote call is normally carried in the parameters of the remote call itself. RCF also allows you to add untyped custom data to the remote call request and response. | |
void | setRequestUserData (const std::string &userData) |
Sets application-specific data associated with the RCF request. More... | |
std::string | getRequestUserData () |
Gets application-specific data associated with the RCF request. More... | |
void | setResponseUserData (const std::string &userData) |
Sets application-specific data associated with the RCF response. More... | |
std::string | getResponseUserData () |
Gets application-specific data associated with the RCF response. More... | |
Connection information | |
This section describes functions relating to the current client connection. | |
std::uint32_t | getRuntimeVersion () |
Gets the RCF runtime version that is in use on this RcfSession. More... | |
void | setRuntimeVersion (std::uint32_t version) |
Sets the RCF runtime version that is in use on this RcfSession. More... | |
std::uint32_t | getArchiveVersion () |
Gets the archive version that is in use on this RcfSession. More... | |
void | setArchiveVersion (std::uint32_t version) |
Sets the archive version that is in use on this RcfSession. More... | |
const RemoteAddress & | getClientAddress () |
Gets a RemoteAddress object indicating the address of the client. More... | |
bool | isOneway () |
Gets a value indicating if the currently executing remote call is a one-way call. More... | |
std::uint32_t | getPingBackIntervalMs () |
Gets the ping-back interval for this RcfSession. More... | |
tstring | getClientUserName () |
Gets the authenticated user name of the client, if authentication has taken place. More... | |
TransportProtocol | getTransportProtocol () |
Gets the transport protocol in use on this RcfSession. More... | |
TransportType | getTransportType () |
Gets the underlying transport type of this RcfSession. More... | |
bool | getEnableCompression () |
Gets a value indicating if transport level compression is enabled for this RcfSession. More... | |
CertificatePtr | getClientCertificatePtr () |
Gets the certificate the client has presented, if any. Only applicable to SSL connections. More... | |
RemoteCallInfo | getRemoteCallRequest () const |
Returns information about the currently executing RCF request. More... | |
time_t | getConnectedAtTime () const |
Returns the time at which the client connected to this RcfSession. More... | |
std::size_t | getConnectionDuration () const |
Gets the connection duration of this RcfSession. More... | |
std::size_t | getRemoteCallCount () const |
Gets the total remote call count of this RcfSession. More... | |
std::uint64_t | getTotalBytesReceived () const |
Gets the total number of bytes received on this RcfSession. More... | |
std::uint64_t | getTotalBytesSent () const |
Gets the total number of bytes sent on this RcfSession. More... | |
void | setEnableSfPointerTracking (bool enable) |
Sets a value indicating if SF pointer tracking is enabled for this RcfSession. More... | |
bool | getEnableSfPointerTracking () const |
Gets a value indicating if SF pointer tracking is enabled for this RcfSession. More... | |
File transfers | |
This section describes functions related to file transfers. | |
std::string | configureDownload (const Path &downloadPath, BandwidthQuotaPtr quotaPtr=nullptr) |
Configures a file download from the given download path. Returns a download ID, which should be passed back to the client and used as a parameter in ClientStub::downloadFile(). More... | |
void | setAllowUploads (bool allowUploads) |
Sets whether file uploads are allowed for this RcfSession. By default file uploads are disabled. More... | |
bool | getAllowUploads () const |
Gets whether file uploads are allowed for this RcfSession. By default file uploads are disabled. More... | |
void | setUploadBandwidthQuota (BandwidthQuotaPtr quotaPtr) |
Sets the bandwidth quota associated with uploads on this RcfSession. By default a RcfSession does not have a bandwidth bucket associated with it. More... | |
BandwidthQuotaPtr | getUploadBandwidthQuota () const |
Gets the bandwidth quota associated with uploads on this RcfSession. By default a RcfSession does not have a bandwidth bucket associated with it. More... | |
Path | getUploadPath (const std::string &uploadId) |
Returns the path on disk, for the given upload. More... | |
Represents a server side session, associated with a client connection.
void RCF::RcfSession::deleteSessionObject | ( | ) |
Deletes a session object.
T& RCF::RcfSession::createSessionObject | ( | ) |
Creates a session object.
T& RCF::RcfSession::getSessionObject | ( | bool | createIfDoesntExist = false | ) |
Retrieves a session object, and optionally creates it.
T* RCF::RcfSession::querySessionObject | ( | ) |
Queries for the existence of a session object.
RcfServer& RCF::RcfSession::getRcfServer | ( | ) |
Returns a reference to the RcfServer that owns this RcfSession.
void RCF::RcfSession::disconnect | ( | ) |
Disconnects this RcfSession.
void RCF::RcfSession::setRequestUserData | ( | const std::string & | userData | ) |
Sets application-specific data associated with the RCF request.
std::string RCF::RcfSession::getRequestUserData | ( | ) |
Gets application-specific data associated with the RCF request.
void RCF::RcfSession::setResponseUserData | ( | const std::string & | userData | ) |
Sets application-specific data associated with the RCF response.
std::string RCF::RcfSession::getResponseUserData | ( | ) |
Gets application-specific data associated with the RCF response.
std::uint32_t RCF::RcfSession::getRuntimeVersion | ( | ) |
Gets the RCF runtime version that is in use on this RcfSession.
void RCF::RcfSession::setRuntimeVersion | ( | std::uint32_t | version | ) |
Sets the RCF runtime version that is in use on this RcfSession.
std::uint32_t RCF::RcfSession::getArchiveVersion | ( | ) |
Gets the archive version that is in use on this RcfSession.
void RCF::RcfSession::setArchiveVersion | ( | std::uint32_t | version | ) |
Sets the archive version that is in use on this RcfSession.
const RemoteAddress& RCF::RcfSession::getClientAddress | ( | ) |
Gets a RemoteAddress object indicating the address of the client.
bool RCF::RcfSession::isOneway | ( | ) |
Gets a value indicating if the currently executing remote call is a one-way call.
std::uint32_t RCF::RcfSession::getPingBackIntervalMs | ( | ) |
Gets the ping-back interval for this RcfSession.
tstring RCF::RcfSession::getClientUserName | ( | ) |
Gets the authenticated user name of the client, if authentication has taken place.
TransportProtocol RCF::RcfSession::getTransportProtocol | ( | ) |
Gets the transport protocol in use on this RcfSession.
TransportType RCF::RcfSession::getTransportType | ( | ) |
Gets the underlying transport type of this RcfSession.
bool RCF::RcfSession::getEnableCompression | ( | ) |
Gets a value indicating if transport level compression is enabled for this RcfSession.
CertificatePtr RCF::RcfSession::getClientCertificatePtr | ( | ) |
Gets the certificate the client has presented, if any. Only applicable to SSL connections.
RemoteCallInfo RCF::RcfSession::getRemoteCallRequest | ( | ) | const |
Returns information about the currently executing RCF request.
time_t RCF::RcfSession::getConnectedAtTime | ( | ) | const |
Returns the time at which the client connected to this RcfSession.
std::size_t RCF::RcfSession::getConnectionDuration | ( | ) | const |
Gets the connection duration of this RcfSession.
std::size_t RCF::RcfSession::getRemoteCallCount | ( | ) | const |
Gets the total remote call count of this RcfSession.
std::uint64_t RCF::RcfSession::getTotalBytesReceived | ( | ) | const |
Gets the total number of bytes received on this RcfSession.
std::uint64_t RCF::RcfSession::getTotalBytesSent | ( | ) | const |
Gets the total number of bytes sent on this RcfSession.
void RCF::RcfSession::setEnableSfPointerTracking | ( | bool | enable | ) |
Sets a value indicating if SF pointer tracking is enabled for this RcfSession.
bool RCF::RcfSession::getEnableSfPointerTracking | ( | ) | const |
Gets a value indicating if SF pointer tracking is enabled for this RcfSession.
std::string RCF::RcfSession::configureDownload | ( | const Path & | downloadPath, |
BandwidthQuotaPtr | quotaPtr = nullptr |
||
) |
Configures a file download from the given download path. Returns a download ID, which should be passed back to the client and used as a parameter in ClientStub::downloadFile().
void RCF::RcfSession::setAllowUploads | ( | bool | allowUploads | ) |
Sets whether file uploads are allowed for this RcfSession. By default file uploads are disabled.
bool RCF::RcfSession::getAllowUploads | ( | ) | const |
Gets whether file uploads are allowed for this RcfSession. By default file uploads are disabled.
void RCF::RcfSession::setUploadBandwidthQuota | ( | BandwidthQuotaPtr | quotaPtr | ) |
Sets the bandwidth quota associated with uploads on this RcfSession. By default a RcfSession does not have a bandwidth bucket associated with it.
BandwidthQuotaPtr RCF::RcfSession::getUploadBandwidthQuota | ( | ) | const |
Gets the bandwidth quota associated with uploads on this RcfSession. By default a RcfSession does not have a bandwidth bucket associated with it.
Path RCF::RcfSession::getUploadPath | ( | const std::string & | uploadId | ) |
Returns the path on disk, for the given upload.