org.jclouds.ec2.xml
Class BaseReservationHandler<T>

java.lang.Object
  extended by org.xml.sax.helpers.DefaultHandler
      extended by org.jclouds.http.functions.ParseSax.HandlerWithResult<T>
          extended by org.jclouds.http.functions.ParseSax.HandlerForGeneratedRequestWithResult<T>
              extended by org.jclouds.ec2.xml.BaseReservationHandler<T>
All Implemented Interfaces:
InvocationContext<ParseSax.HandlerWithResult<T>>, ContentHandler, DTDHandler, EntityResolver, ErrorHandler
Direct Known Subclasses:
DescribeInstancesResponseHandler, RunInstancesResponseHandler

public abstract class BaseReservationHandler<T>
extends ParseSax.HandlerForGeneratedRequestWithResult<T>

Author:
Adrian Cole

Field Summary
protected  RunningInstance.Builder builder
           
protected  com.google.inject.Provider<RunningInstance.Builder> builderProvider
           
protected  StringBuilder currentText
           
protected  DateCodec dateCodec
           
protected  com.google.common.base.Supplier<String> defaultRegion
           
protected  boolean inGroupSet
           
protected  boolean inInstancesSet
           
protected  boolean inProductCodes
           
protected  int itemDepth
           
 
Constructor Summary
BaseReservationHandler(DateCodecFactory dateCodecFactory, com.google.common.base.Supplier<String> defaultRegion, com.google.inject.Provider<RunningInstance.Builder> builderProvider)
           
 
Method Summary
protected  RunningInstance.Builder builder()
           
 void characters(char[] ch, int start, int length)
           
 void endElement(String uri, String name, String qName)
           
protected  boolean endOfInstanceItem()
           
protected  void inItem()
           
protected  Reservation<? extends RunningInstance> newReservation()
           
protected  void refineBuilderBeforeAddingInstance()
           
 void startElement(String uri, String name, String qName, Attributes attrs)
           
 
Methods inherited from class org.jclouds.http.functions.ParseSax.HandlerForGeneratedRequestWithResult
getRequest, setContext
 
Methods inherited from class org.jclouds.http.functions.ParseSax.HandlerWithResult
getResult
 
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

dateCodec

protected final DateCodec dateCodec

defaultRegion

protected final com.google.common.base.Supplier<String> defaultRegion

builderProvider

protected final com.google.inject.Provider<RunningInstance.Builder> builderProvider

currentText

protected StringBuilder currentText

builder

protected RunningInstance.Builder builder

itemDepth

protected int itemDepth

inInstancesSet

protected boolean inInstancesSet

inProductCodes

protected boolean inProductCodes

inGroupSet

protected boolean inGroupSet
Constructor Detail

BaseReservationHandler

@Inject
public BaseReservationHandler(DateCodecFactory dateCodecFactory,
                                     com.google.common.base.Supplier<String> defaultRegion,
                                     com.google.inject.Provider<RunningInstance.Builder> builderProvider)
Method Detail

startElement

public void startElement(String uri,
                         String name,
                         String qName,
                         Attributes attrs)
Specified by:
startElement in interface ContentHandler
Overrides:
startElement in class DefaultHandler

endElement

public void endElement(String uri,
                       String name,
                       String qName)
Specified by:
endElement in interface ContentHandler
Overrides:
endElement in class DefaultHandler

inItem

protected void inItem()

refineBuilderBeforeAddingInstance

protected void refineBuilderBeforeAddingInstance()

builder

protected RunningInstance.Builder builder()

endOfInstanceItem

protected boolean endOfInstanceItem()

characters

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

newReservation

protected Reservation<? extends RunningInstance> newReservation()


Copyright © 2009-2012 jclouds. All Rights Reserved.