All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class tos.Session

java.lang.Object
   |
   +----tos.Session

public final class Session
extends Object
Objects of this class provides secure communication using the RC4 stream cipher. The property tos.skey should hold a secret key string. This key allows the two communicating parties to exchange "fresh" session keys in a secure way.

Note: Sessions are also used internally to transfer carriers.

Version:
$Id: Session.java,v 1.5 2000/11/21 14:18:55 lauvset Exp $
Author:
Kåre Jørgen Lauvset [kaare@cs.uit.no]

Constructor Index

 o Session(Socket)
Create and establish session.

Method Index

 o finalize()
Clean-up.
 o recv()
Receive object through session.
 o send(Object)
Send object through session.

Constructors

 o Session
 public Session(Socket so) throws Exception
Create and establish session.

Parameters:
so - Connected socket to use as communication channel.
Throws: Exception
if session cannot be established.

Methods

 o send
 public void send(Object ob) throws Exception
Send object through session.

Parameters:
ob - Object to send.
Throws: Exception
if object cannot be sent.
 o recv
 public Object recv() throws Exception
Receive object through session.

Returns:
Object reference.
Throws: Exception
if object cannot be received.
 o finalize
 protected void finalize() throws Throwable
Clean-up. The socket is closed as part of the clean-up procedure.

Throws: Throwable
if...
Overrides:
finalize in class Object

All Packages  Class Hierarchy  This Package  Previous  Next  Index