public class EventLoop extends java.lang.Object implements SimpleObserver
Constructor and Description |
---|
EventLoop(EventLoop obj)
Copy constructor that we can use to initialize a new object.
|
EventLoop(llnl.visit.Xfer x,
MessageAttributes m,
SyncAttributes s)
Constructor for the EventLoop class.
|
Modifier and Type | Method and Description |
---|---|
void |
Execute()
Execute the event loop, reading input from the viewer as it comes in.
|
boolean |
GetUpdate()
Returns that flag indicating whether or not Update() should be
called in response to a state object's Notify().
|
boolean |
Process()
Expose Process method so we can call it periodically from event-driven
programs without having to do another thread.
|
void |
SetUpdate(boolean val)
Sets a flag in the implementing class that determines whether or
not the Update() method should be called in response to the
state object's Notify() method being called.
|
void |
StartProcessing()
Start processing input from the viewer on a 2nd thread so it automatically
comes in and we don't have to explicitly do it ourselves.
|
void |
StopProcessing()
Stop processing input from the viewer on a 2nd thread.
|
boolean |
Synchronize()
Send a synchronize message to the viewer and wait for it to come back.
|
void |
Update(AttributeSubject subj)
This method is called when syncAttributes or messageAttributes update
from the viewer.
|
public EventLoop(llnl.visit.Xfer x, MessageAttributes m, SyncAttributes s)
x
- The xfer object that will be used to talk to the viewer.m
- The message attributes object we'll use to detect error messages.s
- The sync attributespublic EventLoop(EventLoop obj)
obj
- The event loop that will be used to initialize the new one.public void Execute()
public boolean Process() throws LostConnectionException
LostConnectionException
public boolean Synchronize()
public void StartProcessing()
public void StopProcessing()
public void Update(AttributeSubject subj)
Update
in interface SimpleObserver
subj
- The subject that caused the update.public void SetUpdate(boolean val)
SimpleObserver
SetUpdate
in interface SimpleObserver
val
- true if the Update() method should be called in response to
a Notify().public boolean GetUpdate()
SimpleObserver
GetUpdate
in interface SimpleObserver