Package org.jclouds.aws.ec2.xml
Class BaseAWSReservationHandler<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.aws.ec2.xml.BaseAWSReservationHandler<T>
-
- All Implemented Interfaces:
InvocationContext<ParseSax.HandlerWithResult<T>>
,ContentHandler
,DTDHandler
,EntityResolver
,ErrorHandler
- Direct Known Subclasses:
AWSDescribeInstancesResponseHandler
,AWSRunInstancesResponseHandler
public abstract class BaseAWSReservationHandler<T> extends ParseSax.HandlerForGeneratedRequestWithResult<T>
-
-
Field Summary
Fields Modifier and Type Field Description protected AWSRunningInstance.Builder
builder
protected StringBuilder
currentText
protected DateService
dateService
protected com.google.common.base.Supplier<String>
defaultRegion
protected int
itemDepth
protected Logger
logger
-
Constructor Summary
Constructors Modifier Constructor Description protected
BaseAWSReservationHandler(DateService dateService, com.google.common.base.Supplier<String> defaultRegion)
-
Method Summary
All Methods Instance Methods Abstract 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 abstract boolean
endOfInstanceItem()
protected void
inItem()
protected AWSRunningInstance.Builder
newBuilder()
protected Reservation<? extends RunningInstance>
newReservation()
protected void
refineBuilderBeforeAddingInstance()
void
startElement(String uri, String localName, 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
-
logger
protected Logger logger
-
dateService
protected final DateService dateService
-
defaultRegion
protected final com.google.common.base.Supplier<String> defaultRegion
-
builder
protected AWSRunningInstance.Builder builder
-
currentText
protected StringBuilder currentText
-
itemDepth
protected int itemDepth
-
-
Constructor Detail
-
BaseAWSReservationHandler
protected BaseAWSReservationHandler(DateService dateService, com.google.common.base.Supplier<String> defaultRegion)
-
-
Method Detail
-
newBuilder
protected AWSRunningInstance.Builder newBuilder()
-
startElement
public void startElement(String uri, String localName, String qName, Attributes attrs) throws SAXException
- Specified by:
startElement
in interfaceContentHandler
- Overrides:
startElement
in classDefaultHandler
- Throws:
SAXException
-
endElement
public void endElement(String uri, String name, String qName)
- Specified by:
endElement
in interfaceContentHandler
- Overrides:
endElement
in classDefaultHandler
-
inItem
protected void inItem()
-
refineBuilderBeforeAddingInstance
protected void refineBuilderBeforeAddingInstance()
-
endOfInstanceItem
protected abstract 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()
-
-