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.
- Author:
- Adrian Cole
- See Also:
| 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 |
LocationConstraintHandler
@Inject
public LocationConstraintHandler(com.google.common.cache.LoadingCache<String,com.google.common.base.Optional<String>> bucketToRegion)
getResult
public String getResult()
- Specified by:
getResult in class ParseSax.HandlerWithResult<String>
endElement
public void endElement(String uri,
String name,
String qName)
- Specified by:
endElement in interface ContentHandler- Overrides:
endElement in class DefaultHandler
setContext
public LocationConstraintHandler setContext(HttpRequest request)
- Specified by:
setContext in interface InvocationContext<ParseSax.HandlerWithResult<String>>- Overrides:
setContext in class ParseSax.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 interface ContentHandler- Overrides:
characters in class DefaultHandler
Copyright © 2009-2012 jclouds. All Rights Reserved.