|
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.erowid.sperowider.HandlerPool
A pool of AHandler
objects, and a map from MIME types and
file extensions to those objects.
Constructor Summary | |
HandlerPool(SperowiderContext context)
Creates a new HandlerPool object, and creates some basic mappings : text/html maps to TextHtmlHandler
text/css maps to TextCssHandler
application/x-javascript maps to PatternMatchingHandler
.html maps to TextHtmlHandler
.css maps to TextCssHandler
.js maps to PatternMatchingHandler
It also creates the default handler, which is used for unrecognized MIME
types and file extensions. |
Method Summary | |
void |
addHandler(String mimetype,
String fileExtension,
String className)
Adds a new AHandler to the pool, mapped to a specific MIME type and file
extension. |
void |
addHandlerForFileExtension(String fileExtension,
AHandler handler)
Adds a new AHandler , mapped to a specific file extension. |
void |
addHandlerForFileExtension(String fileExtension,
String className)
Adds a new AHandler , mapped to a specific file extension. |
void |
addHandlerForMimeType(String mimetype,
AHandler handler)
Adds a new AHandler , mapped to a specific MIME type. |
void |
addHandlerForMimeType(String mimetype,
String className)
Adds a new AHandler , mapped to a specific MIME type. |
AHandler |
getDefaultHandler()
Returns the default handler, the AHandler that will be used for
unrecognized MIME types and file extensions. |
AHandler |
getHandlerForFileExtension(String fileExtension)
Returns an AHandler for the passed in file extension. |
AHandler |
getHandlerForMimeType(String mimetype)
Returns an AHandler for the passed in MIME type. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public HandlerPool(SperowiderContext context) throws SperowiderInstantiationException
TextHtmlHandler
TextCssHandler
PatternMatchingHandler
TextHtmlHandler
TextCssHandler
PatternMatchingHandler
GenericHandler
.
Method Detail |
public void addHandler(String mimetype, String fileExtension, String className) throws ClassNotFoundException, IllegalAccessException, SperowiderInstantiationException
AHandler
to the pool, mapped to a specific MIME type and file
extension.
ClassNotFoundException
IllegalAccessException
SperowiderInstantiationException
public void addHandlerForMimeType(String mimetype, AHandler handler)
AHandler
, mapped to a specific MIME type.
public void addHandlerForFileExtension(String fileExtension, AHandler handler)
AHandler
, mapped to a specific file extension.
public void addHandlerForMimeType(String mimetype, String className) throws Exception
AHandler
, mapped to a specific MIME type.
Exception
public void addHandlerForFileExtension(String fileExtension, String className) throws Exception
AHandler
, mapped to a specific file extension.
Exception
public AHandler getHandlerForFileExtension(String fileExtension)
AHandler
for the passed in file extension.
public AHandler getHandlerForMimeType(String mimetype)
AHandler
for the passed in MIME type.
public AHandler getDefaultHandler()
AHandler
that will be used for
unrecognized MIME types and file extensions.
|
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |