OPSI.Util.Message module

opsi python library - Message

Working with subjects and progress information.

author:Jan Schneider <j.schneider@uib.de>
license:GNU Affero General Public License version 3
class OPSI.Util.Message.ChoiceObserver

Bases: OPSI.Util.Message.MessageObserver

choicesChanged(subject, choices)
selectedIndexesChanged(subject, selectedIndexes)
class OPSI.Util.Message.ChoiceSubject(id, type=u'', title=u'', **args)

Bases: OPSI.Util.Message.MessageSubject

getChoices()
getMultiValue()
getSelectedIndexes()
reset()
selectChoice()
serializable()
setCallbacks(callbacks)
setChoices(choices)
setSelectedIndexes(selectedIndexes)
class OPSI.Util.Message.ChoiceSubjectProxy(id, type=u'', title=u'', **args)

Bases: OPSI.Util.Message.MessageSubjectProxy

class OPSI.Util.Message.MessageObserver

Bases: object

messageChanged(subject, message)
class OPSI.Util.Message.MessageSubject(id, type=u'', title=u'', **args)

Bases: OPSI.Util.Message.Subject

getMessage()
getSeverity()
reset()
serializable()
setMessage(message, severity=0)
class OPSI.Util.Message.MessageSubjectProxy(id, type=u'', title=u'', **args)

Bases: OPSI.Util.Message.ProgressSubject, OPSI.Util.Message.ProgressObserver, OPSI.Util.Message.ChoiceSubject, OPSI.Util.Message.ChoiceObserver

choicesChanged(subject, choices)
endChanged(subject, end)
messageChanged(subject, message)
progressChanged(subject, state, percent, timeSpend, timeLeft, speed)
selectedIndexesChanged(subject, selectedIndexes)
class OPSI.Util.Message.NotificationClient(address, port, observer, clientId=None)

Bases: threading.Thread

addEndConnectionRequestedCallback(endConnectionRequestedCallback)
endConnectionRequested()
getFactory()
getId()
removeEndConnectionRequestedCallback(endConnectionRequestedCallback)
run()
selectChoice(subjectId)
setSelectedIndexes(subjectId, selectedIndexes)
stop(stopReactor=True)
class OPSI.Util.Message.NotificationClientFactory(notificationClient, observer)

Bases: twisted.internet.protocol.ClientFactory

connectionLost(reason)
connectionMade(client)
execute(method, params)
isReady()
protocol

alias of NotificationClientProtocol

receive(rpc)
sendLine(line)
class OPSI.Util.Message.NotificationClientProtocol

Bases: twisted.protocols.basic.LineReceiver

connectionLost(reason)
connectionMade()
lineReceived(line)
class OPSI.Util.Message.NotificationServer(address, port, subjects)

Bases: threading.Thread, OPSI.Util.Message.SubjectsObserver

addSubject(subject)
errorOccurred()
getFactory()
getObserver()
getSubjects()
isListening()
removeSubject(subject)
requestEndConnections(clientIds=[])
run()
setSubjects(subjects)
stop(stopReactor=True)
class OPSI.Util.Message.NotificationServerFactory

Bases: twisted.internet.protocol.ServerFactory, OPSI.Util.Message.SubjectsObserver

choicesChanged(subject, choices)
connectionCount()
connectionLost(client, reason)
connectionMade(client)
endChanged(subject, end)
messageChanged(subject, message)
notify(name, params, clients=[])
progressChanged(subject, state, percent, timeSpend, timeLeft, speed)
protocol

alias of NotificationServerProtocol

requestEndConnections(clientIds=[])
rpc(client, line)
selectedIndexesChanged(subject, selectedIndexes)
subjectsChanged(subjects)
class OPSI.Util.Message.NotificationServerProtocol

Bases: twisted.protocols.basic.LineReceiver

connectionLost(reason)
connectionMade()
lineReceived(line)
class OPSI.Util.Message.ProgressObserver

Bases: OPSI.Util.Message.MessageObserver

endChanged(subject, end)
progressChanged(subject, state, percent, timeSpend, timeLeft, speed)
class OPSI.Util.Message.ProgressSubject(id, type=u'', title=u'', **args)

Bases: OPSI.Util.Message.MessageSubject

addToState(amount)
getEnd()
getPercent()
getSpeed()
getState()
getTimeLeft()
getTimeSpend()
reset()
serializable()
setEnd(end)
setEndChangable(changable)
setState(state)
class OPSI.Util.Message.ProgressSubjectProxy(id, type=u'', title=u'', **args)

Bases: OPSI.Util.Message.MessageSubjectProxy

class OPSI.Util.Message.Subject(id, type=u'', title=u'', **args)

Bases: object

attachObserver(observer)
detachObserver(observer)
getClass()
getId()
getTitle()
getType()
reset()
serializable()
setTitle(title)
class OPSI.Util.Message.SubjectsObserver

Bases: OPSI.Util.Message.ChoiceObserver, OPSI.Util.Message.ProgressObserver

addSubject(subject)
getSubjects()
removeSubject(subject)
setSubjects(subjects)
subjectsChanged(subjects)