Package PyFoam :: Package Infrastructure :: Module FoamMetaServer :: Class FoamMetaServer
[hide private]
[frames] | no frames]

Class FoamMetaServer

source code

object --+
         |
        FoamMetaServer

The Metaserver.

Collects all the known FoamServers. Then waits for the servers to register themselves. Checks at regular intervalls whether the processes are still alive

Instance Methods [hide private]
  __init__(self, port=None)
  list(self)
Returns a list of the found Foam-Runs
  collect(self)
Starts a thread that collects the data of the servers from the net
  scan(self, additional)
Starts a thread that collects the data of the servers from the net
  kill(self)
Exits the server
  _suicide(self)
The server kills itself
  registerServer(self, ip, pid, port, external=False)
Registers a new server via XMLRPC
  _registerServer(self, ip, pid, port, external=False)
Registers a new server
  deregisterServer(self, ip, pid, port)
Deregisters a server
  forwardCommand(self, ip, port, cmd)
Forwards a RPC to another machine

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, port=None)
(Constructor)

source code 
Parameters:
  • port - The port on which the server should listen
Overrides: object.__init__

list(self)

source code 
Returns a list of the found Foam-Runs

collect(self)

source code 
Starts a thread that collects the data of the servers from the net

scan(self, additional)

source code 
Starts a thread that collects the data of the servers from the net
Parameters:
  • additional - a string with a list of additional subnets that should be scanned

kill(self)

source code 
Exits the server

_suicide(self)

source code 
The server kills itself

registerServer(self, ip, pid, port, external=False)

source code 
Registers a new server via XMLRPC
Parameters:
  • ip - IP of the server
  • pid - Die PID at the server
  • port - the port at which the server is listening

_registerServer(self, ip, pid, port, external=False)

source code 
Registers a new server
Parameters:
  • ip - IP of the server
  • pid - Die PID at the server
  • port - the port at which the server is listening
  • external - was called via XMLRPC

deregisterServer(self, ip, pid, port)

source code 
Deregisters a server
Parameters:
  • ip - IP of the server
  • pid - Die PID at the server
  • port - the port at which the server is listening

forwardCommand(self, ip, port, cmd)

source code 
Forwards a RPC to another machine
Parameters:
  • ip - IP of the server
  • port - the port at which the server is listening
  • cmd - the command that should be executed there
Returns:
the result of the command