org.iaccess.TNProtocol
Class iAccessNegotiation

java.lang.Object
  extended by java.lang.Thread
      extended by org.iaccess.TNProtocol.iAccessNegotiation
All Implemented Interfaces:
java.lang.Runnable

public class iAccessNegotiation
extends java.lang.Thread

Manages a single interaction in a negotiation within a given session. If a request is already being managed by another object, iAccessNegotiation joins to this object and awaits for the result (suspended thread on already requested credential), else it calls iAccess logical layer to get the result. In this case iAccessNegotiation can generate some counter-requests and consequently start some new interactions in new threads. iAccessNegotiation calls TNProtocol.JBOSS server methods to send requests. The object of iAccessNegotiation will finalize its work when the Result of the request (grant or deny) is taken. This class extends the abstract class java.lang.Thread, threfore always starts in a new thread.

This class encapsulates the negotiation protocol functionality as presented in the JNSM paper. The class implements AskCredentials() function with the stepwise disclosure.

More details are given to each of the functions in the class.

See Also:
iAccessDispatcher, BasicAccessControlAlgorithm

Nested Class Summary
 
Nested classes/interfaces inherited from class java.lang.Thread
java.lang.Thread.State, java.lang.Thread.UncaughtExceptionHandler
 
Field Summary
static int deny
          Response value for deny.
static int grant
          Response value for grant.
static int notReady
          Response value for not ready.
 
Fields inherited from class java.lang.Thread
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
 
Constructor Summary
iAccessNegotiation(TRequest Request, javax.net.ssl.SSLSocket SocketWaitingResult)
          Constructor of the class.
 
Method Summary
 long getCounter()
          Returns the global counter of all existing interactions.
 void run()
           
 void runNegotiations()
          Starts negotiations on the received request.
 int runTNProtocol()
          Runs the trust negotiation protocol that calls the core interactive access control function of the logical layer.
 int waitForResult()
          Method is called by other threads with a same request as the current object (negotiation object).
 
Methods inherited from class java.lang.Thread
activeCount, checkAccess, countStackFrames, currentThread, destroy, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, 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

grant

public static final int grant
Response value for grant.

See Also:
Constant Field Values

deny

public static final int deny
Response value for deny.

See Also:
Constant Field Values

notReady

public static final int notReady
Response value for not ready.

See Also:
Constant Field Values
Constructor Detail

iAccessNegotiation

public iAccessNegotiation(TRequest Request,
                          javax.net.ssl.SSLSocket SocketWaitingResult)
Constructor of the class. Initializing main data for the negotiation protocol.

Method Detail

getCounter

public long getCounter()
Returns the global counter of all existing interactions. It is unique for earch interaction. We use it to distinguish temporary files produced by iAccess logical layer within one session


runNegotiations

public void runNegotiations()
Starts negotiations on the received request. It runs the iAccessNegotiation in a new thread. iAccessNegotiation checks if a request is to be suspended, and, if not, it runs the negotiation protocol (calls runTNProtocol() function).


run

public void run()
Specified by:
run in interface java.lang.Runnable
Overrides:
run in class java.lang.Thread

runTNProtocol

public int runTNProtocol()
Runs the trust negotiation protocol that calls the core interactive access control function of the logical layer. The protocol steps are in accordance with the negotiation scheme of JNSM paper.

See Also:
BasicAccessControlAlgorithm

waitForResult

public int waitForResult()
Method is called by other threads with a same request as the current object (negotiation object). All these threads await for an access decision (a result) by the current object. In case of a dead loop (when session time is expired) we prolong the current session with the DynamicSessionTimeExtension interval