You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
<dd><code>handler</code> - the error handler, or <code>null</code> to use only the default logging
289
289
behavior</dd>
290
+
<dt>Throws:</dt>
291
+
<dd><code><ahref="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/IllegalStateException.html" title="class or interface in java.lang" class="external-link">IllegalStateException</a></code> - if this session has been terminated</dd>
290
292
<dt>Since:</dt>
291
293
<dd>1.0.8</dd>
292
294
<dt>See Also:</dt>
@@ -332,6 +334,8 @@ <h3>setEventErrorPolicy</h3>
332
334
<dt>Parameters:</dt>
333
335
<dd><code>policy</code> - the error policy (default is
<dd><code><ahref="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/IllegalStateException.html" title="class or interface in java.lang" class="external-link">IllegalStateException</a></code> - if this session has been terminated</dd>
335
339
<dt>Since:</dt>
336
340
<dd>1.0.8</dd>
337
341
<dt>See Also:</dt>
@@ -357,6 +361,8 @@ <h3>send</h3>
357
361
<dd><code>prompt</code> - the message text to send</dd>
358
362
<dt>Returns:</dt>
359
363
<dd>a future that resolves with the message ID assigned by the server</dd>
364
+
<dt>Throws:</dt>
365
+
<dd><code><ahref="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/IllegalStateException.html" title="class or interface in java.lang" class="external-link">IllegalStateException</a></code> - if this session has been terminated</dd>
360
366
<dt>See Also:</dt>
361
367
<dd>
362
368
<ulclass="see-list">
@@ -380,6 +386,8 @@ <h3>sendAndWait</h3>
380
386
<dt>Returns:</dt>
381
387
<dd>a future that resolves with the final assistant message event, or
382
388
<code>null</code> if no assistant message was received</dd>
389
+
<dt>Throws:</dt>
390
+
<dd><code><ahref="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/IllegalStateException.html" title="class or interface in java.lang" class="external-link">IllegalStateException</a></code> - if this session has been terminated</dd>
383
391
<dt>See Also:</dt>
384
392
<dd>
385
393
<ulclass="see-list">
@@ -402,6 +410,8 @@ <h3>send</h3>
402
410
<dd><code>options</code> - the message options containing the prompt and attachments</dd>
403
411
<dt>Returns:</dt>
404
412
<dd>a future that resolves with the message ID assigned by the server</dd>
413
+
<dt>Throws:</dt>
414
+
<dd><code><ahref="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/IllegalStateException.html" title="class or interface in java.lang" class="external-link">IllegalStateException</a></code> - if this session has been terminated</dd>
405
415
<dt>See Also:</dt>
406
416
<dd>
407
417
<ulclass="see-list">
@@ -431,6 +441,8 @@ <h3>sendAndWait</h3>
431
441
<code>null</code> if no assistant message was received. The future
432
442
completes exceptionally with a TimeoutException if the timeout
433
443
expires.</dd>
444
+
<dt>Throws:</dt>
445
+
<dd><code><ahref="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/IllegalStateException.html" title="class or interface in java.lang" class="external-link">IllegalStateException</a></code> - if this session has been terminated</dd>
434
446
<dt>See Also:</dt>
435
447
<dd>
436
448
<ulclass="see-list">
@@ -453,6 +465,8 @@ <h3>sendAndWait</h3>
453
465
<dt>Returns:</dt>
454
466
<dd>a future that resolves with the final assistant message event, or
455
467
<code>null</code> if no assistant message was received</dd>
468
+
<dt>Throws:</dt>
469
+
<dd><code><ahref="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/IllegalStateException.html" title="class or interface in java.lang" class="external-link">IllegalStateException</a></code> - if this session has been terminated</dd>
456
470
<dt>See Also:</dt>
457
471
<dd>
458
472
<ulclass="see-list-long">
@@ -492,6 +506,8 @@ <h3>on</h3>
492
506
<dd><code>handler</code> - a callback to be invoked when a session event occurs</dd>
493
507
<dt>Returns:</dt>
494
508
<dd>a Closeable that, when closed, unsubscribes the handler</dd>
509
+
<dt>Throws:</dt>
510
+
<dd><code><ahref="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/IllegalStateException.html" title="class or interface in java.lang" class="external-link">IllegalStateException</a></code> - if this session has been terminated</dd>
495
511
<dt>See Also:</dt>
496
512
<dd>
497
513
<ulclass="see-list-long">
@@ -548,6 +564,8 @@ <h3>on</h3>
548
564
<dd><code>handler</code> - a callback invoked when events of this type occur</dd>
549
565
<dt>Returns:</dt>
550
566
<dd>a Closeable that unsubscribes the handler when closed</dd>
567
+
<dt>Throws:</dt>
568
+
<dd><code><ahref="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/IllegalStateException.html" title="class or interface in java.lang" class="external-link">IllegalStateException</a></code> - if this session has been terminated</dd>
551
569
<dt>See Also:</dt>
552
570
<dd>
553
571
<ulclass="see-list">
@@ -569,6 +587,8 @@ <h3>getMessages</h3>
569
587
<dlclass="notes">
570
588
<dt>Returns:</dt>
571
589
<dd>a future that resolves with a list of all session events</dd>
590
+
<dt>Throws:</dt>
591
+
<dd><code><ahref="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/IllegalStateException.html" title="class or interface in java.lang" class="external-link">IllegalStateException</a></code> - if this session has been terminated</dd>
572
592
<dt>See Also:</dt>
573
593
<dd>
574
594
<ulclass="see-list">
@@ -589,6 +609,8 @@ <h3>abort</h3>
589
609
<dlclass="notes">
590
610
<dt>Returns:</dt>
591
611
<dd>a future that completes when the abort is acknowledged</dd>
612
+
<dt>Throws:</dt>
613
+
<dd><code><ahref="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/IllegalStateException.html" title="class or interface in java.lang" class="external-link">IllegalStateException</a></code> - if this session has been terminated</dd>
592
614
</dl>
593
615
</section>
594
616
</li>
@@ -600,7 +622,7 @@ <h3>close</h3>
600
622
<p>
601
623
This destroys the session on the server, clears all event handlers, and
602
624
releases tool and permission handlers. After calling this method, the session
603
-
cannot be used again.</div>
625
+
cannot be used again. Subsequent calls to this method have no effect.</div>
604
626
<dlclass="notes">
605
627
<dt>Specified by:</dt>
606
628
<dd><code><ahref="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/AutoCloseable.html#close()" title="class or interface in java.lang" class="external-link">close</a></code> in interface <code><ahref="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/AutoCloseable.html" title="class or interface in java.lang" class="external-link">AutoCloseable</a></code></dd>
0 commit comments