pamanager
Class UserNotificationAgent

java.lang.Object
  |
  +--ciagent.CIAgent
        |
        +--pamanager.UserNotificationAgent

public class UserNotificationAgent
extends CIAgent
implements java.io.Serializable

The UserNotificationAgent class displays a message when an event is received.

See Also:
Serialized Form

Field Summary
protected  AlertDialog notificationDialog
           
 
Fields inherited from class ciagent.CIAgent
agentPlatform, children, DEFAULT_ASYNCTIME, DEFAULT_SLEEPTIME, name, parent, traceLevel
 
Constructor Summary
UserNotificationAgent()
          Creates a UserNotificationAgent object.
UserNotificationAgent(java.lang.String name)
          Creates a UserNotificationAgent object with the given name.
 
Method Summary
 void appendMsgText(java.lang.String text)
           
 java.lang.String getMsgText()
           
 java.lang.String getTaskDescription()
          Retrieves a string for display that indicates what this agent is doing.
 void initialize()
          Initializes the agent by creating a dialog that will be used to notify the user of events.
 void process()
          Does nothing.
 void processCIAgentEvent(CIAgentEvent e)
          Processes the event by displaying the message associated with the event.
 void processTimerPop()
          Does nothing.
 void setDialog(javax.swing.JDialog dlg)
          Sets the dialog for this agent.
 void setMsgText(java.lang.String text)
           
 
Methods inherited from class ciagent.CIAgent
addAgent, addCIAgentEventListener, addPropertyChangeListener, getAgent, getAgentPlatform, getAgents, getAsyncTime, getChildren, getCustomizerClass, getDisplayName, getName, getParent, getSleepTime, getState, getTraceLevel, notifyCIAgentEventListeners, postCIAgentEvent, processAsynchronousEvents, removeAgent, removeCIAgentEventListener, removePropertyChangeListener, reset, resumeAgentProcessing, setAgentPlatform, setAsyncTime, setName, setParent, setSleepTime, setState, setTraceLevel, startAgentProcessing, stopAgentProcessing, suspendAgentProcessing, trace
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

notificationDialog

protected AlertDialog notificationDialog
Constructor Detail

UserNotificationAgent

public UserNotificationAgent()
Creates a UserNotificationAgent object.

UserNotificationAgent

public UserNotificationAgent(java.lang.String name)
Creates a UserNotificationAgent object with the given name.
Parameters:
name - the String object that contains the name of the agent
Method Detail

getTaskDescription

public java.lang.String getTaskDescription()
Retrieves a string for display that indicates what this agent is doing.
Returns:
the String object that contains the task description
Overrides:
getTaskDescription in class CIAgent

getMsgText

public java.lang.String getMsgText()

setMsgText

public void setMsgText(java.lang.String text)

appendMsgText

public void appendMsgText(java.lang.String text)

setDialog

public void setDialog(javax.swing.JDialog dlg)
Sets the dialog for this agent.
Parameters:
dlg - the JDialog object to be used by this agent to notify the user of events

initialize

public void initialize()
Initializes the agent by creating a dialog that will be used to notify the user of events.
Overrides:
initialize in class CIAgent

process

public void process()
Does nothing.
Overrides:
process in class CIAgent

processCIAgentEvent

public void processCIAgentEvent(CIAgentEvent e)
Processes the event by displaying the message associated with the event.
Parameters:
e - the CIAgentEvent object that contains the event received by this agent
Overrides:
processCIAgentEvent in class CIAgent

processTimerPop

public void processTimerPop()
Does nothing.
Overrides:
processTimerPop in class CIAgent