Package org.jclouds.ec2.xml
Class BaseReservationHandler<T>
- java.lang.Object
-
- org.xml.sax.helpers.DefaultHandler
-
- org.jclouds.http.functions.ParseSax.HandlerWithResult<T>
-
- org.jclouds.http.functions.ParseSax.HandlerForGeneratedRequestWithResult<T>
-
- 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>
-
-
Field Summary
Fields Modifier and Type Field Description protected RunningInstance.Builder<?>
builder
protected StringBuilder
currentText
protected DateService
dateService
protected com.google.common.base.Supplier<String>
defaultRegion
protected boolean
inGroupSet
protected boolean
inInstancesSet
protected boolean
inProductCodes
protected int
itemDepth
-
Constructor Summary
Constructors Modifier Constructor Description protected
BaseReservationHandler(DateService dateService, com.google.common.base.Supplier<String> defaultRegion)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
characters(char[] ch, int start, int length)
void
endElement(String uri, String name, String qName)
protected boolean
endOfInstanceItem()
protected void
inItem()
protected RunningInstance.Builder<?>
newBuilder()
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
-
-
-
-
Field Detail
-
dateService
protected final DateService dateService
-
defaultRegion
protected final com.google.common.base.Supplier<String> defaultRegion
-
builder
protected RunningInstance.Builder<?> builder
-
currentText
protected StringBuilder currentText
-
itemDepth
protected int itemDepth
-
inInstancesSet
protected boolean inInstancesSet
-
inProductCodes
protected boolean inProductCodes
-
inGroupSet
protected boolean inGroupSet
-
-
Constructor Detail
-
BaseReservationHandler
protected BaseReservationHandler(DateService dateService, com.google.common.base.Supplier<String> defaultRegion)
-
-
Method Detail
-
newBuilder
protected RunningInstance.Builder<?> newBuilder()
-
inItem
protected void inItem()
-
startElement
public void startElement(String uri, String name, String qName, Attributes attrs)
- Specified by:
startElement
in interfaceContentHandler
- Overrides:
startElement
in classDefaultHandler
-
endElement
public void endElement(String uri, String name, String qName)
- Specified by:
endElement
in interfaceContentHandler
- Overrides:
endElement
in classDefaultHandler
-
refineBuilderBeforeAddingInstance
protected void refineBuilderBeforeAddingInstance()
-
endOfInstanceItem
protected boolean endOfInstanceItem()
-
characters
public void characters(char[] ch, int start, int length)
- Specified by:
characters
in interfaceContentHandler
- Overrides:
characters
in classDefaultHandler
-
newReservation
protected Reservation<? extends RunningInstance> newReservation()
-
-