|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectlime.util.console.LimeConsole
A graphical front-end to a Lime Tuple Space. It allows the user to interact with the tuple space and write tuples, force engagements, and so on. Useful for debugging and testing, as well as for learning how Lime works.
A LimeConsole
is associated at creation time to a given Lime
tuple space, that must be already created.
Operations requested through the graphical interface are not directly
invoked by the Lime console. As mentioned in LimeTupleSpace
, this would involve having the AWT thread performing the
operations, which would violate the requirement that only the
ILimeAgent
that created the Lime tuple space is allowed to
access it.
Instead, operations requested by the user are inserted in a queue managed by
the LimeConsole
object. The agent that contains the
LimeConsole
object can only test whether the queue is empty,
using the method isOpQueueEmpty
, or request the execution of
the next operation in the queue, using performQueuedOp
. For an
example of how to write code that leverages off of the
LimeConsole
, see the documentation about the examples.
For instructions about how to use the graphical user interface, please refer to the Lime console description in the documentation.
LimeConsoleListener
,
LimeTupleSpace
Field Summary | |
static java.lang.String |
AGENT
|
static short |
AGENT_BYE
|
static java.lang.String |
AGENT_GONE
|
static short |
AGENT_HELLO
|
static int |
AGENT_ID_TAG
|
static short |
AGENT_LOCALHOST
|
static short |
AGENT_NOTINSYS
|
static short |
AGENT_REMOTE
|
static short |
AGENT_UNSPECIFIED
|
static short |
DATA
|
static java.lang.String |
DEFAULT_LISTENER
|
static short |
DISENGAGE_AGENT
|
static short |
DISENGAGE_HOST
|
static short |
ENGAGE_AGENT
|
static short |
ENGAGE_HOST
|
(package private) java.awt.Frame |
f
|
static short |
GO
|
static java.lang.String |
HOST
|
static int |
HOST_ADDR_TAG
|
static short |
HOST_BYE
|
static java.lang.String |
HOST_GONE
|
static short |
HOST_HELLO
|
static short |
HOST_LOCALHOST
|
static short |
HOST_NOTINSYS
|
static short |
HOST_REMOTE
|
static int |
HOST_TUPLE_HOST_TAG
|
static short |
HOST_UNSPECIFIED
|
static short |
ING
|
static short |
INST_REACTS_TO
|
static short |
INST_REM_UPON_LISTENER
|
static short |
INST_UPON_LISTENER
|
static short |
LOCAL_SYS_TAKE
|
(package private) LimeTupleSpace |
lts
|
static int |
MAX_ROUNDS
|
(package private) Queue |
opQueue
|
static short |
OUTG
|
(package private) IConsoleProvider |
provider
|
static short |
RDG
|
static short |
REACTS_TO
|
static short |
READ
|
static short |
READY
|
static short |
REM_ING
|
static short |
REM_OUTG_ACK
|
static short |
REM_RDG
|
static short |
REM_SYS_READ
|
static short |
REM_SYS_TAKE
|
static short |
REMOVE_REACTS_TO
|
static short |
REMOVE_REM_UPON_LISTENER
|
static short |
REMOVE_UPON
|
(package private) LimeServer |
server
|
static short |
SET_HOST
|
static short |
SET_SHARED
|
static short |
SETUP
|
static short |
SHUTDOWN_LIME
|
static short |
START
|
static short |
SYS_READ
|
static short |
SYS_REPLY
|
static short |
SYS_TAKE
|
(package private) static LimeSystemTupleSpace |
system
|
(package private) java.awt.TextArea |
ta
|
static short |
TAKE
|
static java.lang.String |
TS
|
static java.lang.String |
TS_GONE
|
static int |
TS_ID_TAG
|
static int |
TYPE_TAG
|
static short |
UPON
|
static short |
UPON_EVENT
|
static java.lang.String |
VERSION
|
static short |
WAIT_TO_READ
|
static short |
WAIT_TO_TAKE
|
static short |
WRITE
|
Constructor Summary | |
private |
LimeConsole()
|
|
LimeConsole(AgentID a,
LimeTupleSpace lts,
IConsoleProvider p)
Create a new Lime console associated with the Lime tuple space passed as a parameter. |
Method Summary | |
void |
display(java.lang.String msg)
Display a message on the console. |
LimeTupleSpace |
getLimeTupleSpace()
Return the Lime tuple space associated with this Lime console. |
(package private) static java.lang.String |
getOpName(short opCode)
|
boolean |
isOpQueueEmpty()
Returns true if the queue of operations is empty,
false otherwise. |
java.lang.String |
performQueuedOp()
Process the first element in the operation queue. |
void |
quit()
|
private void |
setupGUI(AgentID a)
|
(package private) RegisteredReaction[] |
updateReactions(short op)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final java.lang.String DEFAULT_LISTENER
static LimeSystemTupleSpace system
java.awt.Frame f
java.awt.TextArea ta
LimeTupleSpace lts
Queue opQueue
LimeServer server
IConsoleProvider provider
public static final java.lang.String VERSION
public static final short WRITE
public static final short OUTG
public static final short REM_OUTG_ACK
public static final short TAKE
public static final short WAIT_TO_TAKE
public static final short ING
public static final short READ
public static final short WAIT_TO_READ
public static final short RDG
public static final short REACTS_TO
public static final short UPON
public static final short REMOVE_REACTS_TO
public static final short REMOVE_UPON
public static final short INST_REACTS_TO
public static final short INST_UPON_LISTENER
public static final short INST_REM_UPON_LISTENER
public static final short REMOVE_REM_UPON_LISTENER
public static final short REM_SYS_TAKE
public static final short REM_SYS_READ
public static final short REM_ING
public static final short REM_RDG
public static final short SYS_TAKE
public static final short SYS_READ
public static final short UPON_EVENT
public static final short SYS_REPLY
public static final short LOCAL_SYS_TAKE
public static final short SET_SHARED
public static final short SET_HOST
public static final short ENGAGE_AGENT
public static final short ENGAGE_HOST
public static final short DISENGAGE_AGENT
public static final short DISENGAGE_HOST
public static final short SHUTDOWN_LIME
public static final short GO
public static final short SETUP
public static final short READY
public static final short START
public static final short DATA
public static final short HOST_BYE
public static final short HOST_HELLO
public static final short AGENT_BYE
public static final short AGENT_HELLO
public static final short HOST_LOCALHOST
public static final short HOST_REMOTE
public static final short HOST_NOTINSYS
public static final short HOST_UNSPECIFIED
public static final short AGENT_LOCALHOST
public static final short AGENT_REMOTE
public static final short AGENT_NOTINSYS
public static final short AGENT_UNSPECIFIED
public static final int TYPE_TAG
public static final int HOST_TUPLE_HOST_TAG
public static final int HOST_ADDR_TAG
public static final int AGENT_ID_TAG
public static final int TS_ID_TAG
public static final java.lang.String HOST
public static final java.lang.String AGENT
public static final java.lang.String TS
public static final java.lang.String HOST_GONE
public static final java.lang.String AGENT_GONE
public static final java.lang.String TS_GONE
public static final int MAX_ROUNDS
Constructor Detail |
private LimeConsole()
public LimeConsole(AgentID a, LimeTupleSpace lts, IConsoleProvider p)
Method Detail |
public void quit()
public boolean isOpQueueEmpty()
true
if the queue of operations is empty,
false
otherwise.
public java.lang.String performQueuedOp()
public void display(java.lang.String msg)
public LimeTupleSpace getLimeTupleSpace()
RegisteredReaction[] updateReactions(short op)
static java.lang.String getOpName(short opCode)
private void setupGUI(AgentID a)
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |