    All Packages  Class Hierarchy  This Package  Previous  Next  Index

# Interface JavaAgent.context.ContextInterface

public interface ContextInterface

Interface through which the Agent can communicate information to the context.

Copyright (c) 1995, H. Robert Frost, Stanford University. All rights reserved.

Copyright (c) 1996, H. Robert Frost, Enterprise Integration Technologies, Inc. All rights reserved.

RESTRICTED RIGHTS LEGEND: Use, duplication or disclosure by the Government is subject to restrictions as set forth in subparagraph(c)(1)(ii) of the Rights in Technical Data and Computer Software clause at DFARS 252.227-7013 and in similar clauses in the FAR and NASA FAR supplement.

This software is bound by the terms and conditions listed in the attached LICENSE file.

##

addPanel(Panel)
  If the context supports a GUI, then adds the instantiated and intialized panel to a new top-level window.
addSystemMessage(String)
  Sends a system message to the context.
addSystemMessage(String, Exception)
  Sends a system message w/ an optional exception.
hasGUI()
  Returns true if the context supports a GUI.
NonAgentMsg(Object)
  Generic method for sending an Object message to some context-dependent non-agent destination (e.g.
resourceChanged(String)
  Informs the context that one of the Agent's resources has changed.
setName(String)
  Called by Agent to indicate that the name has changed.
terminate()
  Called by Agent to indicate termination.

##

addSystemMessage

     public abstract void addSystemMessage(String message)

  Sends a system message to the context.

  Parameters:
    message - The string message.

addSystemMessage

     public abstract void addSystemMessage(String message,
                                           Exception e)

  Sends a system message w/ an optional exception.

  Parameters:
    message - The string message.
    e - Exception which generated the message, may be null.

resourceChanged

     public abstract void resourceChanged(String type)

  Informs the context that one of the Agent's resources has changed.

  Parameters:
    type - String identifying the type of the resource.

NonAgentMsg

     public abstract void NonAgentMsg(Object message) throws NonAgentMsgException

  Generic method for sending an Object message to some context-dependent non-agent destination (e.g. a legacy software application, database, etc.) Where this message is sent and how it is interpreted depends on the specific ContextInterface implementation. If no destination exists or some other problem occurs, a NonAgentMsgException will be thrown.

hasGUI

     public abstract boolean hasGUI()

  Returns true if the context supports a GUI.

  Returns:
    True if the context has a GUI, false otherwise.

addPanel

     public abstract void addPanel(Panel p)

  If the context supports a GUI, then adds the instantiated and intialized panel to a new top-level window.

  Parameters:
    p - Panel to add.

setName

     public abstract void setName(String name)

  Called by Agent to indicate that the name has changed.

  Parameters:
    name - The new name

terminate

     public abstract void terminate()

  Called by Agent to indicate termination.

    All Packages  Class Hierarchy  This Package  Previous  Next  Index