Agent System POND 1.2 (28.2.2002)

PkgAgentSystem
Class ServingThread

java.lang.Object
  |
  +--java.lang.Thread
        |
        +--FIM.Util.Threads.CancellableThread
              |
              +--PkgAgentSystem.ServingThread
All Implemented Interfaces:
Runnable

class ServingThread
extends CancellableThread

A thread to receive an agent from a remote host. It is verified in advance, whether the agent is allowed to move here. If AgentSystem.SECURE_CONNECTION is true, Diffie-Hellman key exchange is used to encrypt the communication. Then also the identity of the remote host is verfied (challenged for knowledge of the private key). This verification is symmetric: We also have to prove our identity. Both hosts must have the same value, else the protocol will be aborted. (AMP = Agent Movement Protocol)

Version:
1.0, 1.7.2000
Author:
Michael Sonntag
See Also:
URLConnection, AgentData, AMPURLConnection, AMPStreamHandler, AMPStreamHandlerFactory, URL

Field Summary
protected  MessageDigest handOff
          The digest object we use for hand-off
 
Fields inherited from class java.lang.Thread
inheritableThreadLocals, MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY, threadLocals
 
Constructor Summary
ServingThread(Socket recv, AgentSystem ag_sys, Certificate system_cert, PrivateKey system_priv_key)
          Creates a new serving thread.
 
Method Summary
(package private)  void doHandOff(AgentIdentity agentIdentity)
          Perform Hand-Off
 void run()
          Starts the serving thread.
 
Methods inherited from class FIM.Util.Threads.CancellableThread
cancel, isCancelled, terminate
 
Methods inherited from class java.lang.Thread
, activeCount, checkAccess, countStackFrames, currentThread, destroy, dumpStack, enumerate, getContextClassLoader, getName, getPriority, getThreadGroup, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setName, setPriority, sleep, sleep, start, stop, stop, suspend, toString, yield
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

handOff

protected MessageDigest handOff
The digest object we use for hand-off
Constructor Detail

ServingThread

public ServingThread(Socket recv,
                     AgentSystem ag_sys,
                     Certificate system_cert,
                     PrivateKey system_priv_key)
Creates a new serving thread.
Parameters:
recv - the socket connected to the other host
ag_sys - the agent system to which we belong
system_cert - the certificate of the system owner
system_priv_key - the private key of the system owner
Method Detail

run

public void run()
Starts the serving thread. Must already be connected to the other host. Will immediately start the protocol for receiving the agent.
Overrides:
run in class CancellableThread

doHandOff

void doHandOff(AgentIdentity agentIdentity)
         throws IOException,
                AuthenticationException
Perform Hand-Off

Agent System POND 1.2 (28.2.2002)

Submit a bug

Copyright 2001,2002 Michael Sonntag & Institute for Information Processing and Microprocessor Technology (FIM), Johannes-Kepler-University Linz, Altenbergerstr. 69, A-4040 Linz, Austria.