org.nukesoft.core
Class DialogManager

java.lang.Object
  |
  +--java.lang.Thread
        |
        +--org.nukesoft.core.DialogManager
All Implemented Interfaces:
CommPortCallback, Runnable

public class DialogManager
extends Thread
implements CommPortCallback

The DialogManager handles distribution of incomming instant messages, creating a new Dialog object if necesary. It is also responsible for automatic destruction of Dialog objects after a set durration of inactivity.

Author:
Ryan Michela

Field Summary
 
Fields inherited from class java.lang.Thread
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
 
Constructor Summary
DialogManager(int timeOut)
          Builds the DialogManager.
 
Method Summary
 void handleIM(IM message, CommPort cp)
          Handles an inbound IM from the CommLib.
 void handleWarn(String screenName, CommPort cp)
          Handles an inbound warning from the CommPort.
 void shutdown()
          Shuts down all Dialog, LineProc, and CommPort objects.
 void start()
          Dialog maintnance thread.
 
Methods inherited from class java.lang.Thread
activeCount, checkAccess, countStackFrames, currentThread, destroy, dumpStack, enumerate, getContextClassLoader, getName, getPriority, getThreadGroup, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, run, setContextClassLoader, setDaemon, setName, setPriority, sleep, sleep, stop, stop, suspend, toString, yield
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

DialogManager

public DialogManager(int timeOut)
Builds the DialogManager. For now, this is a hack.

Parameters:
timeOut - The number of seconds before a Dialog times out.
Method Detail

handleIM

public void handleIM(IM message,
                     CommPort cp)
Handles an inbound IM from the CommLib.

Specified by:
handleIM in interface CommPortCallback
Parameters:
message - The message.
See Also:
CommPortCallback.handleIM(org.nukesoft.core.IM, org.nukesoft.commlib.CommPort)

handleWarn

public void handleWarn(String screenName,
                       CommPort cp)
Handles an inbound warning from the CommPort.

Specified by:
handleWarn in interface CommPortCallback
Parameters:
screenName - The screen name that did the warning.
See Also:
CommPortCallback.handleWarn(java.lang.String, org.nukesoft.commlib.CommPort)

shutdown

public void shutdown()
Shuts down all Dialog, LineProc, and CommPort objects.


start

public void start()
Dialog maintnance thread. Handles automatic destructuin of Dialog objects after a period of inactivity.

Overrides:
start in class Thread
See Also:
Thread.start()