Package xmpp :: Module commands :: Class Command_Handler_Prototype
[hide private]
[frames] | no frames]

Class Command_Handler_Prototype

source code

client.PlugIn --+
Known Subclasses:

This is a prototype command handler, as each command uses a disco method 
   and execute method you can implement it any way you like, however this is 
   my first attempt at making a generic handler that you can hang process 
   stages on too. There is an example command below.

The parameters are as follows:
name : the name of the command within the jabber environment
description : the natural language description
discofeatures : the features supported by the command
initial : the initial command in the from of {'execute':commandname}

All stages set the 'actions' dictionary for each session to represent the possible options available.

Instance Methods [hide private]
__init__(self, jid='')
Set up the class
source code
plugin(self, owner)
Plug command into the commands class
source code
Remove command from the commands class
source code
Returns an id for the command session
source code
Execute(self, conn, request)
The method that handles all the commands, and routes them to the correct method for that stage.
source code
_DiscoHandler(self, conn, request, type)
The handler for discovery events
source code

Inherited from client.PlugIn: DEBUG, PlugIn, PlugOut

Class Variables [hide private]
  name = 'examplecommand'
  count = 0
  description = 'an example command'
  discofeatures = ['', 'jabbe...
Method Details [hide private]

__init__(self, jid='')

source code 
Set up the class
Overrides: client.PlugIn.__init__

Class Variable Details [hide private]


['', 'jabber:x:data']