App Engine Python SDK  v1.6.9 rev.445
The Python runtime is available as an experimental Preview feature.
Public Member Functions | List of all members
google.appengine.ext.webapp.xmpp_handlers.CommandHandlerMixin Class Reference
Inheritance diagram for google.appengine.ext.webapp.xmpp_handlers.CommandHandlerMixin:
google.appengine.ext.webapp.xmpp_handlers.CommandHandler

Public Member Functions

def unhandled_command
 
def text_message
 
def message_received
 

Detailed Description

A command handler for XMPP bots.

Implements a command handler pattern. XMPP messages are processed by calling
message_received. Message objects handled by this class are annotated with
'command' and 'arg' fields. On receipt of a message starting with a forward
or backward slash, the handler calls a method named after the command - eg,
if the user sends "/foo bar", the handler will call foo_command(message).
If no handler method matches, unhandled_command is called. The default behaviour
of unhandled_command is to send the message "Unknown command" back to
the sender.

If the user sends a message not prefixed with a slash,
text_message(message) is called.

Member Function Documentation

def google.appengine.ext.webapp.xmpp_handlers.CommandHandlerMixin.message_received (   self,
  message 
)
Called when a message is sent to the XMPP bot.

Args:
  message: Message: The message that was sent by the user.
def google.appengine.ext.webapp.xmpp_handlers.CommandHandlerMixin.text_message (   self,
  message 
)
Called when a message not prefixed by a /command is sent to the XMPP bot.

Args:
  message: Message: The message that was sent by the user.
def google.appengine.ext.webapp.xmpp_handlers.CommandHandlerMixin.unhandled_command (   self,
  message 
)
Called when an unknown command is sent to the XMPP bot.

Args:
  message: Message: The message that was sent by the user.

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