Class JebNet

java.lang.Object
com.pnfsoftware.jeb.client.JebNet

public class JebNet extends Object
Network utility routines for specific JEB client operations.
  • Constructor Details

    • JebNet

      public JebNet()
  • Method Details

    • post

      public static String post(INet net, String url, String data)
      Internal routine to POST a x-www-form-urlencoded data attribute to the JPS or the floating license controller.
      Parameters:
      net - a network object
      url - address url
      data - data to post; will be the value of a "data=value" pair posted to the server
      Returns:
      the server response
    • post

      public static String post(INet net, String url, String data, long[] serverTimestampArray)
      Internal routine to POST a x-www-form-urlencoded data attribute to the JPS or the floating license controller.
      Parameters:
      net - a network object
      url - address url
      data - data to post; will be the value of a "data=value" pair posted to the server
      serverTimestampArray - optional, filled with the server timestamp provided in the HTTP response (epoch in ms)
      Returns:
      the server response
    • getSupposedlyGoodEpoch

      public static long getSupposedlyGoodEpoch(INet net)
      Retrieve the timestamp provided by a well-known http server.
      Parameters:
      net -
      Returns:
      server epoch in ms; 0 on error (that is, Jan 1 1970)
    • uploadFile

      public static String uploadFile(INet net, File f, boolean protectFile) throws IOException
      Upload a sample file related to a bug report to the JEB portal for.
      Parameters:
      net -
      f -
      protectFile -
      Returns:
      server response
      Throws:
      IOException
    • uploadFile

      public static String uploadFile(INet net, File f, boolean protectFile, String url) throws IOException
      Upload a sample file related to a bug report to the JEB portal for.
      Parameters:
      net -
      f -
      protectFile -
      url - optional; if null, the standard JEB.IO upload-sample end-point will be used
      Returns:
      server response
      Throws:
      IOException