org.apache.ws.jaxme
Interface JMHandler

All Superinterfaces:
org.xml.sax.ContentHandler, Observable
All Known Implementing Classes:
JMHandlerBase

public interface JMHandler
extends org.xml.sax.ContentHandler, Observable

A Handler is capable and used to unmarshal a certain subclass of JMElement. It is unable to marshal generic JMElements. The JMHandler is typically created by the Manager.

A JMHandler is reusable: If the sequence startDocument(), ..., endDocument() was executed, you can immediately perform the same sequence again, effectively reading another document. If the sequence was interrupted, you may also reset the handlers state by calling its init() method.

Version:
$Id: JMHandler.html,v 1.1 2004/07/25 10:45:33 rdonkin Exp $
Author:
Jochen Wiedmann

Nested Class Summary
static interface JMHandler.Data
           
 
Method Summary
 JMHandler.Data getData()
          Returns the handlers Data.
 java.lang.Object getResult()
          Returns the handlers result object.
 void init(JMHandler.Data pData)
          Initializes the handler by setting its Data.
 void init(JMUnmarshaller pUnmarshaller)
          Initializes the handler by creating a new Data instance and calling init(Data).
 
Methods inherited from interface org.xml.sax.ContentHandler
characters, endDocument, endElement, endPrefixMapping, ignorableWhitespace, processingInstruction, setDocumentLocator, skippedEntity, startDocument, startElement, startPrefixMapping
 
Methods inherited from interface org.apache.ws.jaxme.Observable
getObserver, setObserver
 

Method Detail

init

public void init(JMHandler.Data pData)
          throws JAXBException

Initializes the handler by setting its Data.

Parameters:
pData - An instance of JMHandler.Data providing access to the handlers configuration..
Throws:
JAXBException

init

public void init(JMUnmarshaller pUnmarshaller)
          throws JAXBException

Initializes the handler by creating a new Data instance and calling init(Data).

Throws:
JAXBException

getData

public JMHandler.Data getData()

Returns the handlers Data.


getResult

public java.lang.Object getResult()

Returns the handlers result object.

Returns:
Result object
Throws:
java.lang.IllegalStateException - If called before a full startDocument(), ..., endDocument() sequence.