Package org.jclouds.ec2.xml
Class CreateVolumeResponseHandler
- java.lang.Object
-
- org.xml.sax.helpers.DefaultHandler
-
- org.jclouds.http.functions.ParseSax.HandlerWithResult<T>
-
- org.jclouds.http.functions.ParseSax.HandlerForGeneratedRequestWithResult<Volume>
-
- org.jclouds.ec2.xml.CreateVolumeResponseHandler
-
- All Implemented Interfaces:
InvocationContext<ParseSax.HandlerWithResult<Volume>>,ContentHandler,DTDHandler,EntityResolver,ErrorHandler
- Direct Known Subclasses:
NovaCreateVolumeResponseHandler
public class CreateVolumeResponseHandler extends ParseSax.HandlerForGeneratedRequestWithResult<Volume>
-
-
Field Summary
Fields Modifier and Type Field Description protected Set<Attachment>attachmentsprotected Attachment.StatusattachmentStatusprotected DateattachTimeprotected StringavailabilityZoneprotected DatecreateTimeprotected StringBuildercurrentTextprotected DateServicedateServiceprotected com.google.common.base.Supplier<String>defaultRegionprotected Stringdeviceprotected booleanencryptedprotected Stringidprotected booleaninAttachmentSetprotected StringinstanceIdprotected Integeriopsprotected Stringregionprotected com.google.common.base.Supplier<Map<String,com.google.common.base.Supplier<Set<String>>>>regionToZonesSupplierprotected intsizeprotected StringsnapshotIdprotected StringvolumeIdprotected Volume.StatusvolumeStatusprotected StringvolumeTypeprotected com.google.common.base.Supplier<Set<String>>zonesSupplier
-
Constructor Summary
Constructors Modifier Constructor Description protectedCreateVolumeResponseHandler(DateService dateService, com.google.common.base.Supplier<String> defaultRegion, com.google.common.base.Supplier<Map<String,com.google.common.base.Supplier<Set<String>>>> regionToZonesSupplier, com.google.common.base.Supplier<Set<String>> zonesSupplier)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidcharacters(char[] ch, int start, int length)voidendElement(String uri, String name, String qName)static StringfindAvailabilityZoneInArgsOrNull(GeneratedHttpRequest gRequest, Set<String> zones)VolumegetResult()CreateVolumeResponseHandlersetContext(HttpRequest request)voidstartElement(String uri, String name, String qName, Attributes attrs)-
Methods inherited from class org.jclouds.http.functions.ParseSax.HandlerForGeneratedRequestWithResult
getRequest
-
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
-
regionToZonesSupplier
protected final com.google.common.base.Supplier<Map<String,com.google.common.base.Supplier<Set<String>>>> regionToZonesSupplier
-
currentText
protected StringBuilder currentText
-
id
protected String id
-
size
protected int size
-
snapshotId
protected String snapshotId
-
availabilityZone
protected String availabilityZone
-
volumeStatus
protected Volume.Status volumeStatus
-
createTime
protected Date createTime
-
attachments
protected Set<Attachment> attachments
-
volumeId
protected String volumeId
-
instanceId
protected String instanceId
-
device
protected String device
-
attachmentStatus
protected Attachment.Status attachmentStatus
-
attachTime
protected Date attachTime
-
volumeType
protected String volumeType
-
iops
protected Integer iops
-
encrypted
protected boolean encrypted
-
inAttachmentSet
protected boolean inAttachmentSet
-
region
protected String region
-
-
Constructor Detail
-
CreateVolumeResponseHandler
@Inject protected CreateVolumeResponseHandler(DateService dateService, com.google.common.base.Supplier<String> defaultRegion, com.google.common.base.Supplier<Map<String,com.google.common.base.Supplier<Set<String>>>> regionToZonesSupplier, com.google.common.base.Supplier<Set<String>> zonesSupplier)
-
-
Method Detail
-
getResult
public Volume getResult()
- Specified by:
getResultin classParseSax.HandlerWithResult<Volume>
-
startElement
public void startElement(String uri, String name, String qName, Attributes attrs)
- Specified by:
startElementin interfaceContentHandler- Overrides:
startElementin classDefaultHandler
-
endElement
public void endElement(String uri, String name, String qName)
- Specified by:
endElementin interfaceContentHandler- Overrides:
endElementin classDefaultHandler
-
characters
public void characters(char[] ch, int start, int length)- Specified by:
charactersin interfaceContentHandler- Overrides:
charactersin classDefaultHandler
-
setContext
public CreateVolumeResponseHandler setContext(HttpRequest request)
- Specified by:
setContextin interfaceInvocationContext<ParseSax.HandlerWithResult<Volume>>- Overrides:
setContextin classParseSax.HandlerForGeneratedRequestWithResult<Volume>
-
findAvailabilityZoneInArgsOrNull
public static String findAvailabilityZoneInArgsOrNull(GeneratedHttpRequest gRequest, Set<String> zones)
-
-