@@ -74,20 +74,20 @@ BlockingQueue<Result> getResponses() {
7474
7575 /**
7676 * Sends a request and returns the response. Caller must wait until this method executes prior to
77- * calling it again. If this method throws {@code ConnectionIsClosedException }, then it should not
77+ * calling it again. If this method throws {@code ConnectionClosedException }, then it should not
7878 * be called again, and both {@code reader} and {@code writer} are closed.
7979 *
8080 * @param req the {@code SessionReq} message to be sent to the S2A server.
8181 * @return the {@code SessionResp} message received from the S2A server.
82- * @throws ConnectionIsClosedException if {@code reader} or {@code writer} calls their {@code
82+ * @throws ConnectionClosedException if {@code reader} or {@code writer} calls their {@code
8383 * onCompleted} method.
8484 * @throws IOException if an unexpected response is received, or if the {@code reader} or {@code
8585 * writer} calls their {@code onError} method.
8686 */
8787 public SessionResp send (SessionReq req ) throws IOException , InterruptedException {
8888 if (doneWriting && doneReading ) {
8989 logger .log (Level .INFO , "Stream to the S2A is closed." );
90- throw new ConnectionIsClosedException ("Stream to the S2A is closed." );
90+ throw new ConnectionClosedException ("Stream to the S2A is closed." );
9191 }
9292 createWriterIfNull ();
9393 if (!responses .isEmpty ()) {
@@ -121,10 +121,10 @@ public SessionResp send(SessionReq req) throws IOException, InterruptedException
121121 }
122122 try {
123123 return responses .take ().getResultOrThrow ();
124- } catch (ConnectionIsClosedException e ) {
125- // A ConnectionIsClosedException is thrown by getResultOrThrow when reader calls its
124+ } catch (ConnectionClosedException e ) {
125+ // A ConnectionClosedException is thrown by getResultOrThrow when reader calls its
126126 // onCompleted method. The close method is called to also close the writer, and then the
127- // ConnectionIsClosedException is re-thrown in order to indicate to the caller that send
127+ // ConnectionClosedException is re-thrown in order to indicate to the caller that send
128128 // should not be called again.
129129 close ();
130130 throw e ;
@@ -177,7 +177,7 @@ public void onError(Throwable t) {
177177 }
178178
179179 /**
180- * Sets {@code doneReading} to true, and places a {@code ConnectionIsClosedException } in the
180+ * Sets {@code doneReading} to true, and places a {@code ConnectionClosedException } in the
181181 * {@code responses} queue.
182182 */
183183 @ Override
@@ -186,7 +186,7 @@ public void onCompleted() {
186186 doneReading = true ;
187187 responses .offer (
188188 Result .createWithThrowable (
189- new ConnectionIsClosedException ("Reading from the S2A is complete." )));
189+ new ConnectionClosedException ("Reading from the S2A is complete." )));
190190 }
191191 }
192192
@@ -211,8 +211,8 @@ private Result(Optional<SessionResp> response, Optional<Throwable> throwable) {
211211 /** Throws {@code throwable} if present, and returns {@code response} otherwise. */
212212 SessionResp getResultOrThrow () throws IOException {
213213 if (throwable .isPresent ()) {
214- if (throwable .get () instanceof ConnectionIsClosedException ) {
215- ConnectionIsClosedException exception = (ConnectionIsClosedException ) throwable .get ();
214+ if (throwable .get () instanceof ConnectionClosedException ) {
215+ ConnectionClosedException exception = (ConnectionClosedException ) throwable .get ();
216216 throw exception ;
217217 } else {
218218 throw new IOException (throwable .get ());
0 commit comments