Examples of Zone


Examples of org.xbill.DNS.Zone

    if (type == Type.SIG || type == Type.RRSIG) {
      type = Type.ANY;
      flags |= FLAG_SIGONLY;
    }

    Zone zone = findBestZone(name);
    if (zone != null) {
      sr = zone.findRecords(name, type);

      if (sr.isNXDOMAIN()) {
        response.getHeader().setRcode(Rcode.NXDOMAIN);
        if (zone != null) {
          addSOA(response, zone);
View Full Code Here

Examples of org.xbill.DNS.Zone

  private byte[] doAXFR(Name name, Message query, TSIG tsig, TSIGRecord qtsig, Socket s) {

    boolean first = true;

    Zone zone = this.findBestZone(name);

    if (zone == null) {

      return errorMessage(query, Rcode.REFUSED);

    }

    // Check that the IP requesting the AXFR is present as a NS in this zone
    boolean axfrAllowed = false;

    Iterator<?> nsIterator = zone.getNS().rrs();

    while (nsIterator.hasNext()) {

      NSRecord record = (NSRecord) nsIterator.next();

      try {
        String nsIP = InetAddress.getByName(record.getTarget().toString()).getHostAddress();

        if (s.getInetAddress().getHostAddress().equals(nsIP)) {

          axfrAllowed = true;
          break;
        }

      } catch (UnknownHostException e) {

        log.warn("Unable to resolve hostname of nameserver " + record.getTarget() + " in zone " + zone.getOrigin() + " while processing AXFR request from " + s.getRemoteSocketAddress());
      }
    }

    if (!axfrAllowed) {
      log.warn("AXFR request of zone " + zone.getOrigin() + " from " + s.getRemoteSocketAddress() + " refused!");
      return errorMessage(query, Rcode.REFUSED);
    }

    Iterator<?> it = zone.AXFR();

    try {
      DataOutputStream dataOut;
      dataOut = new DataOutputStream(s.getOutputStream());
      int id = query.getHeader().getID();
View Full Code Here

Examples of org.xbill.DNS.Zone

        pos++;
      }
    }

    return new Zone(zoneName,recordArray);
  }
View Full Code Here

Examples of org.xbill.DNS.Zone

      Name origin;
      try {

        origin = Name.fromString(zoneFile.getName(), Name.root);
        Zone zone = new Zone(origin, zoneFile.getPath());

        log.debug("FileZoneProvider " + name + " successfully parsed zone file " + zoneFile.getName());

        zones.add(zone);
View Full Code Here

Examples of org.xbill.DNS.Zone

                                    "getRecord found an unexpected data");
                        }
                    }
            }

            zone = new Zone(Name.root, (Record[]) records
                    .toArray(new Record[] {}));
           
        } catch (TextParseException e) {
            // TODO Auto-generated catch block
            e.printStackTrace();
View Full Code Here

Examples of org.xulfaces.bridge.Zone

    super.encodeBegin(facesContext, component);
    if (component instanceof EditableValueHolder) {
      EditableValueHolder editableValueHolder = (EditableValueHolder) component;
      if (!editableValueHolder.isValid()) {
        Bridge bridge = XulUtils.getBridge();
        Zone zone = new Zone(component.getClientId(facesContext));
        bridge.addCommand(new NotValidCommand(zone));
      }
    }
  }
View Full Code Here

Examples of org.xulfaces.bridge.Zone

    if(!isParentSmoothlyUpdateable(component)){   
      if (component instanceof SmoothlyUpdateable) {
        SmoothlyUpdateable smoothlyUpdateable = (SmoothlyUpdateable) component;
        if (smoothlyUpdateable.needsUpdate()) {
          Bridge bridge = XulUtils.getBridge();
          Zone zone = new Zone(component.getClientId(facesContext));
          if (log.isDebugEnabled()) {
            log.debug("Add UpdateZoneCommand for DOM zone " + zone.getNodeId());
          }
         
          bridge.addCommand(new UpdateZoneCommand(zone,buildTargetName(component)));
        }
      }
View Full Code Here

Examples of org.xulfaces.bridge.Zone

    if(!isParentSmoothlyUpdateable(component)){
      if (component instanceof SmoothlyUpdateable) {
        SmoothlyUpdateable smoothlyUpdateable = (SmoothlyUpdateable) component;
        if (smoothlyUpdateable.needsUpdate()) {
          Bridge bridge = XulUtils.getBridge();
          Zone zone = new Zone(treeRowComponent.getNodeId());
          bridge.addCommand(new UpdateZoneCommand(zone,buildTargetName(component)));
        }
      }
    }
   
View Full Code Here

Examples of org.xulfaces.bridge.Zone

        if(!isParentSmoothlyUpdateable(component)){
          if (treeItemComponent instanceof SmoothlyUpdateable) {
          SmoothlyUpdateable smoothlyUpdateable = (SmoothlyUpdateable) treeItemComponent;
          if (smoothlyUpdateable.needsUpdate()) {
            Bridge bridge = XulUtils.getBridge();
            Zone zone = new Zone(nodeId);
            bridge.addCommand(new UpdateZoneCommand(zone,buildTargetName(component)));
          }
        } 
        }
   
View Full Code Here

Examples of org.xulfaces.bridge.Zone

    responseWriter.writeAttribute("id",component.getClientId(facesContext), "id");
    renderAttributes(facesContext,component,(List) component.getAttributes().get("annotatedAttributes"));

    // Add command for the bridge
    Bridge bridge = XulUtils.getBridge();
    Zone zone = new Zone(component.getClientId(facesContext));
    if (log.isDebugEnabled()) {
      log.debug("Add WatchZonePropertyCommand for <selectedIndex> to DOM zone " + zone.getNodeId());
    }   
    bridge.addCommand(new WatchZonePropertyCommand(zone,buildTargetName(component),"selectedIndex"));
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.