/// <exception cref="System.IO.IOException"/>
 public QJournalProtocolProtos.PrepareRecoveryResponseProto Call()
 {
     if (!this._enclosing.HasHttpServerEndPoint())
     {
         // force an RPC call so we know what the HTTP port should be if it
         // haven't done so.
         QJournalProtocolProtos.GetJournalStateResponseProto ret = this._enclosing.GetProxy
                                                                       ().GetJournalState(this._enclosing.journalId);
         this._enclosing.ConstructHttpServerURI(ret);
     }
     return(this._enclosing.GetProxy().PrepareRecovery(this._enclosing.CreateReqInfo()
                                                       , segmentTxId));
 }
 private void ConstructHttpServerURI(QJournalProtocolProtos.GetJournalStateResponseProto
                                     ret)
 {
     if (ret.HasFromURL())
     {
         URI uri = URI.Create(ret.GetFromURL());
         httpServerURL = GetHttpServerURI(uri.GetScheme(), uri.GetPort());
     }
     else
     {
         httpServerURL = GetHttpServerURI("http", ret.GetHttpPort());
     }
 }