Package diffpy :: Package pdfgui :: Package control :: Module serverhost :: Class ServerHost
[hide private]
[frames] | no frames]

Class ServerHost

source code

               object --+    
                        |    
pdfcomponent.PDFComponent --+
                            |
                           ServerHost

ServerHost holds the information about a remote machine where the 
pdfserver process is running. It can host multiple remote pdfserver.

Data members:

servers:    a list of local representatives of remote pdfserver instances
config:     configuration dictionary of remote host
connection: a ssh2 connection to remote host



Nested Classes [hide private]
  Server
Server is the local represetative of a remote pdfserver...
Instance Methods [hide private]
 
__init__(self, name, config)
initialize...
source code
 
getServer(self, bWait=False)
Get a pdfserver proxy...
source code
 
releaseServer(self, pdfserver)
Release a pdfserver proxy...
source code
 
close(self, force=False)
shut down connection to remote host...
source code
 
onError(self, address)
handle the error from connection...
source code
 
getConnection(self)
Get a verified and connected ssh transport.
source code

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

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, name, config)
(Constructor)

source code 
initialize

name -- component name 
config -- configuration for this proxy

Overrides: pdfcomponent.PDFComponent.__init__

getServer(self, bWait=False)

source code 
Get a pdfserver proxy

bWait -- wait for server or not (default False)        
return: a pdfserver proxy 

releaseServer(self, pdfserver)

source code 
Release a pdfserver proxy

pdfserver -- a pdfserver proxy

close(self, force=False)

source code 
shut down connection to remote host

force -- if shut down forcefully

Overrides: pdfcomponent.PDFComponent.close

onError(self, address)

source code 
handle the error from connection

address -- remote pdfserver address

getConnection(self)

source code 
Get a verified and connected ssh transport.

This tries to establish an ssh connection using the ssh2 protocol with a
preconfigured host. This uses paramiko's Agent class, which may work
differently on Windows.

return value: connection