Package com.dadfha.uid.server

Examples of com.dadfha.uid.server.DataEntry


      case RES_UCD:
        // Cast to ResUcdQuery type to reflect fields format of the command
        ResUcdQuery ruqPacket = (ResUcdQuery) packet;
       
        // Resolve request ucode(s)       
        DataEntry entry;
       
        // Construct response packet
        ResUcdRecieve rurPacket = new ResUcdRecieve();
        rurPacket.setSerialNumber( (byte) ( ruqPacket.getSerialNumber() + 1 ) );
        rurPacket.setResolveMode( ResolveMode.valueOf( ruqPacket.getQueryMode().getCode() ) );         
       
        try {
          entry = resolveUcodeLocal(ruqPacket.getQueryUcode(), ruqPacket.getQueryMask(), ruqPacket.getQueryAttribute(), ruqPacket.getQueryMode());
         
          // If entry match found, define Recieve Packet
          if(entry != null) {
            rurPacket.setErrorCode(Error.E_UIDC_OK);
            rurPacket.setTTL(entry.getTTL());
            rurPacket.setDataVersion(entry.getDataVersion());
            rurPacket.setDataAttribute(entry.getDataAttribute());
            rurPacket.setDataType(entry.getDataType());
            rurPacket.addResUcdData(entry.getData());
            rurPacket.addMask(entry.getUcodeMask().getLongArray());
          } else { // entry == null means the cascade search is in action
            rurPacket = (ResUcdRecieve) tempRecievePacket;
          }         
         
        } catch (Exception e) {
View Full Code Here


   
    // Search for matching Data Entry within selected file (Specification page 12)
    // (queryucode & querymask & ucodemask) equals (ucode & querymask & ucodemask)
    // and (querymask & ucodemask) equals ucodemask
    Iterator<DataEntry> j = resolvedFile.getDataEntriesView().iterator();
    DataEntry entry = null;
    DataEntry resolvedEntry = null;
    isSpaceMatched = false;
   
    // Default alternative server with which another search attempt may succeed
    // OPT this should be defined as constant or file resource
    DataEntry defaultEntry = new DataEntry( new Ucode(0x0efffec000000000L, 0x0000000000050200L),
        new Ucode(0xffffffffffffffffL, 0xffffffffffffff00L)
        DataAttribute.UIDC_ATTR_RS,
        (short) 1,
        3600,
        DataType.UIDC_DATATYPE_UCODE_IPV4,
View Full Code Here

TOP

Related Classes of com.dadfha.uid.server.DataEntry

Copyright © 2018 www.massapicom. 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.