| Trees | Index | Help |
|
|---|
| Module engine :: Class Engine |
|
| Method Summary | |
|---|---|
Initializes the engine. | |
Adds a manager to our list. | |
Changes the current session to another named session. | |
| list of strings |
Calls the Thread Manager checkthreads method which goes through and checks the status of all the threads registered with the Thread Manager. |
| boolean |
Closes down a session. |
| session.Session instance |
Creates a new session by copying the common session and registers the new session with the engine. |
| session.Session instance |
Returns the current session. |
Tells the ui to flush its output. | |
| int |
Returns the current tick. |
| string |
Returns some basic diagnostic information in the form of a string. |
| manager.Manager subclass or None |
Retrieves a manager by name. |
| session.Session or None |
Returns a named session. |
| list of strings |
Returns a list of session names. |
| list of strings |
Gets the status for a specific session. |
| ui.BaseUI subclass |
Returns the ui. |
Handle input coming from the mud. | |
| string |
This handles input lines from the user in a session-less context. |
Handles initialization that requires an engine object. | |
Registers a session with the engine. | |
| boolean |
Removes a manager from our list. |
This gets kicked off in a thread and just keep going through events until it detects a shutdown. | |
This timer thread sleeps for a second, then calls everything in the queue with the current tick. | |
Sets the ui. | |
Sets the shutdown status for the engine. | |
Starts a thread through the Thread Manager. | |
Adds one to the error count. | |
Unregisters a session from the engine. | |
Tells the ui to print a prompt. | |
Writes a message to the network socket. | |
Writes a message to the ui. | |
| Method Details |
|---|
__init__(self)
Initializes the engine.
|
addManager(self, name, manager)Adds a manager to our list.
|
changeSession(self, name='')Changes the current session to another named session. If they don't pass in a name, we get the next available non-common session if possible.
|
checkthreads(self)Calls the Thread Manager checkthreads method which goes through and checks the status of all the threads registered with the Thread Manager.
|
closeSession(self, ses=None)Closes down a session.
|
createSession(self, name)Creates a new session by copying the common session and registers the new session with the engine.
|
currentSession(self)Returns the current session.
|
flushUI(self)Tells the ui to flush its output. |
getCurrentTick(self)Returns the current tick. It also happens to be the total number of seconds since this instance of Lyntin was started.
|
getDiagnostics(self)Returns some basic diagnostic information in the form of a string. This allows a user to monitor how Lyntin is doing in terms of events and other such erata.
|
getManager(self, name)Retrieves a manager by name.
|
getSession(self, name)Returns a named session.
|
getSessions(self)Returns a list of session names.
|
getStatus(self, ses)Gets the status for a specific session.
|
getUI(self)Returns the ui.
|
handleMudData(self, session, text)Handle input coming from the mud. We toss this to the current session to deal with.
|
handleUserData(self, input, internal=0, session=None)This handles input lines from the user in a session-less context. The engine.handleUserData deals with global stuff and then passes the modified input to the session for session-oriented handling. The session can call this method again with expanded input--this method is considered recursive. internal tells whether to spam the input hook and things of that nature.
|
initialize(self)Handles initialization that requires an engine object. |
registerSession(self, session, name)Registers a session with the engine.
|
removeManager(self, name)Removes a manager from our list.
|
runengine(self)This gets kicked off in a thread and just keep going through events until it detects a shutdown. |
runtimer(self)This timer thread sleeps for a second, then calls everything in the queue with the current tick. Note: This will almost always be slightly behind and will get worse as there are more things that get executed each tick. |
setUI(self, newui)Sets the ui.
|
shutdown(self, args)Sets the shutdown status for the engine. |
startthread(self, name, func)Starts a thread through the Thread Manager.
|
tallyError(self)Adds one to the error count. If we see more than 20 errors, we shutdown. |
unregisterSession(self, ses)Unregisters a session from the engine.
|
writePrompt(self)Tells the ui to print a prompt. |
writeSession(self, message)Writes a message to the network socket. The message should be a string. Otherwise, it's unhealthy.
|
writeUI(self, text)Writes a message to the ui. This method uses a lock so that multiple threads can write to the ui without intersecting and crashing the python process. Theoretically you should use the exported module to write things to the ui--it calls this method.
|
| Trees | Index | Help |
|
|---|
| Generated by Epydoc 1.1 on Mon Apr 28 21:11:24 2003 | http://epydoc.sf.net |