Package pyamf :: Package remoting :: Package client :: Class RemotingService
[hide private]
[frames] | no frames]

Class RemotingService

source code


Acts as a client for AMF calls.

Instance Methods [hide private]
 
__init__(self, url, amf_version=0, client_type=0)
x.__init__(...) initializes x; see x.__class__.__doc__ for signature
source code
 
_setUrl(self, url) source code
 
addHeader(self, name, value, must_understand=False)
Sets a persistent header to send with each request.
source code
ServiceProxy
getService(self, name, auto_execute=True)
Returns a ServiceProxy for the supplied name.
source code
 
getRequest(self, id_)
Gets a request based on the id.
source code
 
addRequest(self, service, *args)
Adds a request to be sent to the remoting gateway.
source code
 
removeRequest(self, service, *args)
Removes a request from the pending request list.
source code
Envelope
getAMFRequest(self, requests)
Builds an AMF request envelope from a supplied list of requests.
source code
 
execute_single(self, request)
Builds, sends and handles the response to a single request, returning the response.
source code
 
execute(self)
Builds, sends and handles the responses to all requests listed in self.requests.
source code
 
_getResponse(self)
Gets and handles the HTTP response from the remote gateway.
source code
 
setCredentials(self, username, password)
Sets authentication credentials for accessing the remote gateway.
source code

Inherited from object: __delattr__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __str__

Instance Variables [hide private]
int amf_version
The AMF version to use.
  client_type
The client type.
httplib.HTTPConnection or httplib.HTTPSConnection connection
The underlying connection to the remoting server.
HeaderCollection headers
A list of persistent headers to send with each request.
  request_number
A unique identifier for an tracking the number of requests.
list requests
The list of pending requests to process.
str url
The url of the remote gateway.
Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, url, amf_version=0, client_type=0)
(Constructor)

source code 

x.__init__(...) initializes x; see x.__class__.__doc__ for signature

Overrides: object.__init__
(inherited documentation)

getService(self, name, auto_execute=True)

source code 

Returns a ServiceProxy for the supplied name. Sets up an object that can have method calls made to it that build the AMF requests.

Returns: ServiceProxy
Raises:
  • TypeError - string type required for name.

getRequest(self, id_)

source code 

Gets a request based on the id.

Raises:
  • LookupError - Request not found.

removeRequest(self, service, *args)

source code 

Removes a request from the pending request list.

Raises:
  • LookupError - Request not found.

getAMFRequest(self, requests)

source code 

Builds an AMF request envelope from a supplied list of requests.

Parameters:
  • requests (list) - List of requests
Returns: Envelope

execute_single(self, request)

source code 

Builds, sends and handles the response to a single request, returning the response.

Parameters:
  • request ()

Instance Variable Details [hide private]

amf_version

The AMF version to use. See ENCODING_TYPES.
Type:
int

client_type

The client type. See ClientTypes.

url

The url of the remote gateway. Accepts http or https as schemes.
Type:
str