站内搜索: 请输入搜索关键词
当前页面: 在线文档首页 > JBoss 4.0.1 sp1 .net API Documentation 英文版文档

EntityBeanDeserializer (JBoss.Net API) - JBoss 4.0.1 sp1 .net API Documentation 英文版文档


org.jboss.net.axis.server
Class EntityBeanDeserializer

java.lang.Object
  extended byorg.xml.sax.helpers.DefaultHandler
      extended byorg.apache.axis.message.SOAPHandler
          extended byorg.apache.axis.encoding.DeserializerImpl
              extended byorg.jboss.net.axis.server.EntityBeanDeserializer
All Implemented Interfaces:
org.apache.axis.encoding.Callback, ContentHandler, org.apache.axis.encoding.Deserializer, javax.xml.rpc.encoding.Deserializer, DTDHandler, EntityResolver, ErrorHandler, ParameterizableDeserializer, Serializable

public class EntityBeanDeserializer
extends org.apache.axis.encoding.DeserializerImpl
implements ParameterizableDeserializer

Server-side deserializer hitting an existing entity bean. Derived from the axis BeanDeserializer. Currently relies on some silly conventions that must be configurable in the deployment descriptor.

Version:
$Revision: 1.11.4.1 $
Author:
jung
See Also:
Serialized Form

Nested Class Summary
 class EntityBeanDeserializer.BeanPropertyTarget
          Class which knows how to update a bean property
 class EntityBeanDeserializer.FindPropertyTarget
           
 
Field Summary
protected  int collectionIndex
           
protected  Collection fieldSetters
           
protected  List findElements
           
protected  Method findMethod
           
protected  Object[] findObjects
           
protected  Object home
           
protected  boolean initialized
           
protected  Class javaType
           
protected  Map options
           
protected  Map propertyMap
           
protected  org.apache.axis.description.TypeDesc typeDesc
           
protected  javax.xml.namespace.QName xmlType
           
 
Fields inherited from class org.apache.axis.encoding.DeserializerImpl
defaultType, id, isEnded, isHref, isNil, targets, value
 
Fields inherited from class org.apache.axis.message.SOAPHandler
myElement
 
Constructor Summary
EntityBeanDeserializer(Class remoteType, javax.xml.namespace.QName xmlType)
          Construct a new BeanSerializer
 
Method Summary
 Map getOptions()
          return the set of options
static org.jboss.net.axis.server.EntityBeanDeserializer.BeanPropertyDescriptor[] getPd(Class javaType)
          Create a BeanPropertyDescriptor array for the indicated class.
protected  String getStringOption(String key, String def)
          returns an option string with a default
protected  void initialize(org.apache.axis.MessageContext ctx)
          initialize the deserializer
 void onEndElement(String namespace, String localName, org.apache.axis.encoding.DeserializationContext context)
           
 org.apache.axis.message.SOAPHandler onStartChild(String namespace, String localName, String prefix, Attributes attributes, org.apache.axis.encoding.DeserializationContext context)
          Deserializer interface called on each child element encountered in the XML stream.
 void onStartElement(String namespace, String localName, String qName, Attributes attributes, org.apache.axis.encoding.DeserializationContext context)
          Set the bean properties that correspond to element attributes.
 void setOptions(Map options)
          register a set of options
 
Methods inherited from class org.apache.axis.encoding.DeserializerImpl
addChildDeserializer, componentsReady, endElement, getDefaultType, getMechanismType, getValue, getValue, getValueTargets, moveValueTargets, registerValueTarget, removeValueTargets, setChildValue, setDefaultType, setValue, setValue, startElement, valueComplete
 
Methods inherited from class org.apache.axis.message.SOAPHandler
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
 
Methods inherited from interface javax.xml.rpc.encoding.Deserializer
getMechanismType
 

Field Detail

options

protected Map options

home

protected Object home

findMethod

protected Method findMethod

findElements

protected List findElements

findObjects

protected Object[] findObjects

typeDesc

protected org.apache.axis.description.TypeDesc typeDesc

xmlType

protected javax.xml.namespace.QName xmlType

javaType

protected Class javaType

propertyMap

protected Map propertyMap

collectionIndex

protected int collectionIndex

fieldSetters

protected Collection fieldSetters

initialized

protected boolean initialized
Constructor Detail

EntityBeanDeserializer

public EntityBeanDeserializer(Class remoteType,
                              javax.xml.namespace.QName xmlType)
                       throws Exception
Construct a new BeanSerializer

Parameters:
remoteType - remote interface of the entity bean
xmlType - fully-qualified xml tag-name of the corresponding xml structure
Method Detail

getStringOption

protected String getStringOption(String key,
                                 String def)
returns an option string with a default


initialize

protected void initialize(org.apache.axis.MessageContext ctx)
                   throws SAXException
initialize the deserializer

Throws:
SAXException

setOptions

public void setOptions(Map options)
Description copied from interface: ParameterizableDeserializer
register a set of options

Specified by:
setOptions in interface ParameterizableDeserializer

getOptions

public Map getOptions()
Description copied from interface: ParameterizableDeserializer
return the set of options

Specified by:
getOptions in interface ParameterizableDeserializer

onStartChild

public org.apache.axis.message.SOAPHandler onStartChild(String namespace,
                                                        String localName,
                                                        String prefix,
                                                        Attributes attributes,
                                                        org.apache.axis.encoding.DeserializationContext context)
                                                 throws SAXException
Deserializer interface called on each child element encountered in the XML stream.

Specified by:
onStartChild in interface org.apache.axis.encoding.Deserializer
Parameters:
namespace - is the namespace of the child element
localName - is the local name of the child element
prefix - is the prefix used on the name of the child element
attributes - are the attributes of the child element
context - is the deserialization context.
Returns:
is a Deserializer to use to deserialize a child (must be a derived class of SOAPHandler) or null if no deserialization should be performed.
Throws:
SAXException

onStartElement

public void onStartElement(String namespace,
                           String localName,
                           String qName,
                           Attributes attributes,
                           org.apache.axis.encoding.DeserializationContext context)
                    throws SAXException
Set the bean properties that correspond to element attributes. This method is invoked after startElement when the element requires deserialization (i.e. the element is not an href and the value is not nil.)

Specified by:
onStartElement in interface org.apache.axis.encoding.Deserializer
Parameters:
namespace - is the namespace of the element
localName - is the name of the element
qName - is the prefixed qName of the element
attributes - are the attributes on the element...used to get the type
context - is the DeserializationContext
Throws:
SAXException

onEndElement

public void onEndElement(String namespace,
                         String localName,
                         org.apache.axis.encoding.DeserializationContext context)
                  throws SAXException
Specified by:
onEndElement in interface org.apache.axis.encoding.Deserializer
Throws:
SAXException

getPd

public static org.jboss.net.axis.server.EntityBeanDeserializer.BeanPropertyDescriptor[] getPd(Class javaType)
Create a BeanPropertyDescriptor array for the indicated class.



Copyright © 2002 JBoss Group, LLC. All Rights Reserved.