Package rhn :: Module rpclib :: Class Server
[hide private]
[frames] | no frames]

Class Server

source code


uri [,options] -> a logical connection to an XML-RPC server

uri is the connection point on the server, given as
scheme://host/target.

The standard implementation always supports the "http" scheme.  If
SSL socket support is available (Python 2.0), it also supports
"https".

If the target part and the slash preceding it are both omitted,
"/RPC2" is assumed.

The following options can be given as keyword arguments:

    transport: a transport factory
    encoding: the request encoding (default is UTF-8)
    verbose: verbosity level
    proxy: use an HTTP proxy
    username: username for authenticated HTTP proxy
    password: password for authenticated HTTP proxy

All 8-bit strings passed to the server proxy are assumed to use
the given encoding.

Nested Classes [hide private]
  _transport_class
  _transport_class_https
  _transport_class_proxy
  _transport_class_https_proxy
Instance Methods [hide private]
 
__init__(self, uri, transport=None, encoding=None, verbose=0, proxy=None, username=None, password=None, refreshCallback=None, progressCallback=None, timeout=None) source code
 
default_transport(self, type, proxy=None, username=None, password=None, timeout=None) source code
 
allow_redirect(self, allow) source code
 
redirected(self) source code
 
set_refresh_callback(self, refreshCallback) source code
 
set_buffer_size(self, bufferSize) source code
 
set_progress_callback(self, progressCallback, bufferSize=16384) source code
 
_req_body(self, params, methodname) source code
 
get_response_headers(self) source code
 
get_response_status(self) source code
 
get_response_reason(self) source code
 
get_content_range(self)
Returns a dictionary with three values:...
source code
 
accept_ranges(self) source code
 
_reset_host_handler_and_type(self)
Reset the attributes: self._host, self._handler, self._type according the value of self._uri.
source code
 
_strip_characters(self, *args)
Strip characters, which are not allowed according: http://www.w3.org/TR/2006/REC-xml-20060816/#charsets From spec: Char ::= #x9 | #xA | #xD | [#x20-#xD7FF] | [#xE000-#xFFFD] | [#x10000-#x10FFFF] /* any Unicode character, excluding the surrogate blocks, FFFE, and FFFF.
source code
 
_request(self, methodname, params)
Call a method on the remote server we can handle redirections.
source code
 
__repr__(self) source code
 
__str__(self) source code
 
__getattr__(self, name) source code
 
set_transport_flags(self, transfer=0, encoding=0, **kwargs) source code
 
get_transport_flags(self) source code
 
reset_transport_flags(self) source code
 
set_header(self, name, arg) source code
 
add_header(self, name, arg) source code
 
setlang(self, lang) source code
 
use_CA_chain(self, ca_chain=None) source code
 
add_trusted_cert(self, certfile) source code
 
close(self) source code
Method Details [hide private]

get_content_range(self)

source code 
Returns a dictionary with three values:
 length: the total length of the entity-body (can be None)
 first_byte_pos: the position of the first byte (zero based)
 last_byte_pos: the position of the last byte (zero based)
The range is inclusive; that is, a response 8-9/102 means two bytes

_strip_characters(self, *args)

source code 

Strip characters, which are not allowed according: http://www.w3.org/TR/2006/REC-xml-20060816/#charsets From spec: Char ::= #x9 | #xA | #xD | [#x20-#xD7FF] | [#xE000-#xFFFD] | [#x10000-#x10FFFF] /* any Unicode character, excluding the surrogate blocks, FFFE, and FFFF. */