Package org.web3d.x3d.sai.Networking
Interface LoadSensor
- All Superinterfaces:
X3DChildNode,X3DNetworkSensorNode,X3DNode,X3DSensorNode
- All Known Implementing Classes:
LoadSensorObject
public interface LoadSensor extends X3DNetworkSensorNode
LoadSensor generates events as watchList child nodes are either loaded or fail to load.
X3D node tooltip: [X3DNetworkSensorNode] LoadSensor generates events as watchList child nodes are either loaded or fail to load. Changing watchlist child nodes restarts the LoadSensor.
Package hint: This interface is defined by the X3D Java Language Binding Specification for the Scene Authoring Interface (SAI).
X3D node tooltip: [X3DNetworkSensorNode] LoadSensor generates events as watchList child nodes are either loaded or fail to load. Changing watchlist child nodes restarts the LoadSensor.
- Hint: use multiple LoadSensor nodes to track multiple loading nodes individually.
- Hint: Background is not sensed due to multiple-image ambiguity.
- Warning: watchList child nodes are not rendered, so normally USE copies of other nodes to sense load status.
- Hint: use Inline 'load' field to prompt or defer loading.
- Warning: new X3D node, not supported in VRML97.
- Hint: example scenes and authoring assets at http://x3dgraphics.com/examples/X3dForWebAuthors/Chapter12EnvironmentSensorSound
Package hint: This interface is defined by the X3D Java Language Binding Specification for the Scene Authoring Interface (SAI).
-
Method Summary
Modifier and Type Method Description voidaddWatchList(X3DNode[] newValue)Add array of child watchList nodes to array of existing nodes (if any).booleangetEnabled()Provide boolean value from inputOutput SFBool field named enabled.booleangetIsActive()Provide boolean value from outputOnly SFBool field named isActive.booleangetIsLoaded()Provide boolean value from outputOnly SFBool field named isLoaded.doublegetLoadTime()Provide double value in seconds from outputOnly SFTime field named loadTime.X3DMetadataObjectgetMetadata()Provide X3DMetadataObject instance (using a properly typed node) from inputOutput SFNode field metadata.floatgetProgress()Provide float value from outputOnly SFFloat field named progress.doublegetTimeOut()Provide double value in seconds within allowed range of [0,infinity) from inputOutput SFTime field named timeOut.X3DNode[]getWatchList()Provide array of X3DNode results (using an array consisting of properly typed nodes or ProtoInstanceObjects) from inputOutput MFNode field watchList.LoadSensorsetEnabled(boolean newValue)Accessor method to assign boolean value to inputOutput SFBool field named enabled.LoadSensorsetMetadata(X3DMetadataObject newValue)Accessor method to assign X3DMetadataObject instance (using a properly typed node) to inputOutput SFNode field metadata.LoadSensorsetTimeOut(double newValue)Accessor method to assign double value in seconds to inputOutput SFTime field named timeOut.voidsetWatchList(X3DNode newValue)Set single child watchList node, replacing prior array of existing nodes (if any).LoadSensorsetWatchList(X3DNode[] newValue)Accessor method to assign X3DNode array (using an array consisting of properly typed nodes or ProtoInstanceObjects) to inputOutput MFNode field watchList.
-
Method Details
-
getEnabled
boolean getEnabled()Provide boolean value from inputOutput SFBool field named enabled.
Tooltip: Enables/disables node operation. *- Specified by:
getEnabledin interfaceX3DNetworkSensorNode- Specified by:
getEnabledin interfaceX3DSensorNode- Returns:
- value of enabled field
-
setEnabled
Accessor method to assign boolean value to inputOutput SFBool field named enabled.
Tooltip: Enables/disables node operation. *- Specified by:
setEnabledin interfaceX3DNetworkSensorNode- Specified by:
setEnabledin interfaceX3DSensorNode- Parameters:
newValue- is new value for the enabled field.- Returns:
LoadSensor- namely this same object to allow sequential method pipelining (i.e. consecutive method invocations on the same object).
-
getIsActive
boolean getIsActive()Provide boolean value from outputOnly SFBool field named isActive.
Tooltip: isActive true/false events are sent when sensing starts/stops.- Warning: it is an error to define this transient outputOnly field in an X3D file, instead only use it a source for ROUTE events.
- Specified by:
getIsActivein interfaceX3DNetworkSensorNode- Specified by:
getIsActivein interfaceX3DSensorNode- Returns:
- value of isActive field
-
getIsLoaded
boolean getIsLoaded()Provide boolean value from outputOnly SFBool field named isLoaded.
Tooltip: Notify when all watchList child nodes are loaded, or at least one has failed. Sends true on successfully loading all watchList child nodes. Sends false on timeOut of any watchList child nodes, failure of any watchList child nodes to load, or no local copies available and no network present.- Hint: use multiple LoadSensor nodes to track multiple loading nodes individually.
- Warning: it is an error to define this transient outputOnly field in an X3D file, instead only use it a source for ROUTE events.
- Returns:
- value of isLoaded field
-
getLoadTime
double getLoadTime()Provide double value in seconds from outputOnly SFTime field named loadTime.
Tooltip: Time of successful load complete, not sent on failure.- Warning: it is an error to define this transient outputOnly field in an X3D file, instead only use it a source for ROUTE events.
- Returns:
- value of loadTime field
-
getMetadata
X3DMetadataObject getMetadata()Provide X3DMetadataObject instance (using a properly typed node) from inputOutput SFNode field metadata.
Tooltip: [X3DMetadataObject] Information about this node can be contained in a MetadataBoolean, MetadataDouble, MetadataFloat, MetadataInteger, MetadataString or MetadataSet node.- Hint: X3D Architecture 7.2.4 Metadata https://www.web3d.org/documents/specifications/19775-1/V3.3/Part01/components/core.html#Metadata
- Specified by:
getMetadatain interfaceX3DChildNode- Specified by:
getMetadatain interfaceX3DNetworkSensorNode- Specified by:
getMetadatain interfaceX3DNode- Specified by:
getMetadatain interfaceX3DSensorNode- Returns:
- value of metadata field
- See Also:
- X3D Scene Authoring Hints: Metadata Nodes
-
setMetadata
Accessor method to assign X3DMetadataObject instance (using a properly typed node) to inputOutput SFNode field metadata.
Tooltip: [X3DMetadataObject] Information about this node can be contained in a MetadataBoolean, MetadataDouble, MetadataFloat, MetadataInteger, MetadataString or MetadataSet node.- Hint: X3D Architecture 7.2.4 Metadata https://www.web3d.org/documents/specifications/19775-1/V3.3/Part01/components/core.html#Metadata
- Specified by:
setMetadatain interfaceX3DChildNode- Specified by:
setMetadatain interfaceX3DNetworkSensorNode- Specified by:
setMetadatain interfaceX3DNode- Specified by:
setMetadatain interfaceX3DSensorNode- Parameters:
newValue- is new value for the metadata field.- Returns:
LoadSensor- namely this same object to allow sequential method pipelining (i.e. consecutive method invocations on the same object).- See Also:
- X3D Scene Authoring Hints: Metadata Nodes
-
getProgress
float getProgress()Provide float value from outputOnly SFFloat field named progress.
Tooltip: [0,1] Sends 0.0 on start and 1.0 on completion. Intermediate values are browser dependent and always increasing (may indicate fraction of bytes, fraction of expected time or another metric).- Hint: only 0 and 1 events are guaranteed.
- Warning: it is an error to define this transient outputOnly field in an X3D file, instead only use it a source for ROUTE events.
- Returns:
- value of progress field
-
getTimeOut
double getTimeOut()Provide double value in seconds within allowed range of [0,infinity) from inputOutput SFTime field named timeOut.
Tooltip: Time in seconds of maximum load duration prior to declaring failure. Default value zero means use browser defaults. *- Returns:
- value of timeOut field
-
setTimeOut
Accessor method to assign double value in seconds to inputOutput SFTime field named timeOut.
Tooltip: Time in seconds of maximum load duration prior to declaring failure. Default value zero means use browser defaults. *- Parameters:
newValue- is new value for the timeOut field.- Returns:
LoadSensor- namely this same object to allow sequential method pipelining (i.e. consecutive method invocations on the same object).
-
getWatchList
X3DNode[] getWatchList()Provide array of X3DNode results (using an array consisting of properly typed nodes or ProtoInstanceObjects) from inputOutput MFNode field watchList.
Tooltip: [X3DUrlObject] The watchList field monitors one or more USE nodes that contain a valid url field.- Hint: if watchList contains multiple USE nodes, output events are only generated when all children have loaded successfully or at least one node has failed.
- Hint: if individual load status information is desired for different nodes, multiple LoadSensor nodes may be used, each with a single watchList element.
- Hint: Anchor nodes can be monitored for binding a target Viewpoint, loading a new scene, or loading a new scene in a new window.
Warning: according to X3D Unified Object Model (X3DUOM), acceptable node types are limited to X3DUrlObject.- Returns:
- value of watchList field
- See Also:
X3DUrlObject
-
setWatchList
Accessor method to assign X3DNode array (using an array consisting of properly typed nodes or ProtoInstanceObjects) to inputOutput MFNode field watchList.
Tooltip: [X3DUrlObject] The watchList field monitors one or more USE nodes that contain a valid url field.- Hint: if watchList contains multiple USE nodes, output events are only generated when all children have loaded successfully or at least one node has failed.
- Hint: if individual load status information is desired for different nodes, multiple LoadSensor nodes may be used, each with a single watchList element.
- Hint: Anchor nodes can be monitored for binding a target Viewpoint, loading a new scene, or loading a new scene in a new window.
Note: according to X3D Unified Object Model (X3DUOM), acceptable node types are limited to X3DUrlObject.- Parameters:
newValue- is new value for the watchList field.- Returns:
LoadSensor- namely this same object to allow sequential method pipelining (i.e. consecutive method invocations on the same object).
-
addWatchList
Add array of child watchList nodes to array of existing nodes (if any).
Note: according to X3D Unified Object Model (X3DUOM), acceptable node types are limited to X3DUrlObject.- Parameters:
newValue- is new value array to be appended the watchList field.
-
setWatchList
Set single child watchList node, replacing prior array of existing nodes (if any).- Parameters:
newValue- is new node for the watchList field
-