|
Xj3D 2.0 VRML/X3D Code API | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.web3d.vrml.scripting.external.buffer.ExternalEventQueue
public class ExternalEventQueue
The ExternalEventQueue provides the update batching functionality for the EAI browser and the external SAI browser. This class handles the buffering of event setValue calls and the various browser requests.
This queue handles all of the event types, including the replaceWorld methods. Because I do not fully understand the intention of the beginUpdate/endUpdate queue system for handling browser requests, it is possible to change between queued and unqueued behavior by modifying the appropriate static constants.
Amalgamation of distinct set1Value events into single setValue events is the responsibility of the event buffers/field wrapper classes. The only functionality that this class exposes is the ability to locate the appropriate previous buffers, and exposing the synchronization lock for thread safety.
This class was previously named the EAIEventQueue, which became a misnomer when it was repurposed for both EAI and external SAI support. It has not been seen as sufficiently useful to split this queue into an EAI and an SAI version, thus the compilation dependencies from the VRML and X3D systems.
The responsibility for registering the event queue with the appropriate triggering mechanisms (current the EventModelEvaluator) is external to this class.
| Field Summary | |
|---|---|
protected ErrorReporter |
errorReporter
The ErrorReporter to send messages to |
java.lang.Object |
eventLock
External lock for the event list. |
| Constructor Summary | |
|---|---|
ExternalEventQueue(ErrorReporter reporter)
Basic constructor. |
|
| Method Summary | |
|---|---|
void |
beginUpdate()
Start queueing updates. |
void |
endUpdate()
End queueing of updates, and send the current set to be processed. |
ExternalEvent |
getLast(ExternalEvent type)
Return the ExternalEvent which is equal to the sent type. |
boolean |
isNodeRealized(VRMLNodeType node)
Methods for NodeRealizationProcessor |
void |
markNodeRealized(VRMLNodeType node)
Mark a node as undergoing realization |
void |
markRealizationComplete(VRMLNodeType node)
Complete the realization of a node. |
void |
postAddRoute(VRML97CommonBrowser theBrowser,
BrowserCore theCore,
VRMLNodeType fromNode,
java.lang.String eventOut,
VRMLNodeType toNode,
java.lang.String eventIn)
Process a Browser.addRoute request. |
void |
postCreateVrmlFromURL(VRML97CommonBrowser theBrowser,
java.lang.String[] url,
VRMLNodeType node,
java.lang.String eventIn)
Process a Browser.createVrmlFromURL request |
void |
postLoadURL(VRML97CommonBrowser browser,
java.lang.String[] url,
java.lang.String[] param)
Process a browser.loadURL request. |
void |
postRealizeNode(VRMLNodeType nodeToRealize)
Process a node realization request |
void |
postRemoveRoute(VRML97CommonBrowser browser,
BrowserCore core,
VRMLNodeType from,
java.lang.String eventOut,
VRMLNodeType to,
java.lang.String eventIn)
Process a browser.deleteRoute request. |
void |
postReplaceWorld(VRML97CommonBrowser browser,
VRMLNodeType[] value)
Process a browser.replaceWorld request |
void |
processEvent(ExternalEvent event)
Process an addition to the event queue. |
void |
processEvents()
Process all waiting events. |
void |
setErrorReporter(ErrorReporter reporter)
Change the ErrorReporter this instance is using |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public java.lang.Object eventLock
protected ErrorReporter errorReporter
| Constructor Detail |
|---|
public ExternalEventQueue(ErrorReporter reporter)
reporter - The ErrorReporter to use.| Method Detail |
|---|
public void beginUpdate()
public void endUpdate()
public ExternalEvent getLast(ExternalEvent type)
public void postAddRoute(VRML97CommonBrowser theBrowser,
BrowserCore theCore,
VRMLNodeType fromNode,
java.lang.String eventOut,
VRMLNodeType toNode,
java.lang.String eventIn)
public void postCreateVrmlFromURL(VRML97CommonBrowser theBrowser,
java.lang.String[] url,
VRMLNodeType node,
java.lang.String eventIn)
public void postLoadURL(VRML97CommonBrowser browser,
java.lang.String[] url,
java.lang.String[] param)
public void postRealizeNode(VRMLNodeType nodeToRealize)
public void postRemoveRoute(VRML97CommonBrowser browser,
BrowserCore core,
VRMLNodeType from,
java.lang.String eventOut,
VRMLNodeType to,
java.lang.String eventIn)
public void postReplaceWorld(VRML97CommonBrowser browser,
VRMLNodeType[] value)
public void processEvent(ExternalEvent event)
public void processEvents()
processEvents in interface ExternalViewExternalView.processEvents()public void setErrorReporter(ErrorReporter reporter)
setErrorReporter in interface ExternalViewreporter - The instance to use or nullorg.xj3d.core.eventmodelpublic boolean isNodeRealized(VRMLNodeType node)
isNodeRealized in interface NodeRealizationProcessornode - The node in question
public void markNodeRealized(VRMLNodeType node)
NodeRealizationProcessor
markNodeRealized in interface NodeRealizationProcessorpublic void markRealizationComplete(VRMLNodeType node)
NodeRealizationProcessor
markRealizationComplete in interface NodeRealizationProcessor
|
Xj3D 2.0 VRML/X3D Code API | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||