Package org.web3d.net.content
Class VRMLContentHandlerFactory
java.lang.Object
org.web3d.net.content.VRMLContentHandlerFactory
- All Implemented Interfaces:
org.ietf.uri.ContentHandlerFactory
- Direct Known Subclasses:
AWTContentHandlerFactory
A Factory implementation for VRML content handlers that produces VRML
output.
The factory implementation only handles UTF8 encoded files currently. We have not yet built a handler for XML encoded files.
This factory is not automatically registered with the system. If you want or need to load inlines, then you must create and instance of this factory and register it as a content handler factory with the URI system. For example
BrowserCore core = .... WorldLoaderManager loader = .... ContentHandlerFactory c_fac = URI.getContentHandlerFactory(); if(!(c_fac instanceof VRMLContentHandlerFactory)) { c_fac = new VRMLContentHandlerFactory(core, loader, c_fac); URI.setContentHandlerFactory(c_fac); }If a previous content handler was registered and it was not one of this class it will be chained to this class. If we can't find the content then we can ask the chained factory.
- Version:
- $Revision: 1.13 $
- Author:
- Justin Couch
-
Constructor Summary
ConstructorsConstructorDescriptionVRMLContentHandlerFactory
(BrowserCore browser, WorldLoaderManager wlm) Create a default content handler factory that does not chain to any further packages.VRMLContentHandlerFactory
(BrowserCore browser, WorldLoaderManager wlm, org.ietf.uri.ContentHandlerFactory fac) Create a content handler factory that may delegate to another factory if this one cannot support the content types requested. -
Method Summary
Modifier and TypeMethodDescriptionorg.ietf.uri.ContentHandler
createContentHandler
(String contentType) Create a content handler for the given mime type.org.ietf.uri.ContentHandlerFactory
Get the chained content handler factory if it has been set.
-
Constructor Details
-
VRMLContentHandlerFactory
Create a default content handler factory that does not chain to any further packages. This is the same as callingVRMLContentHandlerFactory(factory, clk, null)
.- Parameters:
browser
- The core representation of the browserwlm
- Loader manager for doing async calls
-
VRMLContentHandlerFactory
public VRMLContentHandlerFactory(BrowserCore browser, WorldLoaderManager wlm, org.ietf.uri.ContentHandlerFactory fac) Create a content handler factory that may delegate to another factory if this one cannot support the content types requested. If the reference is null, then there is no chained factory.- Parameters:
browser
- The core representation of the browserwlm
- Loader manager for doing async callsfac
- The factory to delegate to if we fail
-
-
Method Details
-
createContentHandler
Create a content handler for the given mime type. If the factory cannot create a handler then it shall returnnull
to allow other methods to be used.- Specified by:
createContentHandler
in interfaceorg.ietf.uri.ContentHandlerFactory
- Parameters:
contentType
- The MIME type of the handler needed- Returns:
- A valid content handler for the type or null
-
getWrappedFactory
public org.ietf.uri.ContentHandlerFactory getWrappedFactory()Get the chained content handler factory if it has been set. If none has been set, this will return null.- Returns:
- The wrapped content handler factory or null
-