public String toString() {
   String ret =
       "<CFSecurityISOCountryLanguageByCountryIdx"
           + " RequiredISOCountryId="
           + "\""
           + Short.toString(getRequiredISOCountryId())
           + "\""
           + "/>";
   return (ret);
 }
 public String toString() {
   String ret =
       "<CFBamISOLanguageHPKey"
           + " RequiredId="
           + "\""
           + Short.toString(getRequiredId())
           + "\""
           + " RequiredRevision=\""
           + Integer.toString(getRequiredRevision())
           + "\""
           + "/>";
   return (ret);
 }
 public String toString() {
   String ret =
       "<CFInternetURLProtocolHPKey"
           + " RequiredURLProtocolId="
           + "\""
           + Short.toString(getRequiredURLProtocolId())
           + "\""
           + " RequiredRevision=\""
           + Integer.toString(getRequiredRevision())
           + "\""
           + "/>";
   return (ret);
 }
 public String toString() {
   String ret =
       "<CFCrmClusterId32Gen"
           + " RequiredId="
           + "\""
           + Long.toString(getRequiredId())
           + "\""
           + ", SliceId=\""
           + Short.toString(getRequiredSliceId())
           + "\""
           + ", NextId=\""
           + Integer.toString(nextId)
           + "\"/>";
   return (ret);
 }
 public String toString() {
   String ret =
       "<CFAsteriskClusterId64Gen"
           + " RequiredId="
           + "\""
           + Long.toString(getRequiredId())
           + "\""
           + ", SliceId=\""
           + Short.toString(getRequiredSliceId())
           + "\""
           + ", NextId=\""
           + Long.toString(nextId)
           + "\"/>";
   return (ret);
 }
예제 #6
0
  private void processRequest(PDU pdu) throws DBException, IOException {
    // Process the request and add to SMS_RECEIVE_QUEUE
    if (pdu.getCommandId() == Data.DELIVER_SM) {

      dsm = (DeliverSM) pdu;
      this.userId = dsm.getSourceAddr().getAddress();
      this.serviceId = dsm.getDestAddr().getAddress();
      this.info = dsm.getShortMessage();

      ByteBuffer da = null;

      try {
        da = dsm.getDestSubaddress();

        String te = Convert.hexToString(da.getHexDump().substring(2));

        //				this.RequestID = te;
        Gateway.util.log(this.getClass().getName(), "getDestSubaddress:" + te);
      } catch (ValueNotSetException ex) {

      }
      short destport = 0;
      try {
        destport = dsm.getDestinationPort();

        Gateway.util.log(this.getClass().getName(), "getDestinationPort:" + destport);
      } catch (ValueNotSetException e) {
        // TODO Auto-generated catch block
        // Tim Dport o day
        // ByteBuffer otaData =new
        // ByteBuffer(info.getBytes(Data.ENC_ISO8859_1));
        ByteBuffer otaData = new ByteBuffer();
        otaData = dsm.getShortMessagebuff();
        try {

          byte udhlength = otaData.removeByte();
          byte udhele1 = otaData.removeByte();
          byte udhele2 = otaData.removeByte();

          short sdport = otaData.removeShort();

          short ssport = otaData.removeShort();

          String newmsg = otaData.removeString(otaData.length(), Data.ENC_ISO8859_1);

          if (udhlength == 6 && udhele1 == 5) {
            destport = sdport;
            this.info = newmsg;
            Gateway.util.log(
                this.getClass().getName(), "getDestinationPort:" + destport + "@info=" + newmsg);
          }

        } catch (NotEnoughDataInByteBufferException e1) {
          // TODO Auto-generated catch block

        }
      }

      this.Dport = Short.toString(destport);

      if (this.info == null) {
        this.info = "null";
      }
      this.userId = removePlusSign(this.userId);
      this.serviceId = rebuildServiceId(this.serviceId);
      this.operator = Preference.mobileOperator;
      // Added on 22//2003 : VinaPhone gui ban tin DeliverReport voi
      // truong esm_class != 0x4. ==> He thong xem nhu ban tin thuong
      // sai format va gui thong bao -- report -- thong bao --> LOOP./
      // To pass over this, set:

      if (dsm.getEsmClass() == 0x4 || info.startsWith("id:")) { // DeliverReport
        // (not
        // processed)!
        Gateway.util.log(this.getClass().getName(), "It can be DeliverReport (not processed)!");
        return; // not processed
      }

      // Normal message (request):
      // Neu mobile o che do tieng viet
      // --> Loai bo space (ky tu 00) giua cac ky tu
      this.info = StringTool.removeChar(this.info, '\00');

      String newserviceid = this.serviceId;

      newserviceid = newserviceid.substring(newserviceid.length() - 4);

      // DANND add
      DateFormat dateFormat = new SimpleDateFormat("MMddHHmmssSSS");
      java.util.Date date = new java.util.Date();
      String datetime = dateFormat.format(date);
      this.RequestID = Preference.prefix_requestid + datetime + threadId;

      dbTools.add2SMSReceiveQueueR(
          this.userId,
          this.serviceId,
          this.operator,
          this.commandCode,
          this.info,
          this.RequestID,
          this.Dport);
    }
  }
예제 #7
0
 /**
  * Writes the given short in XML format. <br>
  * <b>Note: Java specific type</b>
  *
  * @param s to write
  */
 public void writeShort(short s) {
   this.writeValue(ShortStrategy.NAME, Short.toString(s));
 }
예제 #8
0
 public void write_ushort(short value, java.lang.String tag) {
   Short obj = new Short(value);
   write_open_tag(tag);
   write_pcdata(obj.toString());
   write_close_tag(tag);
 }