Package org.jclouds.aws.ec2.xml
Class AWSEC2SecurityGroupHandler
- java.lang.Object
-
- org.xml.sax.helpers.DefaultHandler
-
- org.jclouds.http.functions.ParseSax.HandlerWithResult<T>
-
- org.jclouds.http.functions.ParseSax.HandlerForGeneratedRequestWithResult<SecurityGroup>
-
- org.jclouds.aws.ec2.xml.AWSEC2SecurityGroupHandler
-
- All Implemented Interfaces:
InvocationContext<ParseSax.HandlerWithResult<SecurityGroup>>
,ContentHandler
,DTDHandler
,EntityResolver
,ErrorHandler
public class AWSEC2SecurityGroupHandler extends ParseSax.HandlerForGeneratedRequestWithResult<SecurityGroup>
-
-
Field Summary
Fields Modifier and Type Field Description protected SecurityGroup.Builder<?>
builder
protected StringBuilder
currentText
protected com.google.common.base.Supplier<String>
defaultRegion
protected boolean
inIpPermissions
protected AWSEC2IpPermissionHandler
ipPermissionHandler
protected int
itemDepth
protected String
region
-
Constructor Summary
Constructors Constructor Description AWSEC2SecurityGroupHandler(AWSEC2IpPermissionHandler ipPermissionHandler, com.google.common.base.Supplier<String> defaultRegion)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected SecurityGroup.Builder<?>
builder()
void
characters(char[] ch, int start, int length)
void
endElement(String uri, String name, String qName)
protected void
endItem(String uri, String name, String qName)
SecurityGroup
getResult()
ParseSax.HandlerForGeneratedRequestWithResult<SecurityGroup>
setContext(HttpRequest request)
void
startElement(String url, String name, String qName, Attributes attributes)
-
Methods inherited from class org.jclouds.http.functions.ParseSax.HandlerForGeneratedRequestWithResult
getRequest
-
Methods inherited from class org.xml.sax.helpers.DefaultHandler
endDocument, endPrefixMapping, error, fatalError, ignorableWhitespace, notationDecl, processingInstruction, resolveEntity, setDocumentLocator, skippedEntity, startDocument, startPrefixMapping, unparsedEntityDecl, warning
-
-
-
-
Field Detail
-
ipPermissionHandler
protected final AWSEC2IpPermissionHandler ipPermissionHandler
-
defaultRegion
protected final com.google.common.base.Supplier<String> defaultRegion
-
currentText
protected StringBuilder currentText
-
builder
protected SecurityGroup.Builder<?> builder
-
inIpPermissions
protected boolean inIpPermissions
-
itemDepth
protected int itemDepth
-
region
protected String region
-
-
Constructor Detail
-
AWSEC2SecurityGroupHandler
@Inject public AWSEC2SecurityGroupHandler(AWSEC2IpPermissionHandler ipPermissionHandler, com.google.common.base.Supplier<String> defaultRegion)
-
-
Method Detail
-
builder
protected SecurityGroup.Builder<?> builder()
-
setContext
public ParseSax.HandlerForGeneratedRequestWithResult<SecurityGroup> setContext(HttpRequest request)
- Specified by:
setContext
in interfaceInvocationContext<ParseSax.HandlerWithResult<SecurityGroup>>
- Overrides:
setContext
in classParseSax.HandlerForGeneratedRequestWithResult<SecurityGroup>
-
getResult
public SecurityGroup getResult()
- Specified by:
getResult
in classParseSax.HandlerWithResult<SecurityGroup>
-
startElement
public void startElement(String url, String name, String qName, Attributes attributes) throws SAXException
- Specified by:
startElement
in interfaceContentHandler
- Overrides:
startElement
in classDefaultHandler
- Throws:
SAXException
-
endElement
public void endElement(String uri, String name, String qName) throws SAXException
- Specified by:
endElement
in interfaceContentHandler
- Overrides:
endElement
in classDefaultHandler
- Throws:
SAXException
-
endItem
protected void endItem(String uri, String name, String qName) throws SAXException
- Throws:
SAXException
-
characters
public void characters(char[] ch, int start, int length)
- Specified by:
characters
in interfaceContentHandler
- Overrides:
characters
in classDefaultHandler
-
-