RAPP Platform API
 All Classes Namespaces Files Functions Variables Typedefs
RappCloud.ServiceController.ServiceControllerBase.ServiceControllerBase Class Reference
Inheritance diagram for RappCloud.ServiceController.ServiceControllerBase.ServiceControllerBase:
Collaboration diagram for RappCloud.ServiceController.ServiceControllerBase.ServiceControllerBase:

Public Member Functions

def __init__
 Constructor. More...
 
def basename
 Return the basename of input filepath. More...
 
def handle_exception
 Handles exceptions and return an error message that complies to the Exception caught. More...
 
def is_json
 Check if it is a json string. More...
 
def post_request
 General member method to perform a .post request to the. More...
 
def run_job
 

Public Attributes

 session_
 

Private Member Functions

def __mount_adapters
 Mount http and https Transport Adapters to the session. More...
 
def _post_persistent
 Post Request using active session - persistent connection. More...
 
def _post_session_once
 Post Request while initiating a new session. More...
 

Private Attributes

 __auth
 
 __customHeaders
 
 _service
 Cloud Service instance. More...
 

Detailed Description

Service Controller base class implementation 

Definition at line 44 of file ServiceControllerBase.py.

Constructor & Destructor Documentation

def RappCloud.ServiceController.ServiceControllerBase.ServiceControllerBase.__init__ (   self,
  service 
)

Constructor.

Parameters
serviceService: Service instance
connectiondictionary: Connection information.
timeoutint: Connection Timeout value.

Definition at line 47 of file ServiceControllerBase.py.

Member Function Documentation

def RappCloud.ServiceController.ServiceControllerBase.ServiceControllerBase.__mount_adapters (   self,
  session 
)
private

Mount http and https Transport Adapters to the session.

Parameters
sessionSession - The session to mount the adapters.

Definition at line 172 of file ServiceControllerBase.py.

def RappCloud.ServiceController.ServiceControllerBase.ServiceControllerBase._post_persistent (   self,
  url,
  data,
  files 
)
private

Post Request using active session - persistent connection.

Parameters
datadictionary - the data payload to send.
filesArray - Array of serialized File objects to send.

Definition at line 163 of file ServiceControllerBase.py.

def RappCloud.ServiceController.ServiceControllerBase.ServiceControllerBase._post_session_once (   self,
  url,
  data,
  files 
)
private

Post Request while initiating a new session.

Parameters
datadictionary - the data payload to send.
filesArray - Array of serialized File objects to send.

Definition at line 151 of file ServiceControllerBase.py.

def RappCloud.ServiceController.ServiceControllerBase.ServiceControllerBase.basename (   self,
  filepath 
)

Return the basename of input filepath.

Definition at line 87 of file ServiceControllerBase.py.

def RappCloud.ServiceController.ServiceControllerBase.ServiceControllerBase.handle_exception (   self,
  exc 
)

Handles exceptions and return an error message that complies to the Exception caught.

Parameters
excException of any type

Definition at line 181 of file ServiceControllerBase.py.

def RappCloud.ServiceController.ServiceControllerBase.ServiceControllerBase.is_json (   self,
  obj 
)

Check if it is a json string.

Parameters
objstring
Returns
- True if is a json. False otherwise.

Definition at line 70 of file ServiceControllerBase.py.

def RappCloud.ServiceController.ServiceControllerBase.ServiceControllerBase.post_request (   self,
  session,
  url,
  payload = {},
  files = [] 
)

General member method to perform a .post request to the.

Platform service. If files are specified, then multipart/form-data form is used. Otherwhise, x-www-urlencoded form is used.

Parameters
sessionThe session oject to use for this request.
urlpathThe complete urlpath of the request.
dataThe data to send. Literal.
filesFiles to send.
Returns
dictionary - Platform Service response.

Definition at line 93 of file ServiceControllerBase.py.

def RappCloud.ServiceController.ServiceControllerBase.ServiceControllerBase.run_job (   self)

Definition at line 83 of file ServiceControllerBase.py.

Member Data Documentation

RappCloud.ServiceController.ServiceControllerBase.ServiceControllerBase.__auth
private

Definition at line 62 of file ServiceControllerBase.py.

RappCloud.ServiceController.ServiceControllerBase.ServiceControllerBase.__customHeaders
private

Definition at line 64 of file ServiceControllerBase.py.

RappCloud.ServiceController.ServiceControllerBase.ServiceControllerBase._service
private

Cloud Service instance.

Definition at line 55 of file ServiceControllerBase.py.

RappCloud.ServiceController.ServiceControllerBase.ServiceControllerBase.session_

Definition at line 59 of file ServiceControllerBase.py.


The documentation for this class was generated from the following file: