org.jclouds.s3.xml
Class LocationConstraintHandler

java.lang.Object
  extended by org.xml.sax.helpers.DefaultHandler
      extended by org.jclouds.http.functions.ParseSax.HandlerWithResult<String>
          extended by 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:

Constructor Summary
LocationConstraintHandler(Map<String,String> bucketToRegion)
           
 
Method Summary
 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.=

US_STANDARD is returned as "" xml documents.

 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
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LocationConstraintHandler

@Inject
public LocationConstraintHandler(Map<String,String> bucketToRegion)
Method Detail

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 org.xml.sax.helpers.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 org.xml.sax.helpers.DefaultHandler


Copyright © 2009-2011 jclouds. All Rights Reserved.