Ejemplo n.º 1
0
  /**
   * Initializes a connection to the BAC RDU server.
   *
   * @param hostname The FQDN or IP of the BAC RDU server
   * @param port The port on which to communicate to the server. The default is 49187.
   * @param userName User name used to connect to the RDU server
   * @param password Password used to connect to the RDU server
   */
  public void initializeConnectionToRDU(
      String hostname, int port, String userName, String password) {
    connection = null;

    try {
      connection = PACEConnectionFactory.getInstance(hostname, port, userName, password);
    } catch (PACEConnectionException e) {
      // Connection failed
      System.out.println(e.getMessage());
      System.exit(0);
    } catch (AuthenticationException e) {
      // Authentication failure
      System.out.println(e.getMessage());
      System.exit(0);
    }
  }
Ejemplo n.º 2
0
  /** Posts the batch to the RDU server. */
  public void postBatch() {
    status = null;

    try {
      status = batch.post();
    } catch (ProvisioningException e) {
      System.out.println(e.getMessage());
      System.exit(0);
    }
  }