Package beepy :: Package profiles :: Module beepmgmtprofile :: Class BEEPManagementProfile
[show private | hide private]
[frames | no frames]

Class BEEPManagementProfile

Profile --+
          |
         BEEPManagementProfile


The BEEPManagementProfile is used on Channel 0 for all Sessions to control the management of the Session and all channels on it.
Method Summary
  __init__(self, session)
Create a new profile instance for the given session.
  closeChannel(self, channelnum, closedOk, closedError, code)
closeChannel() attempts to close a Channel at the remote end by sending a <close> message to the remote end.
  getChannelState(self, channelnum)
  isChannelError(self, channelnum)
  processMessage(self, msg)
process any incoming Messages
  sendGreeting(self)
sendGreetingMessage() places a special kind of RPY message onto the outbound Queue.
  startChannel(self, channelnum, profileList, startedOk, startedError, serverName)
startChannel() attempts to start a new Channel by sending a message on the management channel to the remote end, requesting a channel start.
  _completeClosure(self, msgno)
Used as a callback for the successful sending of a close confirmation message.
  _handleClose(self, msg, mgmtMsg)
_handleClose() is an internal method used from within doProcessing() to split it up a bit and make it more manageable It deals with <close> MSG frames
  _handleError(self, msg, mgmtMsg)
called from doProcessing() to handle ERR frames
  _handleOK(self, msg, mgmtMsg)
_handleOK is an internal method used from within doProcessing() to split it up a bit and make it more manageable It deals with <ok> MSG frames, such as those used to confirm a channel close.
  _handleProfile(self, msg, mgmtMsg)
  _handleStart(self, msg, mgmtMsg)
_handleStart() is an internal method used from within doProcessing() to split it up a bit and make it more manageable.
    Inherited from Profile
  mimeDecode(self, payload)
mimeDecode() is a convenience function used to help make life easier for profile programmers, like me.
  mimeEncode(self, payload, contentType, encoding)
mimeEncode() is a convenience function used to help make life easier for profile programmers, like me.
  setChannel(self, channel)
setChannel() binds this Profile to the Channel it belongs to.

Class Variable Summary
int CHANNEL_CLOSED = 4                                                                     
int CHANNEL_CLOSING = 3                                                                     
int CHANNEL_ERROR = 5                                                                     
int CHANNEL_OPEN = 2                                                                     
int CHANNEL_STARTING = 1                                                                     
str CONTENT_TYPE = 'application/beep+xml'

Method Details

__init__(self, session)
(Constructor)

Create a new profile instance for the given session.
Parameters:
session - the session this profile's channel is on.
Overrides:
beepy.profiles.profile.Profile.__init__

closeChannel(self, channelnum, closedOk, closedError, code='200')

closeChannel() attempts to close a Channel at the remote end by sending a <close> message to the remote end.

processMessage(self, msg)

process any incoming Messages
Parameters:
msg - an incoming DataFrame object
Overrides:
beepy.profiles.profile.Profile.processMessage

sendGreeting(self)

sendGreetingMessage() places a special kind of RPY message onto the outbound Queue. This is designed to be used once at the beginning of a Session initialisation, so it doesn't use the standard rules for sequence numbers

startChannel(self, channelnum, profileList, startedOk, startedError, serverName=None)

startChannel() attempts to start a new Channel by sending a message on the management channel to the remote end, requesting a channel start.

_completeClosure(self, msgno)

Used as a callback for the successful sending of a close confirmation message.

_handleClose(self, msg, mgmtMsg)

_handleClose() is an internal method used from within doProcessing() to split it up a bit and make it more manageable It deals with <close> MSG frames

_handleError(self, msg, mgmtMsg)

called from doProcessing() to handle ERR frames

_handleOK(self, msg, mgmtMsg)

_handleOK is an internal method used from within doProcessing() to split it up a bit and make it more manageable It deals with <ok> MSG frames, such as those used to confirm a channel close.

_handleStart(self, msg, mgmtMsg)

_handleStart() is an internal method used from within doProcessing() to split it up a bit and make it more manageable. It deals with <start> MSG frames

Class Variable Details

CHANNEL_CLOSED

Type:
int
Value:
4                                                                     

CHANNEL_CLOSING

Type:
int
Value:
3                                                                     

CHANNEL_ERROR

Type:
int
Value:
5                                                                     

CHANNEL_OPEN

Type:
int
Value:
2                                                                     

CHANNEL_STARTING

Type:
int
Value:
1                                                                     

CONTENT_TYPE

Type:
str
Value:
'application/beep+xml'                                                 

Generated by Epydoc 2.0 on Thu Sep 30 14:39:25 2004 http://epydoc.sf.net