RPKI Engine
1.0
|
Public Member Functions | |
def | __init__ |
def | __repr__ |
def | detach |
def | request |
def | restart |
def | return_result |
def | send_request |
Public Attributes | |
client | |
hostport | |
queue | |
Static Public Attributes | |
log = log_method |
Queue of pending HTTP requests for a single destination. This class is very tightly coupled to http_client; http_client handles the HTTP stream itself, this class provides a slightly higher-level API.
def rpki::http::http_queue::__repr__ | ( | self | ) |
Definition at line 824 of file http.py.
References rpki::http::addr_to_string(), and hostport.
def rpki::http::http_queue::detach | ( | self, | |
client_ | |||
) |
Detatch a client from this queue. Silently ignores attempting to detach a client that is not attached to this queue, to simplify handling of what otherwise would be a nasty set of race conditions.
Definition at line 871 of file http.py.
References client, rpki::http::http_stream::log, rpki::http::http_listener::log, and log.
Referenced by return_result().
def rpki::http::http_queue::request | ( | self, | |
requests | |||
) |
Append http_request object(s) to this queue.
Definition at line 833 of file http.py.
References rpki::http::http_stream::log, rpki::http::http_listener::log, and log.
def rpki::http::http_queue::restart | ( | self | ) |
Send next request for this queue, if we can. This may involve starting a new http_client stream, reusing an existing idle stream, or just ignoring this request if there's an active client stream already; in the last case, handling of the response (or exception, or timeout) for the query currently in progress will call this method when it's time to kick out the next query.
Definition at line 840 of file http.py.
References client, hostport, rpki::http::http_stream::log, rpki::http::http_listener::log, log, return_result(), rpki::http::http_client::send_request(), and send_request().
Referenced by return_result(), rpki::http::http_server::send_message(), and rpki::http::http_client::send_request().
def rpki::http::http_queue::return_result | ( | self, | |
client, | |||
result, | |||
detach = False |
|||
) |
Client stream has returned a result, which we need to pass along to the original caller. Result may be either an HTTP response message or an exception. In either case, once we're done processing this result, kick off next message in the queue, if any.
Definition at line 882 of file http.py.
References client, detach(), rpki::http::http_stream::log, rpki::http::http_listener::log, log, rpki::async::timer::queue, rpki::http::http_client::queue, queue, rpki::http::http_stream::restart(), and restart().
Referenced by restart().
def rpki::http::http_queue::send_request | ( | self | ) |
Kick out the next query in this queue, if any.
Definition at line 864 of file http.py.
References rpki::async::timer::queue, rpki::http::http_client::queue, and queue.
Referenced by restart().
Definition at line 827 of file http.py.
Referenced by detach(), restart(), return_result(), rpki::publication::control_elt::serve_dispatch(), and rpki::publication::publication_object_elt::serve_dispatch().
Definition at line 827 of file http.py.
Referenced by __repr__(), and restart().
rpki::http::http_queue::log = log_method [static] |
Definition at line 822 of file http.py.
Referenced by detach(), rpki::http::http_client::handle_close(), rpki::http::http_client::handle_connect(), rpki::http::http_client::handle_error(), rpki::http::http_server::handle_message(), rpki::http::http_client::handle_message(), rpki::http::http_client::handle_timeout(), request(), restart(), return_result(), rpki::http::http_server::send_message(), rpki::http::http_client::send_request(), rpki::http::http_client::set_state(), and rpki::http::http_client::start().
Definition at line 827 of file http.py.
Referenced by return_result(), and send_request().