Package pygar.demo0P
Class BAN
java.lang.Object
pygar.communication.MessageAgent
pygar.demo0P.BAN
- 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 Negotiatonclass
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
-
Constructor Summary
-
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.
-
Field Details
-
state
-
sessionGroup
public java.util.Set<java.lang.String> sessionGroup -
dataReady
public java.util.Map<java.lang.String,java.lang.Boolean> dataReady -
dataFiles
public java.util.Map<java.lang.String,java.lang.String> dataFiles -
matchFiles
public java.util.Map<java.lang.String,java.lang.String> matchFiles -
compareFiles
-
logger
-
-
Constructor Details
-
BAN
public BAN(Profile profileInstance, int xoffset, int yoffset) throws MessageSystemException, ConfigurationErrorConstruct the infrastructure for the BAN.- Parameters:
profileInstance
- an instance of profile with the correct subsystem information.xoffset
-yoffset
-- Throws:
MessageSystemException
ConfigurationError
-
-
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 interfacejava.lang.Runnable
- Overrides:
run
in classMessageAgent
-
showProgressMessage
public void showProgressMessage(java.lang.String s)
-