com.sshtools.terminal
Interface TerminalProtocolTranport

All Superinterfaces:
ProfileTransport, VirtualSessionTransport

public interface TerminalProtocolTranport
extends VirtualSessionTransport

Implementations of this extension of VirtualSessionTransport are responsible for making connections, performing any protocol initialisation and handshakes when used with a character terminal like based system. The virtual terminal is provided with an InputStream to read data coming back from the host and an OutputStream that the emulation can write data back to the host.

Version:
$Revision: 1.1 $
Author:
$Author: richard $

Method Summary
 int getDefaultEOL()
          Return the default line edings type.
 java.io.InputStream getErrorInputStream()
          Return an InputStream from which error data can be read from the host.
 java.io.InputStream getInputStream()
          Return an InputStream from which data from the host can be read
 java.io.OutputStream getOutputStream()
          Return an OutputStream on to which the emulation can write data back to the host
 void setScreenSize(int w, int h)
          Send a request to set the screen size.
 
Methods inherited from interface com.sshtools.virtualsession.VirtualSessionTransport
getVirtualSession, init, isConnected, isConnectionPending
 
Methods inherited from interface com.sshtools.profile.ProfileTransport
cloneVirtualSession, connect, disconnect, getHostDescription, getProfile, getProtocolDescription, getProvider, getTransportDescription, isCloneVirtualSessionSupported
 

Method Detail

setScreenSize

public void setScreenSize(int w,
                          int h)
Send a request to set the screen size. Not all implementations may support this, in which case the request should be silently ignored.

Parameters:
w - new width
h - new height

getInputStream

public java.io.InputStream getInputStream()
Return an InputStream from which data from the host can be read

Returns:
input stream from the connected host

getOutputStream

public java.io.OutputStream getOutputStream()
Return an OutputStream on to which the emulation can write data back to the host

Returns:
output stream to the connected host

getErrorInputStream

public java.io.InputStream getErrorInputStream()
Return an InputStream from which error data can be read from the host. If the protocol does not support this, null will be returned.

Returns:
error input stream

getDefaultEOL

public int getDefaultEOL()

Return the default line edings type. The transport may know (or try to determine) whether to expect CR or CR+LF sequences when the user presses ENTER. If the transport cannot determine this it should just return EOL_DEFAULT. Possible values are :-

Returns:
default line endings type


Copyright © 2003-2004 3SP LTD. All Rights Reserved.