org.jclouds.ovf.xml.internal
Class BaseEnvelopeHandler<V extends BaseVirtualSystem<V>,B extends BaseVirtualSystem.Builder<V>,H extends BaseVirtualSystemHandler<V,B>,E extends BaseEnvelope<V,E>,T extends BaseEnvelope.Builder<V,E>>

java.lang.Object
  extended by org.xml.sax.helpers.DefaultHandler
      extended by org.jclouds.http.functions.ParseSax.HandlerWithResult<E>
          extended by org.jclouds.ovf.xml.internal.BaseEnvelopeHandler<V,B,H,E,T>
All Implemented Interfaces:
InvocationContext<ParseSax.HandlerWithResult<E>>, ContentHandler, DTDHandler, EntityResolver, ErrorHandler
Direct Known Subclasses:
EnvelopeHandler

public class BaseEnvelopeHandler<V extends BaseVirtualSystem<V>,B extends BaseVirtualSystem.Builder<V>,H extends BaseVirtualSystemHandler<V,B>,E extends BaseEnvelope<V,E>,T extends BaseEnvelope.Builder<V,E>>
extends ParseSax.HandlerWithResult<E>

Author:
Adrian Cole

Field Summary
protected  T builder
           
protected  SectionHandler defaultSectionHandler
           
protected  int depth
           
protected  DiskSectionHandler diskHandler
           
protected  javax.inject.Provider<T> envelopeBuilderProvider
           
protected  SectionHandler extensionHandler
           
protected  boolean inDisk
           
protected  boolean inExtensionSection
           
protected  boolean inNetwork
           
protected  boolean inSection
           
protected  boolean inVirtualSystem
           
protected  NetworkSectionHandler networkHandler
           
protected  H virtualSystemHandler
           
 
Constructor Summary
BaseEnvelopeHandler(DiskSectionHandler diskHandler, NetworkSectionHandler networkHandler, H virtualSystemHandler, javax.inject.Provider<T> envelopeBuilderProvider)
           
 
Method Summary
 void characters(char[] ch, int start, int length)
           
 void endElement(String uri, String localName, String qName)
           
 E getResult()
           
 void startElement(String uri, String localName, String qName, Attributes attrs)
           
 
Methods inherited from class org.jclouds.http.functions.ParseSax.HandlerWithResult
getRequest, setContext
 
Methods inherited from class org.xml.sax.helpers.DefaultHandler
endDocument, endPrefixMapping, error, fatalError, ignorableWhitespace, notationDecl, processingInstruction, resolveEntity, setDocumentLocator, skippedEntity, startDocument, startPrefixMapping, unparsedEntityDecl, warning
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

virtualSystemHandler

protected final H extends BaseVirtualSystemHandler<V,B> virtualSystemHandler

diskHandler

protected final DiskSectionHandler diskHandler

networkHandler

protected final NetworkSectionHandler networkHandler

envelopeBuilderProvider

protected final javax.inject.Provider<T extends BaseEnvelope.Builder<V,E>> envelopeBuilderProvider

builder

protected T extends BaseEnvelope.Builder<V,E> builder

defaultSectionHandler

protected SectionHandler defaultSectionHandler

extensionHandler

protected SectionHandler extensionHandler

inDisk

protected boolean inDisk

inNetwork

protected boolean inNetwork

inVirtualSystem

protected boolean inVirtualSystem

inSection

protected boolean inSection

inExtensionSection

protected boolean inExtensionSection

depth

protected int depth
Constructor Detail

BaseEnvelopeHandler

@Inject
public BaseEnvelopeHandler(DiskSectionHandler diskHandler,
                                  NetworkSectionHandler networkHandler,
                                  H virtualSystemHandler,
                                  javax.inject.Provider<T> envelopeBuilderProvider)
Method Detail

getResult

public E getResult()
Specified by:
getResult in class ParseSax.HandlerWithResult<E extends BaseEnvelope<V,E>>

startElement

public void startElement(String uri,
                         String localName,
                         String qName,
                         Attributes attrs)
                  throws SAXException
Specified by:
startElement in interface ContentHandler
Overrides:
startElement in class org.xml.sax.helpers.DefaultHandler
Throws:
SAXException

endElement

public void endElement(String uri,
                       String localName,
                       String qName)
Specified by:
endElement in interface ContentHandler
Overrides:
endElement in class org.xml.sax.helpers.DefaultHandler

characters

public void characters(char[] ch,
                       int start,
                       int length)
Specified by:
characters in interface ContentHandler
Overrides:
characters in class org.xml.sax.helpers.DefaultHandler


Copyright © 2009-2012 jclouds. All Rights Reserved.