|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.jabber.jabberbeans.sax.HandlerFactory
This class is responsible for translating xmlns="*" tags into appropriate object builders for creating Extension-derived objects. The objects returned from this factory are SAX handlers, which are then put in charge of the stream from the server until the extension is officially 'over'
Constructor Summary | |
HandlerFactory()
constructor, loads property file and fills in hash table |
Method Summary | |
SubHandler |
getHandlerInstance(java.lang.String name,
AttributeList attributes)
locates and constructs the appropriate class handling the xmlns. |
HandlerEntry |
locateDefaultEntry()
locates the default handler, the global handler that just contains the XML data and does not parse it into a java object. |
HandlerEntry |
locateEntry(java.lang.String XMLNS)
locateEntry returns all information on the handler for a
particular xmlns, if a handler is present. |
HandlerEntry |
locateEntry(java.lang.String name,
AttributeList attributes)
locateEntry scans for an appropriate handler, if any. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public HandlerFactory() throws java.io.FileNotFoundException, java.io.IOException
FileNotFounntException
- if the properties file is not found
IOException
- if there is another I/O problem getting the
properties file
java.io.FileNotFoundException
Method Detail |
public SubHandler getHandlerInstance(java.lang.String name, AttributeList attributes)
name
- element name for lookupattributes
- attributes for lookup (scans for xmlns)
public HandlerEntry locateEntry(java.lang.String XMLNS)
locateEntry
returns all information on the handler for a
particular xmlns, if a handler is present.
XMLNS
- a String
value
HandlerEntry
value, or null if none
available.public HandlerEntry locateDefaultEntry()
public HandlerEntry locateEntry(java.lang.String name, AttributeList attributes)
locateEntry
scans for an appropriate handler, if any.
It searches based on the element information passed from SAX on
startElement event.
name
- a String
holding an element nameattributes
- an AttributeList
holding attributes,
including XML namespaces
HandlerEntry
, if an appropriate one
exists.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |