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.Builderbuilderprotected StringBuildercurrentTextprotected DateServicedateServiceprotected com.google.common.base.Supplier<String>defaultRegionprotected intitemDepthprotected Loggerlogger
-
Constructor Summary
Constructors Modifier Constructor Description protectedBaseAWSReservationHandler(DateService dateService, com.google.common.base.Supplier<String> defaultRegion)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description voidcharacters(char[] ch, int start, int length)voidendElement(String uri, String name, String qName)protected abstract booleanendOfInstanceItem()protected voidinItem()protected AWSRunningInstance.BuildernewBuilder()protected Reservation<? extends RunningInstance>newReservation()protected voidrefineBuilderBeforeAddingInstance()voidstartElement(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:
startElementin interfaceContentHandler- Overrides:
startElementin classDefaultHandler- Throws:
SAXException
-
endElement
public void endElement(String uri, String name, String qName)
- Specified by:
endElementin interfaceContentHandler- Overrides:
endElementin 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:
charactersin interfaceContentHandler- Overrides:
charactersin classDefaultHandler
-
newReservation
protected Reservation<? extends RunningInstance> newReservation()
-
-