Home | Trees | Index | Help |
---|
Package beepy :: Package core :: Module session :: Class Session |
|
Initiator
,
Listener
,
SASLSession
,
TLSSession
Method Summary | |
---|---|
Create a new Session. | |
What to do if a channel close fails | |
Override this method to receive notification of channel closure | |
Action to take when a positive RPY to a channel start message is received. | |
Action to take when a negative RPY to a channel start message is received. | |
close(self)
| |
Attempts to close all channels on this Session | |
requestCloseChannel() attempts to close a channel. | |
Creates a new channel with the given channel number and binds the given profile to it for processing. | |
Attempts to create a channel given a list of possible profiles to bind to the channel. | |
Create the Channel 0 for the Session. | |
This method should be overridden at the transport layer if there is any special work that needs to be done at channel create time. | |
Attempt to delete all channels on the session | |
Delete a single channel from the Session | |
Get the channel object associated with a given channelnum | |
Get the state of a particular channel. | |
Returns this session's profile dictionary. | |
This is a callback from the management profile to trigger processing once the connection greeting is received from the remote end. | |
This method provides a way of figuring out if a channel is running. | |
Attempt to start a new Channel with a given profile. | |
Allocate a given frame to the channel it belongs to and call the channel's processing method. | |
Use this callback from your profiles to communicate with your apps when an ANS frame is received. | |
Use this callback from your profiles to communicate with your apps when a MSG frame is received. | |
Sets the channel number of the first channel that should be created. | |
Attempts to close all the channels in a session before closing down the session itself. | |
Called when the Session has completed its shutdown | |
startChannel() attempts to start a new channel for communication. | |
Called by a profile when a tuning reset process begins. | |
A tuning reset causes all channels, including channel Zero to be closed and a new channel zero to be created, with a new greeting sent. | |
Internal channel closure error handling | |
Internal channel closure method. | |
This method gets all pending messages from all channels one at a time and places them on the Session Outbound Queue. | |
This method provides a way of getting the channel object by number. | |
Deprecated. | |
A greeting may be received in two circumstances: | |
Checks to see if the channel has encountered an error condition. | |
reset() does a tuning reset which closes all channels and terminates the session. | |
_setID(self,
sessId)
| |
_showInternalState(self)
|
Method Details |
---|
__init__(self)
Create a new Session.
|
channelClosedError(self, channelnum, code, desc)What to do if a channel close fails |
channelClosedSuccess(self, channelnum)Override this method to receive notification of channel closure |
channelStarted(self, channelnum, uri)Action to take when a positive RPY to a channel start message is received. Default is to do nothing, so override this in your subclass if you want anything to happen at this event.
|
channelStartedError(self, channelnum)Action to take when a negative RPY to a channel start message is received.
|
closeAllChannels(self)Attempts to close all channels on this Session |
closeChannel(self, channelnum)requestCloseChannel() attempts to close a channel.
|
createChannel(self, channelnum, profile)Creates a new channel with the given channel number and binds the given profile to it for processing.
|
createChannelFromURIList(self, channelnum, uriList, profileInit=None)Attempts to create a channel given a list of possible profiles to bind to the channel. Searches the Session's ProfileDict for the first supported profile and then creates a channel bound to that profile. This is used on the Listener side of a connection.
|
createChannelZero(self)Create the Channel 0 for the Session. A special case of createChannel that explicitly binds the channel to the BEEPManagementProfile. Should only get called once when a Session initialises |
createTransportChannel(self, channelnum)This method should be overridden at the transport layer if there is any special work that needs to be done at channel create time. |
deleteAllChannels(self)Attempt to delete all channels on the session |
deleteChannel(self, channelnum)Delete a single channel from the Session
|
getChannel(self, channelnum)Get the channel object associated with a given channelnum |
getChannelState(self, channelnum)Get the state of a particular channel. |
getProfileDict(self)Returns this session's profile dictionary. |
greetingReceived(self)This is a callback from the management profile to trigger processing once the connection greeting is received from the remote end. Servers don't really do anything with this, but it's important for clients. |
isChannelActive(self, channelnum)This method provides a way of figuring out if a channel is running.
|
newChannel(self, profile, chardata=None, encoding=None)Attempt to start a new Channel with a given profile. This method is used by a peer to request a BEEP peer to start a new channel with the given profile. This is mostly a convenience function for the common case of starting a simple channel with a single profile. For more complex start scenarios, use startChannel().
|
processFrame(self, theframe)Allocate a given frame to the channel it belongs to and call the channel's processing method.
|
receivedAnswer(self, frame)Use this callback from your profiles to communicate with your apps when an ANS frame is received. |
receivedMessage(self, frame)Use this callback from your profiles to communicate with your apps when a MSG frame is received. |
setStartingChannelNum(self)Sets the channel number of the first channel that should be created. This is used to differentiate between Listener channels and Initiator channels. Is overridden in subclasses. |
shutdown(self)Attempts to close all the channels in a session before closing down the session itself. |
shutdownComplete(self)Called when the Session has completed its shutdown |
startChannel(self, profileList)startChannel() attempts to start a new channel for communication. It uses a more complex profileList to determine what to send to the remote peer as part of the start request. the profileList is a list of lists with the following structure: [ uri, encoding, chardata ] where uri is a string URI of the profile to request, encoding is an optional encoding to use and chardata is any initialisation data to send as part of the start message. To start a channel with the echoprofile and no special requirements, you would use a list like this: [ [echoprofile.uri, None, None] ] To try to start a channel first using SASL/OTP, then SASL/ANONYMOUS, you would use a list like this: [ [saslotpprofile.uri, None, None], [saslanonymousprofile.uri, None, None] ] More complex scenarios are possible. |
tuningBegin(self)Called by a profile when a tuning reset process begins. This is to notify the session that we're just waiting for confirmation of the tuning reset from the remote end. |
tuningReset(self)A tuning reset causes all channels, including channel Zero to be closed and a new channel zero to be created, with a new greeting sent. This is used for turning on TLS. |
_channelClosedError(self, channelnum, code, desc)Internal channel closure error handling |
_channelClosedSuccess(self, channelnum)Internal channel closure method. |
_flushChannelOutbound(self)This method gets all pending messages from all channels one at a time and places them on the Session Outbound Queue. This should probably only be used in Tuning Resets, but you never know when it might come in handy. Deprecated. |
_getActiveChannel(self, channelnum)This method provides a way of getting the channel object by number. Deprecated |
_getChannelZeroProfile(self)Deprecated. |
_handleGreeting(self)A greeting may be received in two circumstances:
|
_isChannelError(self, channelnum)Checks to see if the channel has encountered an error condition. Deprecated. |
_reset(self)reset() does a tuning reset which closes all channels and terminates the session. Deprecated. |
Home | Trees | Index | Help |
---|
Generated by Epydoc 2.0 on Thu Sep 30 14:39:25 2004 | http://epydoc.sf.net |