Package flumotion :: Package component :: Package bouncers :: Module plug :: Class BouncerPlug
[hide private]

Class BouncerPlug

source code

                 object --+        
                          |        
extern.log.log.Loggable --+        
                          |        
            plugs.base.Plug --+    
                              |    
       plugs.base.ComponentPlug --+
                                  |
                                 BouncerPlug
Known Subclasses:

I am the base class for all bouncer plugs.

Instance Methods [hide private]
 
start(self, component) source code
 
authenticate(self, keycard) source code
 
set_expire_function(self, expire) source code
 
generateKeycardId(self) source code
 
addKeycard(self, keycard)
Adds a keycard to the keycards store.
source code
 
_addKeycard(self, keycard)
Adds a keycard without checking.
source code
 
removeKeycard(self, keycard) source code
 
removeKeycardId(self, keycardId) source code
 
expireKeycardId(self, keycardId) source code
 
expireKeycardIds(self, keycardIds) source code
 
on_keycardAdded(self, keycard)
Override to update sub-class specific data related to keycards.
source code
 
on_keycardRemoved(self, keycard)
Override to cleanup sub-class specific data related to keycards.
source code

Inherited from plugs.base.ComponentPlug: restart, stop

Inherited from plugs.base.Plug: __init__

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __str__, __subclasshook__

Inherited from extern.log.log.Loggable: __providedBy__, __provides__, debug, doLog, error, info, log, logFunction, logObjectName, warning, warningFailure, writeMarker

Class Variables [hide private]
  logCategory = 'bouncer-plug'
Implementors can provide a category to log their messages under.

Inherited from extern.log.log.Loggable: __implemented__

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

start(self, component)

source code 
Overrides: plugs.base.ComponentPlug.start

addKeycard(self, keycard)

source code 

Adds a keycard to the keycards store. Can be called with the same keycard more than one time. If the keycard has already been added successfully, adding it again will succeed and return True.

Parameters:
  • keycard - the keycard to add.
Returns:
if the plug accepts the keycard.

_addKeycard(self, keycard)

source code 

Adds a keycard without checking. Used by sub-class knowing what they do.

on_keycardAdded(self, keycard)

source code 

Override to update sub-class specific data related to keycards. Called when the base bouncer accepts and references a new keycard.

on_keycardRemoved(self, keycard)

source code 

Override to cleanup sub-class specific data related to keycards. Called when the base bouncer has cleanup his references to a keycard.