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 voidcharacters(char[] ch, int start, int length)voidendElement(String uri, String name, String qName)static StringfromValue(String v)parses the value expected in xml documents from the S3 service.=StringgetResult()LocationConstraintHandlersetContext(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:
getResultin classParseSax.HandlerWithResult<String>
-
endElement
public void endElement(String uri, String name, String qName)
- Specified by:
endElementin interfaceContentHandler- Overrides:
endElementin classDefaultHandler
-
setContext
public LocationConstraintHandler setContext(HttpRequest request)
- Specified by:
setContextin interfaceInvocationContext<ParseSax.HandlerWithResult<String>>- Overrides:
setContextin classParseSax.HandlerWithResult<String>
-
fromValue
public static String fromValue(String v)
parses the value expected in xml documents from the S3 service.=US_STANDARDis returned as "" xml documents.
-
characters
public void characters(char[] ch, int start, int length)- Specified by:
charactersin interfaceContentHandler- Overrides:
charactersin classDefaultHandler
-
-