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>
attachments
protected Attachment.Status
attachmentStatus
protected Date
attachTime
protected String
availabilityZone
protected Date
createTime
protected StringBuilder
currentText
protected DateService
dateService
protected com.google.common.base.Supplier<String>
defaultRegion
protected String
device
protected boolean
encrypted
protected String
id
protected boolean
inAttachmentSet
protected String
instanceId
protected Integer
iops
protected String
region
protected com.google.common.base.Supplier<Map<String,com.google.common.base.Supplier<Set<String>>>>
regionToZonesSupplier
protected int
size
protected String
snapshotId
protected String
volumeId
protected Volume.Status
volumeStatus
protected String
volumeType
protected com.google.common.base.Supplier<Set<String>>
zonesSupplier
-
Constructor Summary
Constructors Modifier Constructor Description 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 Summary
All Methods Static 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)
static String
findAvailabilityZoneInArgsOrNull(GeneratedHttpRequest gRequest, Set<String> zones)
Volume
getResult()
CreateVolumeResponseHandler
setContext(HttpRequest request)
void
startElement(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:
getResult
in classParseSax.HandlerWithResult<Volume>
-
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
-
characters
public void characters(char[] ch, int start, int length)
- Specified by:
characters
in interfaceContentHandler
- Overrides:
characters
in classDefaultHandler
-
setContext
public CreateVolumeResponseHandler setContext(HttpRequest request)
- Specified by:
setContext
in interfaceInvocationContext<ParseSax.HandlerWithResult<Volume>>
- Overrides:
setContext
in classParseSax.HandlerForGeneratedRequestWithResult<Volume>
-
findAvailabilityZoneInArgsOrNull
public static String findAvailabilityZoneInArgsOrNull(GeneratedHttpRequest gRequest, Set<String> zones)
-
-