Esempio n. 1
0
  private void updateProxy() {
    String host = _hostname.getText().toString().trim();
    if (host.length() == 0) {
      _status.setText("No hostname");
      return;
    }

    String s =
        "hello:tcp -h "
            + host
            + " -p 10000:ssl -h "
            + host
            + " -p 10001:udp -h "
            + host
            + " -p 10000";
    com.zeroc.Ice.ObjectPrx prx = _communicator.stringToProxy(s);
    prx = _deliveryMode.apply(prx);
    int timeout = _timeoutSlider.getValue();
    if (timeout != 0) {
      prx = prx.ice_invocationTimeout(timeout);
    }
    _helloPrx = Demo.HelloPrx.uncheckedCast(prx);

    //
    // The batch requests associated to the proxy are lost when we
    // update the proxy.
    //
    _flush.setEnabled(false);

    _status.setText("Ready");
  }