コード例 #1
0
ファイル: GraphicModul.java プロジェクト: silps/mrserver
  @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();
  }
コード例 #2
0
  public static ConnectionEstablished unmarshallXMLConnectionEstablishedString(
      String aXMLConnectionEstablishedPackage) {

    return Helpers.unmarshallXMLString(
        aXMLConnectionEstablishedPackage, ConnectionEstablished.class);
  }
コード例 #3
0
  public static ConnectionAcknowlege unmarshallXMLConnectionAcknowlegeString(
      String aXMLConnectionAcknowlegePackage) {

    return Helpers.unmarshallXMLString(aXMLConnectionAcknowlegePackage, ConnectionAcknowlege.class);
  }