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
public class LocationConstraintHandler extends ParseSax.HandlerWithResult<String>
Parses the response from Amazon S3 GET Bucket Location Region is the document we expect to parse.
-
-
Constructor Summary
Constructors Constructor Description LocationConstraintHandler(com.google.common.cache.LoadingCache<String,com.google.common.base.Optional<String>> bucketToRegion)
-
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
fromValue(String v)
parses the value expected in xml documents from the S3 service.=String
getResult()
LocationConstraintHandler
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
-
-
-
-
Method Detail
-
getResult
public String getResult()
- Specified by:
getResult
in classParseSax.HandlerWithResult<String>
-
endElement
public void endElement(String uri, String name, String qName)
- Specified by:
endElement
in interfaceContentHandler
- Overrides:
endElement
in classDefaultHandler
-
setContext
public LocationConstraintHandler setContext(HttpRequest request)
- Specified by:
setContext
in interfaceInvocationContext<ParseSax.HandlerWithResult<String>>
- Overrides:
setContext
in classParseSax.HandlerWithResult<String>
-
fromValue
public static String fromValue(String v)
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
-
-