com.sshtools.virtualsession
Interface VirtualSession

All Known Subinterfaces:
VirtualTerminal
All Known Implementing Classes:
AWTVirtualTerminal, SwingVirtualTerminal

public interface VirtualSession

A single virtual session provides some kind of display or 'screen' for a single connection to a host. and will usually be added to a VirtualSessionManager implementation that manages all of the virtual terminals.

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

Method Summary
 void addVirtualSessionListener(VirtualSessionListener listener)
          Add a VirtualSessionListener to the list that should receive events such as connection made, disconnected, resizes, data sent and received etc.
 void connect(ProfileTransport transport)
          Connect the session to the streams provided by the transport.
 void disconnect(boolean doDisconnect)
          Disconnect this session from the host it is connected to.
 java.lang.String getTitle()
          Return the title of this virtual session.
 ProfileTransport getTransport()
          Get the transport currently in use.
 VirtualSessionManager getVirtualSessionManager()
          Get the virtual session manager.
 void init(VirtualSessionManager virtualSessionManager)
          Initialise the virtual session.
 boolean isConnected()
          Get if this virtual session is currently connected
 void removeVirtualSessionListener(VirtualSessionListener listener)
          Remove a VirtualSessionListener to the list receiving events such as connection made, disconnected, resizes, data sent and received etc.
 void reset()
          Reset the session back to its initial state (e.g.
 void setVirtualSessionProperties(ResourceProfile profile)
          Prior to connection, and when the user applies connection profiles, this method will be called.
 

Method Detail

reset

public void reset()
Reset the session back to its initial state (e.g. clear the scree, clear the buffer, reset the cursor etc)


getTitle

public java.lang.String getTitle()
Return the title of this virtual session. There may be more than one session with the same title.

Returns:
virtual session title

isConnected

public boolean isConnected()
Get if this virtual session is currently connected

Returns:
connected

init

public void init(VirtualSessionManager virtualSessionManager)
Initialise the virtual session. Called after it has been added to the virtual session manager.

Parameters:
virtualSessionManager - the virtual session manager session has been added to

getVirtualSessionManager

public VirtualSessionManager getVirtualSessionManager()
Get the virtual session manager. Will return null until init has been called.

Returns:
the virtual session manager session has been added to

disconnect

public void disconnect(boolean doDisconnect)
Disconnect this session from the host it is connected to. If true is passed for the doDisconnect value, the the transport will also be disconnected.

Parameters:
doDisconnect - disconnect the transport

addVirtualSessionListener

public void addVirtualSessionListener(VirtualSessionListener listener)
Add a VirtualSessionListener to the list that should receive events such as connection made, disconnected, resizes, data sent and received etc.

Parameters:
listener - listener to add

removeVirtualSessionListener

public void removeVirtualSessionListener(VirtualSessionListener listener)
Remove a VirtualSessionListener to the list receiving events such as connection made, disconnected, resizes, data sent and received etc.

Parameters:
listener - listener to remove

connect

public void connect(ProfileTransport transport)
Connect the session to the streams provided by the transport.

Parameters:
transport - transport

getTransport

public ProfileTransport getTransport()
Get the transport currently in use. This will be set after connect() has been called and will be null if not connected.

Returns:
transport

setVirtualSessionProperties

public void setVirtualSessionProperties(ResourceProfile profile)
Prior to connection, and when the user applies connection profiles, this method will be called. The virtual session implementation should configure itself using any properties the profile provides. For example, a terminal like implementation would set the background, foreground, cursor style etc.

Parameters:
profile - profile to configure virtual session from


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