|
||||||||||
PREV CLASS (src) NEXT CLASS (src) | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.xml.sax.helpers.DefaultHandler
org.jboss.axis.message.SOAPHandler (src)
org.jboss.axis.encoding.DeserializerImpl
The Deserializer base class.
Field Summary | |
protected QName (src) |
defaultType
|
protected java.lang.String |
id
|
protected boolean |
isEnded
|
protected boolean |
isHref
|
protected boolean |
isNil
|
protected java.util.Vector |
targets
|
protected java.lang.Object |
value
|
Fields inherited from class org.jboss.axis.message.SOAPHandler (src) |
myElement |
Constructor Summary | |
DeserializerImpl()
|
Method Summary | |
void |
addChildDeserializer(Deserializer (src) dSer)
|
boolean |
componentsReady()
Some deserializers (ArrayDeserializer) require all of the component values to be known before the value is complete. |
void |
endElement(java.lang.String namespace,
java.lang.String localName,
DeserializationContext (src) context)
endElement is called when the end element tag is reached. |
QName (src) |
getDefaultType()
|
java.lang.String |
getMechanismType()
JAX-RPC compliant method which returns mechanism type. |
java.lang.Object |
getValue()
Get the deserialized value. |
java.lang.Object |
getValue(java.lang.Object hint)
If the deserializer has component values (like ArrayDeserializer) this method gets the specific component via the hint. |
java.util.Vector |
getValueTargets()
Get the Value Targets of the Deserializer. |
void |
moveValueTargets(Deserializer (src) other)
Move someone else's targets to our own (see DeserializationContext) The DeserializationContext only allows one Deserializer to wait for a unknown multi-ref'ed value. |
void |
onEndElement(java.lang.String namespace,
java.lang.String localName,
DeserializationContext (src) context)
onEndElement is called by endElement. |
SOAPHandler (src) |
onStartChild(java.lang.String namespace,
java.lang.String localName,
java.lang.String prefix,
org.xml.sax.Attributes attributes,
DeserializationContext (src) context)
onStartChild is called on each child element. |
void |
onStartElement(java.lang.String namespace,
java.lang.String localName,
java.lang.String prefix,
org.xml.sax.Attributes attributes,
DeserializationContext (src) context)
This method is invoked after startElement when the element requires deserialization (i.e. |
void |
registerValueTarget(Target (src) target)
For deserializers of non-primitives, the value may not be known until later (due to multi-referencing). |
void |
removeValueTargets()
Remove the Value Targets of the Deserializer. |
void |
setChildValue(java.lang.Object value,
java.lang.Object hint)
If the deserializer has component values (like ArrayDeserializer) this method sets the specific component via the hint. |
void |
setDefaultType(QName (src) qName)
In some circumstances an element may not have a type attribute, but a default type qname is known from information in the container. |
void |
setValue(java.lang.Object value)
Set the deserialized value. |
void |
setValue(java.lang.Object value,
java.lang.Object hint)
|
void |
startElement(java.lang.String namespace,
java.lang.String localName,
java.lang.String prefix,
org.xml.sax.Attributes attributes,
DeserializationContext (src) context)
This method is invoked when an element start tag is encountered. |
void |
valueComplete()
The valueComplete() method is invoked when the end tag of the element is read. |
Methods inherited from class org.jboss.axis.message.SOAPHandler (src) |
makeNewElement, onEndChild |
Methods inherited from class org.xml.sax.helpers.DefaultHandler |
characters, endDocument, endElement, endPrefixMapping, error, fatalError, ignorableWhitespace, notationDecl, processingInstruction, resolveEntity, setDocumentLocator, skippedEntity, startDocument, startElement, startPrefixMapping, unparsedEntityDecl, warning |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected java.lang.Object value
protected boolean isEnded
protected java.util.Vector targets
protected QName (src) defaultType
protected boolean isHref
protected boolean isNil
protected java.lang.String id
Constructor Detail |
public DeserializerImpl()
Method Detail |
public java.lang.String getMechanismType()
getMechanismType
in interface Deserializer (src)
public java.lang.Object getValue()
getValue
in interface Deserializer (src)
public void setValue(java.lang.Object value)
setValue
in interface Deserializer (src)
value
- Object representing deserialized valuepublic java.lang.Object getValue(java.lang.Object hint)
getValue
in interface Deserializer (src)
public void setChildValue(java.lang.Object value, java.lang.Object hint) throws org.xml.sax.SAXException
setChildValue
in interface Deserializer (src)
hint
- Object representing deserialized value or nullvalue
- Object representing deserialized value or null
org.xml.sax.SAXException
public void setValue(java.lang.Object value, java.lang.Object hint) throws org.xml.sax.SAXException
setValue
in interface Callback (src)
org.xml.sax.SAXException
public void setDefaultType(QName (src) qName)
setDefaultType
in interface Deserializer (src)
public QName (src) getDefaultType()
getDefaultType
in interface Deserializer (src)
public void registerValueTarget(Target (src) target)
registerValueTarget
in interface Deserializer (src)
target
- public java.util.Vector getValueTargets()
getValueTargets
in interface Deserializer (src)
public void removeValueTargets()
removeValueTargets
in interface Deserializer (src)
public void moveValueTargets(Deserializer (src) other)
moveValueTargets
in interface Deserializer (src)
other
- is the Deserializer to copy targets from.public boolean componentsReady()
componentsReady
in interface Deserializer (src)
public void valueComplete() throws org.xml.sax.SAXException
valueComplete
in interface Deserializer (src)
org.xml.sax.SAXException
public void addChildDeserializer(Deserializer (src) dSer)
public void startElement(java.lang.String namespace, java.lang.String localName, java.lang.String prefix, org.xml.sax.Attributes attributes, DeserializationContext (src) context) throws org.xml.sax.SAXException
startElement
in interface Deserializer (src)
startElement
in class SOAPHandler (src)
namespace
- is the namespace of the elementlocalName
- is the name of the elementprefix
- is the prefix of the elementattributes
- are the attributes on the element...used to get the typecontext
- is the DeserializationContext
Normally a specific Deserializer (FooDeserializer) should extend DeserializerImpl.
Here is the flow that will occur in such cases:
1) DeserializerImpl.startElement(...) will be called and do the id/href/nill stuff.
2) If real deserialization needs to take place DeserializerImpl.onStartElement will be
invoked, which will attempt to install the specific Deserializer (FooDeserializer)
3) The FooDeserializer.startElement(...) will be called to do the Foo specific stuff.
This results in a call to FooDeserializer.onStartElement(...) if startElement was
not overridden.
4) The onChildElement(...) method is called for each child element. Nothing occurs
if not overridden. The FooDeserializer.onStartChild(...) method should return
the deserializer for the child element.
5) When the end tag is reached, the endElement(..) method is invoked. The default
behavior is to handle hrefs/ids, call onEndElement and then call the Deserializer
valueComplete method.
So the methods that you potentially want to override are:
onStartElement, onStartChild, componentsReady, setValue(object, hint)
You probably should not override startElement or endElement.
If you need specific behaviour at the end of the element consider overriding
onEndElement.
See the pre-existing Deserializers for more information.
org.xml.sax.SAXException
public void onStartElement(java.lang.String namespace, java.lang.String localName, java.lang.String prefix, org.xml.sax.Attributes attributes, DeserializationContext (src) context) throws org.xml.sax.SAXException
onStartElement
in interface Deserializer (src)
namespace
- is the namespace of the elementlocalName
- is the name of the elementprefix
- is the prefix of the elementattributes
- are the attributes on the element...used to get the typecontext
- is the DeserializationContext
org.xml.sax.SAXException
public SOAPHandler (src) onStartChild(java.lang.String namespace, java.lang.String localName, java.lang.String prefix, org.xml.sax.Attributes attributes, DeserializationContext (src) context) throws org.xml.sax.SAXException
onStartChild
in interface Deserializer (src)
onStartChild
in class SOAPHandler (src)
namespace
- is the namespace of the child elementlocalName
- is the local name of the child elementprefix
- is the prefix used on the name of the child elementattributes
- are the attributes of the child elementcontext
- is the deserialization context.
org.xml.sax.SAXException
public final void endElement(java.lang.String namespace, java.lang.String localName, DeserializationContext (src) context) throws org.xml.sax.SAXException
endElement
in interface Deserializer (src)
endElement
in class SOAPHandler (src)
namespace
- is the namespace of the child elementlocalName
- is the local name of the child elementcontext
- is the deserialization context
org.xml.sax.SAXException
public void onEndElement(java.lang.String namespace, java.lang.String localName, DeserializationContext (src) context) throws org.xml.sax.SAXException
onEndElement
in interface Deserializer (src)
namespace
- is the namespace of the child elementlocalName
- is the local name of the child elementcontext
- is the deserialization context
org.xml.sax.SAXException
|
||||||||||
PREV CLASS (src) NEXT CLASS (src) | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |