|
Xj3D 2.0 VRML/X3D Code API | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface VRMLSingleExternalNodeType
Representation of a node that defines it's content at a URL separate to this file that will also need loading.
The idea behind this node interface is that we are going to allow a separate thread from the one that created the initial node to simultaneously load the contents of this node. As we really don't know all the possible types to load, particularly with profiles, a common base class will make life much easier for us to deal with in a generic fashion.
The operation of this interface is to get the loader thread to set the load state as it is going. Once it has loaded the content it then tells the implementation about what it has found.
When fetching the URL list, it is expected that all URLs will be fully qualified. It will be up to the implementor to process the set URLs to contain only fully qualified URLs. For this, we will ensure that the world URL is set on every instance through the setWorldUrl() method.
| Field Summary |
|---|
| Fields inherited from interface org.web3d.vrml.nodes.VRMLExternalNodeType |
|---|
LOAD_COMPLETE, LOAD_FAILED, LOADING, NOT_LOADED |
| Method Summary | |
|---|---|
boolean |
checkValidContentType(java.lang.String mimetype)
Check to see if the given MIME type is one that would be supported as content coming into this node. |
int |
getLoadState()
Ask the state of the load of this node. |
java.lang.String[] |
getUrl()
Get the list of URLs requested by this node. |
void |
setContent(java.lang.String mimetype,
java.lang.Object content)
Set the content of this node to the given object. |
void |
setLoadedURI(java.lang.String URI)
Notify the node which URL was used to load the content. |
void |
setLoadState(int state)
Set the load state of the node. |
void |
setUrl(java.lang.String[] newUrl,
int numValid)
Replace the existing set of URLs with this new set. |
| Methods inherited from interface org.web3d.vrml.nodes.VRMLExternalNodeType |
|---|
addContentStateListener, addUrlListener, getWorldUrl, removeContentStateListener, removeUrlListener, setWorldUrl |
| Method Detail |
|---|
int getLoadState()
void setLoadState(int state)
state - The new state of the node
void setUrl(java.lang.String[] newUrl,
int numValid)
newUrl - The list of new instances to usenumValid - The number of valid values to copy from the arrayjava.lang.String[] getUrl()
boolean checkValidContentType(java.lang.String mimetype)
mimetype - The type to check for
void setContent(java.lang.String mimetype,
java.lang.Object content)
throws java.lang.IllegalArgumentException
mimetype - The mime type of this object if knowncontent - The content of the object
IllegalArguementException - The content object is not supported
java.lang.IllegalArgumentExceptionvoid setLoadedURI(java.lang.String URI)
URI - The URI used to load this content
|
Xj3D 2.0 VRML/X3D Code API | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||