org.jabber.jabberbeans.sax.serverside
Class LogHandler
java.lang.Object
|
+--org.jabber.jabberbeans.sax.SubHandler
|
+--org.jabber.jabberbeans.sax.serverside.LogHandler
- All Implemented Interfaces:
- DocumentHandler
- public final class LogHandler
- extends SubHandler
This is the SubHandler for "" objects. It uses a MessageBuilder
object to parse and create Message objects from the incoming XML, and
notifies the main bean (MessengerBean) when either a new message arrives,
an error arrives on an attempted sent message, or an error arrives in the
server XML.
Field Summary |
protected static java.lang.String[] |
baseAttribTypes
valid attributes |
protected LogBuilder |
builder
builder for the log messages |
protected java.lang.StringBuffer |
elementChars
element character cache (for log messages) |
Constructor Summary |
LogHandler()
Creates a new LogHandler instance. |
Method Summary |
void |
characters(char[] ch,
int start,
int length)
This is an exact copy of the characters function in the main handler |
protected void |
handleEndElement(java.lang.String name)
This is an exact copy of the end element in the main handler |
protected void |
startHandler(java.lang.String name,
AttributeList attributes)
Gets called when the underlying engine decides to pass an entity and
all sub-entities off to your subhandler. |
protected java.lang.Object |
stopHandler(java.lang.String name)
Stophandler is the same as end element, except that it is called saying
that the subhandler is no longer in scope. |
Methods inherited from class org.jabber.jabberbeans.sax.SubHandler |
endDocument, endElement, getHandlerFactory, getSubCount, graftParent, graftSubHandler, handleStartElement, ignorableWhitespace, processingInstruction, receiveChildData, setChildSubHandler, setDocumentLocator, setHandlerFactory, setParent, setParser, startDocument, startElement |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
builder
protected LogBuilder builder
- builder for the log messages
elementChars
protected java.lang.StringBuffer elementChars
- element character cache (for log messages)
baseAttribTypes
protected static final java.lang.String[] baseAttribTypes
- valid attributes
LogHandler
public LogHandler()
- Creates a new
LogHandler
instance.
startHandler
protected final void startHandler(java.lang.String name,
AttributeList attributes)
throws SAXException
- Description copied from class:
SubHandler
- Gets called when the underlying engine decides to pass an entity and
all sub-entities off to your subhandler.
Upon seeing the element that this subhandler handles, we call this
constructor, passing in the attributes.
- Overrides:
startHandler
in class SubHandler
- Parameters:
name
- name of the element which we are handling.attributes
- list of attributes on this element
SAXException
characters
public final void characters(char[] ch,
int start,
int length)
throws SAXException
- Description copied from class:
SubHandler
- This is an exact copy of the characters function in the main handler
- Specified by:
characters
in interface DocumentHandler
- Overrides:
characters
in class SubHandler
- Parameters:
ch
- character string detectedstart
- start positionlength
- length of string
- Throws:
SAXException
- thrown on error
handleEndElement
protected final void handleEndElement(java.lang.String name)
throws SAXException
- This is an exact copy of the end element in the main handler
- Overrides:
handleEndElement
in class SubHandler
- Parameters:
name
- string holding the element name
- Throws:
SAXException
- thrown on error
stopHandler
protected final java.lang.Object stopHandler(java.lang.String name)
throws SAXException
- Description copied from class:
SubHandler
- Stophandler is the same as end element, except that it is called saying
that the subhandler is no longer in scope.
- Overrides:
stopHandler
in class SubHandler
SAXException