objects.storage.storageInterface.storageInterface Class Reference

Generic interface to a Short Lived Database of TCP/IP data. More...

Inherited by objects.storage.sqlite3Impl.sqlite3Impl.

List of all members.

Public Member Functions

def __init__
def createStorage
 Creates an empty database file.
def deleteStorage
 Deletes the database file.
def open
 Opens the database file.
def close
 Closes the database file.
def query
 Returns a RecordEet given the supplied parameters.
def store
 Saves a single decodedPacketDict Object to the database.
def commit
 Performs a commit on the database.
def clear
 Deletes all data from the database.
def getStorageSizeBytes
 Returns the size of the database file in KB.

Public Attributes

 notifyCallbackObject
 errorCallBackFunc


Detailed Description

Generic interface to a Short Lived Database of TCP/IP data.

Note that since Python does not really support interfaces, this is really just an experiment. Note how all functions simply raise a "not implemented" exception.

Definition at line 23 of file storageInterface.py.


Member Function Documentation

def objects.storage.storageInterface.storageInterface.__init__ (   self  ) 

Definition at line 25 of file storageInterface.py.

00025                       :
00026         self.notifyCallbackObject = None
00027         
00028         # error call back function, should take 1 string parameter
00029         # representing the actual error
00030         self.errorCallBackFunc    = None
00031             
00032             
    ## Creates an empty database file.

def objects.storage.storageInterface.storageInterface.clear (   self  ) 

Deletes all data from the database.

Reimplemented in objects.storage.sqlite3Impl.sqlite3Impl.

Definition at line 66 of file storageInterface.py.

00066                    : raise exception("not implemented", True)
00067     
00068        

def objects.storage.storageInterface.storageInterface.close (   self  ) 

Closes the database file.

Reimplemented in objects.storage.sqlite3Impl.sqlite3Impl.

Definition at line 46 of file storageInterface.py.

00046                    :  raise exception("not implemented", True) 
00047     
00048     

def objects.storage.storageInterface.storageInterface.commit (   self  ) 

Performs a commit on the database.

Reimplemented in objects.storage.sqlite3Impl.sqlite3Impl.

Definition at line 62 of file storageInterface.py.

00062                     : raise exception("not implemented", True)
00063     
00064     

def objects.storage.storageInterface.storageInterface.createStorage (   self  ) 

Creates an empty database file.

Reimplemented in objects.storage.sqlite3Impl.sqlite3Impl.

Definition at line 34 of file storageInterface.py.

00034                            : raise exception("not implemented", True)
00035     
00036     

def objects.storage.storageInterface.storageInterface.deleteStorage (   self  ) 

Deletes the database file.

Reimplemented in objects.storage.sqlite3Impl.sqlite3Impl.

Definition at line 38 of file storageInterface.py.

00038                            : raise exception("not implemented", True)
00039     
00040     

def objects.storage.storageInterface.storageInterface.getStorageSizeBytes (   self  ) 

Returns the size of the database file in KB.

Reimplemented in objects.storage.sqlite3Impl.sqlite3Impl.

Definition at line 70 of file storageInterface.py.

00070                                  : raise exception("not implemented", True)
00071     
00072     
00073     
00074 #    def notify(self, packetDict, header, data):
00075 #        if self.notifyCallbackObject != None and packetDict != None:
00076 #            self.notifyCallbackObject.newPacketNotification(packetDict, header, data)
00077 #            
00078     
00079 #    def registerNotifyCallBack(self, callbackObject):
00080 #        self.notifyCallbackObject = callbackObject
00081     
00082     # callback function for errors    
00083 #    def registerErrorCallBackFunc(self, callbackFunc):
00084 #        self.errorCallBackFunc = callbackFunc
00085     
00086     
00087     
00088     
00089     

def objects.storage.storageInterface.storageInterface.open (   self  ) 

Opens the database file.

Reimplemented in objects.storage.sqlite3Impl.sqlite3Impl.

Definition at line 42 of file storageInterface.py.

00042                   : raise exception("not implemented", True)
00043     
00044     

def objects.storage.storageInterface.storageInterface.query (   self,
  dstIP,
  srcPort,
  dstPort 
)

Returns a RecordEet given the supplied parameters.

Parameters:
dstIP Destination IP Address String
srcPort Source Port Integer
dstPort Destination Port Integer

Reimplemented in objects.storage.sqlite3Impl.sqlite3Impl.

Definition at line 53 of file storageInterface.py.

00053                                             : raise exception("not implemented", True)
00054     
00055     

def objects.storage.storageInterface.storageInterface.store (   self,
  decodedPacketDict 
)

Saves a single decodedPacketDict Object to the database.

Parameters:
decodedPacketDict Dictionary

Reimplemented in objects.storage.sqlite3Impl.sqlite3Impl.

Definition at line 58 of file storageInterface.py.

00058                                       : raise exception("not implemented", True)
00059     
00060     


Member Data Documentation

Reimplemented in objects.storage.sqlite3Impl.sqlite3Impl.

Definition at line 30 of file storageInterface.py.

Definition at line 26 of file storageInterface.py.


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

Generated on Mon Mar 30 00:26:47 2009 for EyeSpy by  doxygen 1.5.8