Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
Licensed to jclouds, Inc. (jclouds) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. jclouds licenses this file to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
 
 package org.jclouds.elb.xml;
 
 import static org.jclouds.util.SaxUtils.currentOrNull;
 import static org.jclouds.util.SaxUtils.equalsOrSuffix;
 
 import java.util.Set;
 
 

Author(s):
Adrian Cole
See also:
docs
 
 public class DescribeLoadBalancersResultHandler extends
 
    private final LoadBalancerHandler loadBalancerHandler;
 
    private StringBuilder currentText = new StringBuilder();
    private Set<LoadBalancerloadBalancers = Sets.newLinkedHashSet();
    private boolean inLoadBalancers;
    private String marker;
 
    protected int memberDepth;
 
    @Inject
    public DescribeLoadBalancersResultHandler(LoadBalancerHandler loadBalancerHandler) {
       this. = loadBalancerHandler;
    }

   
 
    @Override
       return IterableWithMarkers.from();
    }

   
 
    @Override
    public void startElement(String urlString nameString qNameAttributes attributesthrows SAXException {
       if (equalsOrSuffix(qName"member")) {
          ++;
       } else if (equalsOrSuffix(qName"LoadBalancerDescriptions")) {
           = true;
       }
       if () {
          .startElement(urlnameqNameattributes);
       }
    }

   
 
    @Override
    public void endElement(String uriString nameString qNamethrows SAXException {
       if (equalsOrSuffix(qName"member")) {
          endMemberuri,  name,  qName);
          --;
       } else if (equalsOrSuffix(qName"LoadBalancerDescriptions")) {
           = false;
       } else if (equalsOrSuffix(qName"Marker")) {
           = currentOrNull();
       } else if () {
          .endElement(urinameqName);
       }
 
        = new StringBuilder();
   }
   protected void endMember(String uriString nameString qNamethrows SAXException {
      if () {
         if ( == 1)
         else
            .endElement(urinameqName);
      }
   }

   
   public void characters(char ch[], int startint length) {
      if () {
         .characters(chstartlength);
      } else {
         .append(chstartlength);
      }
   }
New to GrepCode? Check out our FAQ X