/usr/share/doc/libjenkins-trilead-ssh2-java/api/com/trilead/ssh2/Session.html is in libjenkins-trilead-ssh2-java-doc 217-jenkins-8-1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 | <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!-- NewPage -->
<html>
<head>
<!-- Generated by javadoc -->
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Session (Ganymed SSH2 for Java build217-jenkins-8 API)</title>
<link rel="stylesheet" type="text/css" href="../../../stylesheet.css" title="Style">
<script type="text/javascript" src="../../../script.js"></script>
</head>
<body>
<script type="text/javascript"><!--
try {
if (location.href.indexOf('is-external=true') == -1) {
parent.document.title="Session (Ganymed SSH2 for Java build217-jenkins-8 API)";
}
}
catch(err) {
}
//-->
var methods = {"i0":10,"i1":10,"i2":10,"i3":10,"i4":10,"i5":10,"i6":10,"i7":10,"i8":10,"i9":10,"i10":10,"i11":10,"i12":10,"i13":10,"i14":10,"i15":10,"i16":10,"i17":10,"i18":10,"i19":10,"i20":10,"i21":42};
var tabs = {65535:["t0","All Methods"],2:["t2","Instance Methods"],8:["t4","Concrete Methods"],32:["t6","Deprecated Methods"]};
var altColor = "altColor";
var rowColor = "rowColor";
var tableTab = "tableTab";
var activeTableTab = "activeTableTab";
</script>
<noscript>
<div>JavaScript is disabled on your browser.</div>
</noscript>
<!-- ========= START OF TOP NAVBAR ======= -->
<div class="topNav"><a name="navbar.top">
<!-- -->
</a>
<div class="skipNav"><a href="#skip.navbar.top" title="Skip navigation links">Skip navigation links</a></div>
<a name="navbar.top.firstrow">
<!-- -->
</a>
<ul class="navList" title="Navigation">
<li><a href="../../../overview-summary.html">Overview</a></li>
<li><a href="package-summary.html">Package</a></li>
<li class="navBarCell1Rev">Class</li>
<li><a href="class-use/Session.html">Use</a></li>
<li><a href="package-tree.html">Tree</a></li>
<li><a href="../../../deprecated-list.html">Deprecated</a></li>
<li><a href="../../../index-all.html">Index</a></li>
<li><a href="../../../help-doc.html">Help</a></li>
</ul>
</div>
<div class="subNav">
<ul class="navList">
<li><a href="../../../com/trilead/ssh2/ServerHostKeyVerifier.html" title="interface in com.trilead.ssh2"><span class="typeNameLink">Prev Class</span></a></li>
<li><a href="../../../com/trilead/ssh2/SFTPException.html" title="class in com.trilead.ssh2"><span class="typeNameLink">Next Class</span></a></li>
</ul>
<ul class="navList">
<li><a href="../../../index.html?com/trilead/ssh2/Session.html" target="_top">Frames</a></li>
<li><a href="Session.html" target="_top">No Frames</a></li>
</ul>
<ul class="navList" id="allclasses_navbar_top">
<li><a href="../../../allclasses-noframe.html">All Classes</a></li>
</ul>
<div>
<script type="text/javascript"><!--
allClassesLink = document.getElementById("allclasses_navbar_top");
if(window==top) {
allClassesLink.style.display = "block";
}
else {
allClassesLink.style.display = "none";
}
//-->
</script>
</div>
<div>
<ul class="subNavList">
<li>Summary: </li>
<li>Nested | </li>
<li>Field | </li>
<li>Constr | </li>
<li><a href="#method.summary">Method</a></li>
</ul>
<ul class="subNavList">
<li>Detail: </li>
<li>Field | </li>
<li>Constr | </li>
<li><a href="#method.detail">Method</a></li>
</ul>
</div>
<a name="skip.navbar.top">
<!-- -->
</a></div>
<!-- ========= END OF TOP NAVBAR ========= -->
<!-- ======== START OF CLASS DATA ======== -->
<div class="header">
<div class="subTitle">com.trilead.ssh2</div>
<h2 title="Class Session" class="title">Class Session</h2>
</div>
<div class="contentContainer">
<ul class="inheritance">
<li><a href="http://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">java.lang.Object</a></li>
<li>
<ul class="inheritance">
<li>com.trilead.ssh2.Session</li>
</ul>
</li>
</ul>
<div class="description">
<ul class="blockList">
<li class="blockList">
<hr>
<br>
<pre>public class <span class="typeNameLabel">Session</span>
extends <a href="http://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a></pre>
<div class="block">A <code>Session</code> is a remote execution of a program. "Program" means
in this context either a shell, an application or a system command. The
program may or may not have a tty. Only one single program can be started on
a session. However, multiple sessions can be active simultaneously.</div>
<dl>
<dt><span class="simpleTagLabel">Version:</span></dt>
<dd>$Id: Session.java,v 1.2 2008/03/03 07:01:36 cplattne Exp $</dd>
<dt><span class="simpleTagLabel">Author:</span></dt>
<dd>Christian Plattner, plattner@trilead.com</dd>
</dl>
</li>
</ul>
</div>
<div class="summary">
<ul class="blockList">
<li class="blockList">
<!-- ========== METHOD SUMMARY =========== -->
<ul class="blockList">
<li class="blockList"><a name="method.summary">
<!-- -->
</a>
<h3>Method Summary</h3>
<table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Method Summary table, listing methods, and an explanation">
<caption><span id="t0" class="activeTableTab"><span>All Methods</span><span class="tabEnd"> </span></span><span id="t2" class="tableTab"><span><a href="javascript:show(2);">Instance Methods</a></span><span class="tabEnd"> </span></span><span id="t4" class="tableTab"><span><a href="javascript:show(8);">Concrete Methods</a></span><span class="tabEnd"> </span></span><span id="t6" class="tableTab"><span><a href="javascript:show(32);">Deprecated Methods</a></span><span class="tabEnd"> </span></span></caption>
<tr>
<th class="colFirst" scope="col">Modifier and Type</th>
<th class="colLast" scope="col">Method and Description</th>
</tr>
<tr id="i0" class="altColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../com/trilead/ssh2/Session.html#close--">close</a></span>()</code>
<div class="block">Close this session.</div>
</td>
</tr>
<tr id="i1" class="rowColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../com/trilead/ssh2/Session.html#execCommand-java.lang.String-">execCommand</a></span>(<a href="http://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> cmd)</code>
<div class="block">Execute a command on the remote machine.</div>
</td>
</tr>
<tr id="i2" class="altColor">
<td class="colFirst"><code><a href="http://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../com/trilead/ssh2/Session.html#getExitSignal--">getExitSignal</a></span>()</code>
<div class="block">Get the name of the signal by which the process on the remote side was
stopped - if available and applicable.</div>
</td>
</tr>
<tr id="i3" class="rowColor">
<td class="colFirst"><code><a href="http://docs.oracle.com/javase/8/docs/api/java/lang/Integer.html?is-external=true" title="class or interface in java.lang">Integer</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../com/trilead/ssh2/Session.html#getExitStatus--">getExitStatus</a></span>()</code>
<div class="block">Get the exit code/status from the remote command - if available.</div>
</td>
</tr>
<tr id="i4" class="altColor">
<td class="colFirst"><code><a href="http://docs.oracle.com/javase/8/docs/api/java/io/InputStream.html?is-external=true" title="class or interface in java.io">InputStream</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../com/trilead/ssh2/Session.html#getStderr--">getStderr</a></span>()</code> </td>
</tr>
<tr id="i5" class="rowColor">
<td class="colFirst"><code><a href="http://docs.oracle.com/javase/8/docs/api/java/io/OutputStream.html?is-external=true" title="class or interface in java.io">OutputStream</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../com/trilead/ssh2/Session.html#getStdin--">getStdin</a></span>()</code> </td>
</tr>
<tr id="i6" class="altColor">
<td class="colFirst"><code><a href="http://docs.oracle.com/javase/8/docs/api/java/io/InputStream.html?is-external=true" title="class or interface in java.io">InputStream</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../com/trilead/ssh2/Session.html#getStdout--">getStdout</a></span>()</code> </td>
</tr>
<tr id="i7" class="rowColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../com/trilead/ssh2/Session.html#ping--">ping</a></span>()</code>
<div class="block">This method can be used to perform end-to-end session (i.e., SSH channel)
testing.</div>
</td>
</tr>
<tr id="i8" class="altColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../com/trilead/ssh2/Session.html#pipeStderr-java.io.OutputStream-">pipeStderr</a></span>(<a href="http://docs.oracle.com/javase/8/docs/api/java/io/OutputStream.html?is-external=true" title="class or interface in java.io">OutputStream</a> os)</code>
<div class="block">The same as <a href="../../../com/trilead/ssh2/Session.html#pipeStdout-java.io.OutputStream-"><code>pipeStdout(OutputStream)</code></a> except for stderr, not for stdout.</div>
</td>
</tr>
<tr id="i9" class="rowColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../com/trilead/ssh2/Session.html#pipeStdout-java.io.OutputStream-">pipeStdout</a></span>(<a href="http://docs.oracle.com/javase/8/docs/api/java/io/OutputStream.html?is-external=true" title="class or interface in java.io">OutputStream</a> os)</code>
<div class="block">Write stdout received from the other side to the specified <a href="http://docs.oracle.com/javase/8/docs/api/java/io/OutputStream.html?is-external=true" title="class or interface in java.io"><code>OutputStream</code></a>.</div>
</td>
</tr>
<tr id="i10" class="altColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../com/trilead/ssh2/Session.html#requestDumbPTY--">requestDumbPTY</a></span>()</code>
<div class="block">Basically just a wrapper for lazy people - identical to calling
<code>requestPTY("dumb", 0, 0, 0, 0, null)</code>.</div>
</td>
</tr>
<tr id="i11" class="rowColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../com/trilead/ssh2/Session.html#requestPTY-java.lang.String-">requestPTY</a></span>(<a href="http://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> term)</code>
<div class="block">Basically just another wrapper for lazy people - identical to calling
<code>requestPTY(term, 0, 0, 0, 0, null)</code>.</div>
</td>
</tr>
<tr id="i12" class="altColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../com/trilead/ssh2/Session.html#requestPTY-java.lang.String-int-int-int-int-byte:A-">requestPTY</a></span>(<a href="http://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> term,
int term_width_characters,
int term_height_characters,
int term_width_pixels,
int term_height_pixels,
byte[] terminal_modes)</code>
<div class="block">Allocate a pseudo-terminal for this session.</div>
</td>
</tr>
<tr id="i13" class="rowColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../com/trilead/ssh2/Session.html#requestWindowChange-int-int-int-int-">requestWindowChange</a></span>(int term_width_characters,
int term_height_characters,
int term_width_pixels,
int term_height_pixels)</code>
<div class="block">Tells the server that the size of the terminal has changed.</div>
</td>
</tr>
<tr id="i14" class="altColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../com/trilead/ssh2/Session.html#requestX11Forwarding-java.lang.String-int-byte:A-boolean-">requestX11Forwarding</a></span>(<a href="http://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> hostname,
int port,
byte[] cookie,
boolean singleConnection)</code>
<div class="block">Request X11 forwarding for the current session.</div>
</td>
</tr>
<tr id="i15" class="rowColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../com/trilead/ssh2/Session.html#setWindowSize-int-">setWindowSize</a></span>(int newSize)</code>
<div class="block">Sets the receive window size.</div>
</td>
</tr>
<tr id="i16" class="altColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../com/trilead/ssh2/Session.html#signal-int-">signal</a></span>(int code)</code>
<div class="block">Sends a signal to the remote process.</div>
</td>
</tr>
<tr id="i17" class="rowColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../com/trilead/ssh2/Session.html#signal-java.lang.String-">signal</a></span>(<a href="http://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> name)</code>
<div class="block">Sends a signal to the remote process.</div>
</td>
</tr>
<tr id="i18" class="altColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../com/trilead/ssh2/Session.html#startShell--">startShell</a></span>()</code>
<div class="block">Start a shell on the remote machine.</div>
</td>
</tr>
<tr id="i19" class="rowColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../com/trilead/ssh2/Session.html#startSubSystem-java.lang.String-">startSubSystem</a></span>(<a href="http://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> name)</code>
<div class="block">Start a subsystem on the remote machine.</div>
</td>
</tr>
<tr id="i20" class="altColor">
<td class="colFirst"><code>int</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../com/trilead/ssh2/Session.html#waitForCondition-int-long-">waitForCondition</a></span>(int condition_set,
long timeout)</code>
<div class="block">This method blocks until certain conditions hold true on the underlying SSH-2 channel.</div>
</td>
</tr>
<tr id="i21" class="rowColor">
<td class="colFirst"><code>int</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../com/trilead/ssh2/Session.html#waitUntilDataAvailable-long-">waitUntilDataAvailable</a></span>(long timeout)</code>
<div class="block"><span class="deprecatedLabel">Deprecated.</span>
<div class="block"><span class="deprecationComment">This method has been replaced with a much more powerful wait-for-condition
interface and therefore acts only as a wrapper.</span></div>
</div>
</td>
</tr>
</table>
<ul class="blockList">
<li class="blockList"><a name="methods.inherited.from.class.java.lang.Object">
<!-- -->
</a>
<h3>Methods inherited from class java.lang.<a href="http://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a></h3>
<code><a href="http://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#clone--" title="class or interface in java.lang">clone</a>, <a href="http://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#equals-java.lang.Object-" title="class or interface in java.lang">equals</a>, <a href="http://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#finalize--" title="class or interface in java.lang">finalize</a>, <a href="http://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#getClass--" title="class or interface in java.lang">getClass</a>, <a href="http://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#hashCode--" title="class or interface in java.lang">hashCode</a>, <a href="http://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#notify--" title="class or interface in java.lang">notify</a>, <a href="http://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#notifyAll--" title="class or interface in java.lang">notifyAll</a>, <a href="http://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#toString--" title="class or interface in java.lang">toString</a>, <a href="http://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#wait--" title="class or interface in java.lang">wait</a>, <a href="http://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#wait-long-" title="class or interface in java.lang">wait</a>, <a href="http://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#wait-long-int-" title="class or interface in java.lang">wait</a></code></li>
</ul>
</li>
</ul>
</li>
</ul>
</div>
<div class="details">
<ul class="blockList">
<li class="blockList">
<!-- ============ METHOD DETAIL ========== -->
<ul class="blockList">
<li class="blockList"><a name="method.detail">
<!-- -->
</a>
<h3>Method Detail</h3>
<a name="requestDumbPTY--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>requestDumbPTY</h4>
<pre>public void requestDumbPTY()
throws <a href="http://docs.oracle.com/javase/8/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></pre>
<div class="block">Basically just a wrapper for lazy people - identical to calling
<code>requestPTY("dumb", 0, 0, 0, 0, null)</code>.</div>
<dl>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="http://docs.oracle.com/javase/8/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></code></dd>
</dl>
</li>
</ul>
<a name="requestPTY-java.lang.String-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>requestPTY</h4>
<pre>public void requestPTY(<a href="http://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> term)
throws <a href="http://docs.oracle.com/javase/8/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></pre>
<div class="block">Basically just another wrapper for lazy people - identical to calling
<code>requestPTY(term, 0, 0, 0, 0, null)</code>.</div>
<dl>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="http://docs.oracle.com/javase/8/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></code></dd>
</dl>
</li>
</ul>
<a name="requestPTY-java.lang.String-int-int-int-int-byte:A-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>requestPTY</h4>
<pre>public void requestPTY(<a href="http://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> term,
int term_width_characters,
int term_height_characters,
int term_width_pixels,
int term_height_pixels,
byte[] terminal_modes)
throws <a href="http://docs.oracle.com/javase/8/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></pre>
<div class="block">Allocate a pseudo-terminal for this session.
<p>
This method may only be called before a program or shell is started in
this session.
<p>
Different aspects can be specified:
<p>
<ul>
<li>The TERM environment variable value (e.g., vt100)</li>
<li>The terminal's dimensions.</li>
<li>The encoded terminal modes.</li>
</ul>
Zero dimension parameters are ignored. The character/row dimensions
override the pixel dimensions (when nonzero). Pixel dimensions refer to
the drawable area of the window. The dimension parameters are only
informational. The encoding of terminal modes (parameter
<code>terminal_modes</code>) is described in RFC4254.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>term</code> - The TERM environment variable value (e.g., vt100)</dd>
<dd><code>term_width_characters</code> - terminal width, characters (e.g., 80)</dd>
<dd><code>term_height_characters</code> - terminal height, rows (e.g., 24)</dd>
<dd><code>term_width_pixels</code> - terminal width, pixels (e.g., 640)</dd>
<dd><code>term_height_pixels</code> - terminal height, pixels (e.g., 480)</dd>
<dd><code>terminal_modes</code> - encoded terminal modes (may be <code>null</code>)</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="http://docs.oracle.com/javase/8/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></code></dd>
</dl>
</li>
</ul>
<a name="requestWindowChange-int-int-int-int-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>requestWindowChange</h4>
<pre>public void requestWindowChange(int term_width_characters,
int term_height_characters,
int term_width_pixels,
int term_height_pixels)
throws <a href="http://docs.oracle.com/javase/8/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></pre>
<div class="block">Tells the server that the size of the terminal has changed.
See <a href="../../../com/trilead/ssh2/Session.html#requestPTY-java.lang.String-int-int-int-int-byte:A-"><code>requestPTY(String, int, int, int, int, byte[])</code></a> for more details about how parameters are interpreted.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>term_width_characters</code> - terminal width, characters (e.g., 80)</dd>
<dd><code>term_height_characters</code> - terminal height, rows (e.g., 24)</dd>
<dd><code>term_width_pixels</code> - terminal width, pixels (e.g., 640)</dd>
<dd><code>term_height_pixels</code> - terminal height, pixels (e.g., 480)</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="http://docs.oracle.com/javase/8/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></code></dd>
</dl>
</li>
</ul>
<a name="signal-java.lang.String-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>signal</h4>
<pre>public void signal(<a href="http://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> name)
throws <a href="http://docs.oracle.com/javase/8/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></pre>
<div class="block">Sends a signal to the remote process.</div>
<dl>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="http://docs.oracle.com/javase/8/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></code></dd>
</dl>
</li>
</ul>
<a name="signal-int-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>signal</h4>
<pre>public void signal(int code)
throws <a href="http://docs.oracle.com/javase/8/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></pre>
<div class="block">Sends a signal to the remote process.
For better portability, specify signal by name, not by its number.</div>
<dl>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="http://docs.oracle.com/javase/8/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></code></dd>
</dl>
</li>
</ul>
<a name="requestX11Forwarding-java.lang.String-int-byte:A-boolean-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>requestX11Forwarding</h4>
<pre>public void requestX11Forwarding(<a href="http://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> hostname,
int port,
byte[] cookie,
boolean singleConnection)
throws <a href="http://docs.oracle.com/javase/8/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></pre>
<div class="block">Request X11 forwarding for the current session.
<p>
You have to supply the name and port of your X-server.
<p>
This method may only be called before a program or shell is started in
this session.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>hostname</code> - the hostname of the real (target) X11 server (e.g., 127.0.0.1)</dd>
<dd><code>port</code> - the port of the real (target) X11 server (e.g., 6010)</dd>
<dd><code>cookie</code> - if non-null, then present this cookie to the real X11 server</dd>
<dd><code>singleConnection</code> - if true, then the server is instructed to only forward one single
connection, no more connections shall be forwarded after first, or after the session
channel has been closed</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="http://docs.oracle.com/javase/8/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></code></dd>
</dl>
</li>
</ul>
<a name="execCommand-java.lang.String-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>execCommand</h4>
<pre>public void execCommand(<a href="http://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> cmd)
throws <a href="http://docs.oracle.com/javase/8/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></pre>
<div class="block">Execute a command on the remote machine.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>cmd</code> - The command to execute on the remote host.</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="http://docs.oracle.com/javase/8/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></code></dd>
</dl>
</li>
</ul>
<a name="startShell--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>startShell</h4>
<pre>public void startShell()
throws <a href="http://docs.oracle.com/javase/8/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></pre>
<div class="block">Start a shell on the remote machine.</div>
<dl>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="http://docs.oracle.com/javase/8/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></code></dd>
</dl>
</li>
</ul>
<a name="startSubSystem-java.lang.String-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>startSubSystem</h4>
<pre>public void startSubSystem(<a href="http://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> name)
throws <a href="http://docs.oracle.com/javase/8/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></pre>
<div class="block">Start a subsystem on the remote machine.
Unless you know what you are doing, you will never need this.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>name</code> - the name of the subsystem.</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="http://docs.oracle.com/javase/8/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></code></dd>
</dl>
</li>
</ul>
<a name="ping--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>ping</h4>
<pre>public void ping()
throws <a href="http://docs.oracle.com/javase/8/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></pre>
<div class="block">This method can be used to perform end-to-end session (i.e., SSH channel)
testing. It sends a 'ping' message to the server and waits for the 'pong'
from the server.
<p>
Implementation details: this method sends a SSH_MSG_CHANNEL_REQUEST request
('trilead-ping') to the server and waits for the SSH_MSG_CHANNEL_FAILURE reply
packet.</div>
<dl>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="http://docs.oracle.com/javase/8/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></code> - in case of any problem or when the session is closed</dd>
</dl>
</li>
</ul>
<a name="getStdout--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getStdout</h4>
<pre>public <a href="http://docs.oracle.com/javase/8/docs/api/java/io/InputStream.html?is-external=true" title="class or interface in java.io">InputStream</a> getStdout()</pre>
</li>
</ul>
<a name="getStderr--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getStderr</h4>
<pre>public <a href="http://docs.oracle.com/javase/8/docs/api/java/io/InputStream.html?is-external=true" title="class or interface in java.io">InputStream</a> getStderr()</pre>
</li>
</ul>
<a name="getStdin--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getStdin</h4>
<pre>public <a href="http://docs.oracle.com/javase/8/docs/api/java/io/OutputStream.html?is-external=true" title="class or interface in java.io">OutputStream</a> getStdin()</pre>
</li>
</ul>
<a name="pipeStdout-java.io.OutputStream-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>pipeStdout</h4>
<pre>public void pipeStdout(<a href="http://docs.oracle.com/javase/8/docs/api/java/io/OutputStream.html?is-external=true" title="class or interface in java.io">OutputStream</a> os)
throws <a href="http://docs.oracle.com/javase/8/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></pre>
<div class="block">Write stdout received from the other side to the specified <a href="http://docs.oracle.com/javase/8/docs/api/java/io/OutputStream.html?is-external=true" title="class or interface in java.io"><code>OutputStream</code></a>.
<p>
By default, when data arrives from the other side, trilead buffers them and lets
you read it at your convenience from <a href="../../../com/trilead/ssh2/Session.html#getStdout--"><code>getStdout()</code></a>. This is normally convenient,
but if all you are doing is to send the data to another <a href="http://docs.oracle.com/javase/8/docs/api/java/io/OutputStream.html?is-external=true" title="class or interface in java.io"><code>OutputStream</code></a> by
copying a stream, then you'll be end up wasting a thread just for this.
In such a situation, you can call this method and let the I/O handling thread of trilead
directly pass the received data to the output stream. This also eliminates the internal
buffer used for spooling.
<p>
When you do this, beware of a blocking write! If a write blocks, it'll affect
all the other channels and sessions that are sharing the same SSH connection,
as there's only one I/O thread. For example, this can happen if you are writing to
<a href="http://docs.oracle.com/javase/8/docs/api/java/net/Socket.html?is-external=true" title="class or interface in java.net"><code>Socket</code></a>.
<p>
If any data has already been received and spooled before calling this method,
the data will be sent to the given stream immediately.
<p>
To signal the end of the stream, when the other side notifies us of EOF or when
the channel closes, the output stream gets closed. If this is not desirable,
you must wrap the output stream and ignore the <a href="http://docs.oracle.com/javase/8/docs/api/java/io/OutputStream.html?is-external=true#close--" title="class or interface in java.io"><code>OutputStream.close()</code></a> call.</div>
<dl>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="http://docs.oracle.com/javase/8/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></code></dd>
</dl>
</li>
</ul>
<a name="pipeStderr-java.io.OutputStream-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>pipeStderr</h4>
<pre>public void pipeStderr(<a href="http://docs.oracle.com/javase/8/docs/api/java/io/OutputStream.html?is-external=true" title="class or interface in java.io">OutputStream</a> os)
throws <a href="http://docs.oracle.com/javase/8/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></pre>
<div class="block">The same as <a href="../../../com/trilead/ssh2/Session.html#pipeStdout-java.io.OutputStream-"><code>pipeStdout(OutputStream)</code></a> except for stderr, not for stdout.</div>
<dl>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="http://docs.oracle.com/javase/8/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></code></dd>
</dl>
</li>
</ul>
<a name="waitUntilDataAvailable-long-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>waitUntilDataAvailable</h4>
<pre>public int waitUntilDataAvailable(long timeout)
throws <a href="http://docs.oracle.com/javase/8/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a>,
<a href="http://docs.oracle.com/javase/8/docs/api/java/lang/InterruptedException.html?is-external=true" title="class or interface in java.lang">InterruptedException</a></pre>
<div class="block"><span class="deprecatedLabel">Deprecated.</span> <span class="deprecationComment">This method has been replaced with a much more powerful wait-for-condition
interface and therefore acts only as a wrapper.</span></div>
<div class="block">This method blocks until there is more data available on either the
stdout or stderr InputStream of this <code>Session</code>. Very useful
if you do not want to use two parallel threads for reading from the two
InputStreams. One can also specify a timeout. NOTE: do NOT call this
method if you use concurrent threads that operate on either of the two
InputStreams of this <code>Session</code> (otherwise this method may
block, even though more data is available).</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>timeout</code> - The (non-negative) timeout in <code>ms</code>. <code>0</code> means no
timeout, the call may block forever.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd><ul>
<li><code>0</code> if no more data will arrive.</li>
<li><code>1</code> if more data is available.</li>
<li><code>-1</code> if a timeout occurred.</li>
</ul></dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="http://docs.oracle.com/javase/8/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></code></dd>
<dd><code><a href="http://docs.oracle.com/javase/8/docs/api/java/lang/InterruptedException.html?is-external=true" title="class or interface in java.lang">InterruptedException</a></code></dd>
</dl>
</li>
</ul>
<a name="waitForCondition-int-long-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>waitForCondition</h4>
<pre>public int waitForCondition(int condition_set,
long timeout)
throws <a href="http://docs.oracle.com/javase/8/docs/api/java/lang/InterruptedException.html?is-external=true" title="class or interface in java.lang">InterruptedException</a></pre>
<div class="block">This method blocks until certain conditions hold true on the underlying SSH-2 channel.
<p>
This method returns as soon as one of the following happens:
<ul>
<li>at least of the specified conditions (see <a href="../../../com/trilead/ssh2/ChannelCondition.html" title="interface in com.trilead.ssh2"><code>ChannelCondition</code></a>) holds true</li>
<li>timeout > 0 and a timeout occured (TIMEOUT will be set in result conditions)</a>
<li>the underlying channel was closed (CLOSED will be set in result conditions)</a>
</ul>
<p>
In any case, the result value contains ALL current conditions, which may be more
than the specified condition set (i.e., never use the "==" operator to test for conditions
in the bitmask, see also comments in <a href="../../../com/trilead/ssh2/ChannelCondition.html" title="interface in com.trilead.ssh2"><code>ChannelCondition</code></a>).
<p>
Note: do NOT call this method if you want to wait for STDOUT_DATA or STDERR_DATA and
there are concurrent threads (e.g., StreamGobblers) that operate on either of the two
InputStreams of this <code>Session</code> (otherwise this method may
block, even though more data is available in the StreamGobblers).</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>condition_set</code> - a bitmask based on <a href="../../../com/trilead/ssh2/ChannelCondition.html" title="interface in com.trilead.ssh2"><code>ChannelCondition</code></a> values</dd>
<dd><code>timeout</code> - non-negative timeout in ms, <code>0</code> means no timeout</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>all bitmask specifying all current conditions that are true</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="http://docs.oracle.com/javase/8/docs/api/java/lang/InterruptedException.html?is-external=true" title="class or interface in java.lang">InterruptedException</a></code></dd>
</dl>
</li>
</ul>
<a name="getExitStatus--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getExitStatus</h4>
<pre>public <a href="http://docs.oracle.com/javase/8/docs/api/java/lang/Integer.html?is-external=true" title="class or interface in java.lang">Integer</a> getExitStatus()</pre>
<div class="block">Get the exit code/status from the remote command - if available. Be
careful - not all server implementations return this value. It is
generally a good idea to call this method only when all data from the
remote side has been consumed (see also the <code<WaitForCondition</code> method).</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>An <code>Integer</code> holding the exit code, or
<code>null</code> if no exit code is (yet) available.</dd>
</dl>
</li>
</ul>
<a name="getExitSignal--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getExitSignal</h4>
<pre>public <a href="http://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> getExitSignal()</pre>
<div class="block">Get the name of the signal by which the process on the remote side was
stopped - if available and applicable. Be careful - not all server
implementations return this value.</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>An <code>String</code> holding the name of the signal, or
<code>null</code> if the process exited normally or is still
running (or if the server forgot to send this information).</dd>
</dl>
</li>
</ul>
<a name="close--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>close</h4>
<pre>public void close()</pre>
<div class="block">Close this session. NEVER forget to call this method to free up resources -
even if you got an exception from one of the other methods (or when
getting an Exception on the Input- or OutputStreams). Sometimes these other
methods may throw an exception, saying that the underlying channel is
closed (this can happen, e.g., if the other server sent a close message.)
However, as long as you have not called the <code>close()</code>
method, you may be wasting (local) resources.</div>
</li>
</ul>
<a name="setWindowSize-int-">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>setWindowSize</h4>
<pre>public void setWindowSize(int newSize)</pre>
<div class="block">Sets the receive window size.
The receive window is a maximum number of bytes that the remote side can send to this channel without
waiting for us to consume them (AKA "in-flight bytes").
When your connection is over a large-latency/high-bandiwdth network, specifying a bigger value
allows the network to be efficiently utilized. OTOH, if you don't drain this channel quickly enough
all those bytes in flight can end up getting buffered.
This value can be adjusted at runtime.</div>
</li>
</ul>
</li>
</ul>
</li>
</ul>
</div>
</div>
<!-- ========= END OF CLASS DATA ========= -->
<!-- ======= START OF BOTTOM NAVBAR ====== -->
<div class="bottomNav"><a name="navbar.bottom">
<!-- -->
</a>
<div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div>
<a name="navbar.bottom.firstrow">
<!-- -->
</a>
<ul class="navList" title="Navigation">
<li><a href="../../../overview-summary.html">Overview</a></li>
<li><a href="package-summary.html">Package</a></li>
<li class="navBarCell1Rev">Class</li>
<li><a href="class-use/Session.html">Use</a></li>
<li><a href="package-tree.html">Tree</a></li>
<li><a href="../../../deprecated-list.html">Deprecated</a></li>
<li><a href="../../../index-all.html">Index</a></li>
<li><a href="../../../help-doc.html">Help</a></li>
</ul>
</div>
<div class="subNav">
<ul class="navList">
<li><a href="../../../com/trilead/ssh2/ServerHostKeyVerifier.html" title="interface in com.trilead.ssh2"><span class="typeNameLink">Prev Class</span></a></li>
<li><a href="../../../com/trilead/ssh2/SFTPException.html" title="class in com.trilead.ssh2"><span class="typeNameLink">Next Class</span></a></li>
</ul>
<ul class="navList">
<li><a href="../../../index.html?com/trilead/ssh2/Session.html" target="_top">Frames</a></li>
<li><a href="Session.html" target="_top">No Frames</a></li>
</ul>
<ul class="navList" id="allclasses_navbar_bottom">
<li><a href="../../../allclasses-noframe.html">All Classes</a></li>
</ul>
<div>
<script type="text/javascript"><!--
allClassesLink = document.getElementById("allclasses_navbar_bottom");
if(window==top) {
allClassesLink.style.display = "block";
}
else {
allClassesLink.style.display = "none";
}
//-->
</script>
</div>
<div>
<ul class="subNavList">
<li>Summary: </li>
<li>Nested | </li>
<li>Field | </li>
<li>Constr | </li>
<li><a href="#method.summary">Method</a></li>
</ul>
<ul class="subNavList">
<li>Detail: </li>
<li>Field | </li>
<li>Constr | </li>
<li><a href="#method.detail">Method</a></li>
</ul>
</div>
<a name="skip.navbar.bottom">
<!-- -->
</a></div>
<!-- ======== END OF BOTTOM NAVBAR ======= -->
<p class="legalCopy"><small>Copyright © 2017. All rights reserved.</small></p>
</body>
</html>
|