remote_signals

Classes to connect the QT event loop with a messaging server. To enable multiple clients to push model updates to each other or messages for the users.

As a messaging server, Apache active MQ was tested in combination with the stomp library (http://docs.codehaus.org/display/STOMP/Python)

class camelot.view.remote_signals.SignalHandler[source]

The signal handler connects multiple collection proxy classes to inform each other when they have changed an object.

If the object is persistent (eg mapped by SQLAlchemy), the signal hanler can inform other signal handlers on the network of the change.

A couple of the methods of this thread are protected by a QMutex through the synchronized decorator. It appears that python/qt deadlocks when the entity_update_signal is connected to and emitted at the same time. This can happen when the user closes a window that is still building up (the CollectionProxies are being constructed and they connect to the signal handler).

These deadlock issues are resolved in recent PyQt, so comment out the mutex stuff. (2011-08-12)

connect_signals(obj)[source]

Connect the SignalHandlers its signals to the slots of obj, while the mutex is locked

on_connected(*args, **kwargs)[source]

Callback message for stomp to inform it is connected to a messaging queue, this method will subscribe to the camelot topic

on_connecting(server)[source]

Callback message for stomp to inform it is connecting to a messaging queue

on_disconnected()[source]

Callback message for stomp to inform it is disconnected from the messaging queue

on_error(headers, message)[source]

Callback function for stomp to receive errors

on_message(headers, message)[source]

Callback function for stomp to receive messages

sendEntityCreate(sender, entity, scope='local')[source]

Call this method to inform the whole application an entity was created

sendEntityDelete(sender, entity, scope='local')[source]

Call this method to inform the whole application an entity is about to be deleted

sendEntityUpdate(sender, entity, scope='local')[source]

Call this method to inform the whole application an entity has changed

send_entity_update(sender, entity, scope='local')[source]

Call this method to inform the whole application an entity has changed

camelot.view.remote_signals.construct_signal_handler(*args, **kwargs)[source]

Construct the singleton signal handler

camelot.view.remote_signals.get_signal_handler()[source]

Get the singleton signal handler

camelot.view.remote_signals.has_signal_handler()[source]

Request if the singleton signal handler was constructed

Previous topic

register

Next topic

search

This Page


Comments
blog comments powered by Disqus