Package AccessGrid :: Module Events :: Class MarshalledEvent
[show private | hide private]
[frames | no frames]

Class MarshalledEvent


Class to contain an event marshalled into the wire form.

Typical uses:

App reads data according to a wire protocol that matches
the protocol used here (pkt size + pickling). (This is a flaw
in the design of this, but as this is an attempt to partially
encapsulate something that's currently not at all encapsulated
it is sufficient if used with care):

myData = (get the data somehow)
me = MarshalledEvent()
me.SetData(myData)
myEvent = me.GetEvent()

App has an event that it wants to send to multiple file handles:

me = MarshalledEvent()
me.SetEvent(myEvent)
for fh in handles():
    me.Write(fh)

Method Summary
  GetEvent(self)
Unmarshall the event object from the binary data held internally.
  SetData(self, data)
Set the binary data of the event.
  SetEvent(self, event)
Create the marshalled form of the event and hold it internally.
  Write(self, fh)
Write the binary data out to the specified filehandle.

Method Details

GetEvent(self)

Unmarshall the event object from the binary data held internally.

SetData(self, data)

Set the binary data of the event.

SetEvent(self, event)

Create the marshalled form of the event and hold it internally.

Write(self, fh)

Write the binary data out to the specified filehandle.


Generated by Epydoc 2.1 on Thu Apr 14 16:39:28 2005 http://epydoc.sf.net