|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectice.storm.DefaultFactory
This is a factory for loading of pilots. It is the heart of Storm. Note that it caches all information about previously loaded pilots. This cache can freed from time to time. The cached information includes mapping between contentTypes and pilots (classname, location). actual binary class data. NOTE that the DefaultFactory only hardcodes info about essential pilots and scripters. Factories extending DefaultFactory should load info from files, current dir etc.
DefaultFactory also provides API for adding/removing mappings between mime-type and pilots as well as mappings between ascript names and scripters
| Constructor Summary | |
DefaultFactory()
|
|
| Method Summary | |
void |
addPilotInfo(PilotInfo pi)
|
void |
addScripterInfo(ScripterInfo s)
|
Pilot |
createPilot(ContentLoader l)
Create a pilot to display the content that is being loaded by the ContentLoader. |
Pilot |
createPilot(String contentType)
Create a pilot for a given content type. |
Scripter |
createScripter(String scriptName)
Create an interpreter for procesing commands in scripting language called scriptName |
ClassLoader |
createURLClassLoader(URL[] urls)
|
protected String |
extractContentType(ContentLoader l)
|
Enumeration |
getAllPilotInfos()
Get a enumeration of all PilotInfos that describe all (so far) known pilots. |
Enumeration |
getAllScripterInfos()
Get a enumeration of all ScripterInfos describing all (so far) known scripters |
ScripterInfo |
getScripterInfo(String name)
|
boolean |
isContentTypeSupported(Pilot pilot,
ContentLoader l,
String contentType)
Check whether the specified pilot can display the data of a given content type or that is going to be loaded by the ContentLoader. |
protected void |
loadDefaultResources()
|
void |
removePilotInfo(PilotInfo pi)
|
void |
removeScripterInfo(ScripterInfo s)
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public DefaultFactory()
| Method Detail |
public void addPilotInfo(PilotInfo pi)
public void removePilotInfo(PilotInfo pi)
public void addScripterInfo(ScripterInfo s)
public void removeScripterInfo(ScripterInfo s)
public Enumeration getAllPilotInfos()
PilotFactory
getAllPilotInfos in interface PilotFactorypublic Enumeration getAllScripterInfos()
PilotFactory
getAllScripterInfos in interface PilotFactorypublic Scripter createScripter(String scriptName)
PilotFactory
createScripter in interface PilotFactoryscriptName - name of the scripting language
public ScripterInfo getScripterInfo(String name)
getScripterInfo in interface PilotFactorypublic Pilot createPilot(String contentType)
PilotFactory
createPilot in interface PilotFactorycontentType - content type of the data
public Pilot createPilot(ContentLoader l)
PilotFactory
createPilot in interface PilotFactoryl - ContentLoader that is doing the loading of the data
public boolean isContentTypeSupported(Pilot pilot,
ContentLoader l,
String contentType)
PilotFactory
isContentTypeSupported in interface PilotFactorypilot - Pilot that is being checkedl - ContentLoader that is doing the loading of the datacontentType - contentType of the data. If this value is specified
it overrides the contentType that is determined by the loader.
public ClassLoader createURLClassLoader(URL[] urls)
createURLClassLoader in interface URLClassLoaderFactoryprotected void loadDefaultResources()
protected String extractContentType(ContentLoader l)
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||