/**
   * Opens a connection to the given Endpoint and writes DGC ack there.
   *
   * @param uid UID to be send
   */
  public void sendDGCAck(UID uid) {
    ClientConnection conn = null;

    try {
      conn = ClientConnectionManager.getConnection(ep);
      DataOutputStream dout = new DataOutputStream(out);
      dout.writeByte(RMIProtocolConstants.DGCACK_MSG);
      uid.write(dout);
      dout.flush();
      conn.releaseOutputStream();
      conn.done();
    } catch (IOException ioe) {
      if (conn != null) {
        conn.close();
      }
    }

    if (dgcLog.isLoggable(RMILog.VERBOSE)) {
      // rmi.log.93=Sent DGC ack to {0} for {1}
      dgcLog.log(RMILog.VERBOSE, Messages.getString("rmi.log.93", ep, uid)); // $NON-NLS-1$
    }
  }
Esempio n. 2
0
 void writeID() throws IOException {
   assert resultStream;
   ackID.write(this);
 }