Package org.jclouds.s3.xml
Class LocationConstraintHandler
java.lang.Object
org.xml.sax.helpers.DefaultHandler
org.jclouds.http.functions.ParseSax.HandlerWithResult<String>
org.jclouds.s3.xml.LocationConstraintHandler
- All Implemented Interfaces:
InvocationContext<ParseSax.HandlerWithResult<String>>
,ContentHandler
,DTDHandler
,EntityResolver
,ErrorHandler
Parses the response from Amazon S3 GET Bucket Location
Region is the document we expect to parse.
-
Constructor Summary
ConstructorsConstructorDescriptionLocationConstraintHandler
(com.google.common.cache.LoadingCache<String, com.google.common.base.Optional<String>> bucketToRegion) -
Method Summary
Modifier and TypeMethodDescriptionvoid
characters
(char[] ch, int start, int length) void
endElement
(String uri, String name, String qName) static String
parses the value expected in xml documents from the S3 service.=setContext
(HttpRequest request) Methods inherited from class org.jclouds.http.functions.ParseSax.HandlerWithResult
getRequest
Methods inherited from class org.xml.sax.helpers.DefaultHandler
endDocument, endPrefixMapping, error, fatalError, ignorableWhitespace, notationDecl, processingInstruction, resolveEntity, setDocumentLocator, skippedEntity, startDocument, startElement, startPrefixMapping, unparsedEntityDecl, warning
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.xml.sax.ContentHandler
declaration
-
Constructor Details
-
LocationConstraintHandler
-
-
Method Details
-
getResult
- Specified by:
getResult
in classParseSax.HandlerWithResult<String>
-
endElement
- Specified by:
endElement
in interfaceContentHandler
- Overrides:
endElement
in classDefaultHandler
-
setContext
- Specified by:
setContext
in interfaceInvocationContext<ParseSax.HandlerWithResult<String>>
- Overrides:
setContext
in classParseSax.HandlerWithResult<String>
-
fromValue
parses the value expected in xml documents from the S3 service.=US_STANDARD
is returned as "" xml documents. -
characters
public void characters(char[] ch, int start, int length) - Specified by:
characters
in interfaceContentHandler
- Overrides:
characters
in classDefaultHandler
-