Package pygar.demo0P

Class BAN

java.lang.Object
All Implemented Interfaces:
java.lang.Runnable

public class BAN
extends MessageAgent
A BAN represents a Blind Agent Negotiator who works with the TeamMember instances to find matches in encrypted negotiating positions presented by each TeamMember. A GUI panel displays status information during the operation of the BAN.
  • Nested Class Summary

    Nested Classes 
    Modifier and Type Class Description
    class  BAN.BANFrame
    BANFrame holds the GUI for the Blind Agent Negotiaton
    class  BAN.Logger
    This inner class provides a log facility for debugging.
  • Field Summary

    Fields 
    Modifier and Type Field Description
    CompareFiles compareFiles  
    java.util.Map<java.lang.String,​java.lang.String> dataFiles  
    java.util.Map<java.lang.String,​java.lang.Boolean> dataReady  
    BAN.Logger logger  
    java.util.Map<java.lang.String,​java.lang.String> matchFiles  
    java.util.Set<java.lang.String> sessionGroup  
    StateMachine<Pmessage> state  

    Fields inherited from class pygar.communication.MessageAgent

    name, pms, t
  • Constructor Summary

    Constructors 
    Constructor Description
    BAN​(Profile profileInstance, int xoffset, int yoffset)
    Construct the infrastructure for the BAN.
  • Method Summary

    Modifier and Type Method Description
    void printLog()  
    void run()
    Provide a process to run on the BAN's thread, to watch for message events, and to pass message events to the state machine.
    void showProgressMessage​(java.lang.String s)  
    void updateConsole​(java.lang.String message)  
    void updatePBar​(java.lang.String state)
    Update the progress bar and progress label in the panel.
    void updatePBarIndef​(java.lang.String label)
    Update the progress label of the panel and set the progress bar into the indefinite state - a state in which it appears to change and convey the idea of work in progress.
    void updatePBarPercent​(int percent, java.lang.String label)
    Update the progress label and the progress bar.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

  • Constructor Details

  • Method Details

    • updatePBar

      public void updatePBar​(java.lang.String state)
      Update the progress bar and progress label in the panel. Use the state of the system to show the approximate point the system now occupies in the progression of state in the demonstration session.
      Parameters:
      state -
    • updatePBarIndef

      public void updatePBarIndef​(java.lang.String label)
      Update the progress label of the panel and set the progress bar into the indefinite state - a state in which it appears to change and convey the idea of work in progress. Obviously, the routine should be called at the start of a step that may require some time before landing in a longer duration state.
      Parameters:
      label -
    • updatePBarPercent

      public void updatePBarPercent​(int percent, java.lang.String label)
      Update the progress label and the progress bar. This function is most useful when it is called successively during a long calculation to show progress towards the completion of the calculation.
      Parameters:
      percent -
      label -
    • updateConsole

      public void updateConsole​(java.lang.String message)
    • printLog

      public void printLog()
    • run

      public void run()
      Provide a process to run on the BAN's thread, to watch for message events, and to pass message events to the state machine.
      Specified by:
      run in interface java.lang.Runnable
      Overrides:
      run in class MessageAgent
    • showProgressMessage

      public void showProgressMessage​(java.lang.String s)