Example #1
0
  public static byte[] createContent(
      String addressVal,
      long lastStartTime,
      long lastStopTime,
      BindingType binding,
      TransportType transport,
      SLProperties props) {
    Element root = DomMother.newDocument(SL, "EndpointData");
    addEPR(root, addressVal, props);

    DomMother.addLeafElement(root, SL, "LastTimeStarted", Long.toString(lastStartTime));
    DomMother.addLeafElement(root, SL, "LastTimeStopped", Long.toString(lastStopTime));

    DomMother.addLeafElement(root, SL, "Binding", binding.value());
    DomMother.addLeafElement(root, SL, "Transport", transport.value());

    return serialize(root);
  }