#include <httpclientregistry.h>
The HttpClientRegistry provides a way to re-use existing connections to HTTP servers instead of setting up a HTTP connection for every single HTTP request.
- Copyright
- (C) 2009 Radon Labs GmbH (C) 2013-2020 Individual contributors, see AUTHORS file
Inherits Core::RefCounted.
|
| HttpClientRegistry () |
| constructor
|
|
virtual | ~HttpClientRegistry () |
| destructor
|
|
void | Setup () |
| setup the client registry
|
|
void | Discard () |
| discard the client registry, closes all open connections
|
|
bool | IsValid () const |
| return true if the object has been setup
|
|
Ptr< HttpClient > | ObtainConnection (const IO::URI &uri) |
| open a connection to a HTTP server, reuse connection if already connected
|
|
void | ReleaseConnection (const IO::URI &uri) |
| give up connection to a HTTP server, this will NEVER disconnect!
|
|
bool | IsConnected (const IO::URI &uri) const |
| check if a connection to an HTTP server exists
|
|
void | DisconnectIdle () |
| disconnect all connections with a zero use count
|
|
| RefCounted () |
| constructor
|
|
int | GetRefCount () const |
| get the current refcount
|
|
void | AddRef () |
| increment refcount by one
|
|
void | Release () |
| decrement refcount and destroy object if refcount is zero
|
|
bool | IsInstanceOf (const Rtti &rtti) const |
| return true if this object is instance of given class
|
|
bool | IsInstanceOf (const Util::String &className) const |
| return true if this object is instance of given class by string
|
|
bool | IsInstanceOf (const Util::FourCC &classFourCC) const |
| return true if this object is instance of given class by fourcc
|
|
bool | IsA (const Rtti &rtti) const |
| return true if this object is instance of given class, or a derived class
|
|
bool | IsA (const Util::String &rttiName) const |
| return true if this object is instance of given class, or a derived class, by string
|
|
bool | IsA (const Util::FourCC &rttiFourCC) const |
| return true if this object is instance of given class, or a derived class, by fourcc
|
|
const Util::String & | GetClassName () const |
| get the class name
|
|
Util::FourCC | GetClassFourCC () const |
| get the class FourCC code
|
|
|
static void | DumpRefCountingLeaks () |
| dump refcounting leaks, call at end of application (NEBULA_DEBUG builds only!)
|
|
virtual | ~RefCounted () |
| destructor (called when refcount reaches zero)
|
|
◆ HttpClientRegistry()
Http::HttpClientRegistry::HttpClientRegistry |
( |
| ) |
|
◆ ~HttpClientRegistry()
Http::HttpClientRegistry::~HttpClientRegistry |
( |
| ) |
|
|
virtual |
◆ __DeclareClass()
◆ __DeclareSingleton()
◆ Discard()
void Http::HttpClientRegistry::Discard |
( |
| ) |
|
discard the client registry, closes all open connections
◆ DisconnectIdle()
void Http::HttpClientRegistry::DisconnectIdle |
( |
| ) |
|
disconnect all connections with a zero use count
This disconnects all connections with a use count of 0.
◆ IsConnected()
bool Http::HttpClientRegistry::IsConnected |
( |
const IO::URI & | uri | ) |
const |
check if a connection to an HTTP server exists
◆ IsValid()
bool Http::HttpClientRegistry::IsValid |
( |
| ) |
const |
|
inline |
return true if the object has been setup
◆ ObtainConnection()
open a connection to a HTTP server, reuse connection if already connected
◆ ReleaseConnection()
void Http::HttpClientRegistry::ReleaseConnection |
( |
const IO::URI & | uri | ) |
|
give up connection to a HTTP server, this will NEVER disconnect!
◆ Setup()
void Http::HttpClientRegistry::Setup |
( |
| ) |
|
setup the client registry
◆ connections
◆ isValid
bool Http::HttpClientRegistry::isValid |
|
private |
The documentation for this class was generated from the following files: