Esempio n. 1
0
  @SuppressWarnings("unchecked")
  public synchronized void processDatagrammPacket(DatagramPacket aRecievedDatagrammPacket) {

    Object vUnkownObject = null;

    if (mExpectedPacket != null) {

      vUnkownObject =
          Helpers.unmarshallXMLString(
              new String(
                  aRecievedDatagrammPacket.getData(), 0, aRecievedDatagrammPacket.getLength()),
              mExpectedPacket);
    }

    if (vUnkownObject != null) {

      if (vUnkownObject instanceof ConnectionEstablished
          && mExpectedPacket == ConnectionEstablished.class) {

        process((ConnectionEstablished) vUnkownObject);

      } else {

        mValidityCounter++;
      }

    } else {

      mValidityCounter++;
    }

    checkValidity();
  }
Esempio n. 2
0
  public static ConnectionEstablished unmarshallXMLConnectionEstablishedString(
      String aXMLConnectionEstablishedPackage) {

    return Helpers.unmarshallXMLString(
        aXMLConnectionEstablishedPackage, ConnectionEstablished.class);
  }
Esempio n. 3
0
  public String toXMLString() {

    return Helpers.marshallXMLString(this, ConnectionEstablished.class);
  }
Esempio n. 4
0
  public static ConnectionAcknowlege unmarshallXMLConnectionAcknowlegeString(
      String aXMLConnectionAcknowlegePackage) {

    return Helpers.unmarshallXMLString(aXMLConnectionAcknowlegePackage, ConnectionAcknowlege.class);
  }
Esempio n. 5
0
  public String toXMLString() {

    return Helpers.marshallXMLString(this, ConnectionAcknowlege.class);
  }