Class ActiveMonitorSession

java.lang.Object
  extended byMonitorSession
      extended byActiveMonitorSession

class ActiveMonitorSession
extends MonitorSession


Field Summary
(package private)  Player auxiliary
           
(package private)  Cipher cipher
           
(package private)  Command curCommand
           
(package private)  boolean direction
           
(package private)  java.io.BufferedReader input
           
(package private)  boolean inTransfer
           
(package private)  PlayerCertificate monitorCert
           
(package private)  java.io.PrintStream output
           
(package private)  Player player
           
(package private)  PlayerDB playerDB
           
(package private)  RSA privateKey
           
(package private) static java.lang.String rcsid
           
(package private)  RSAEngine rsaEngine
           
(package private)  boolean transferAuthorized
           
(package private)  java.lang.String transferAuthorizeSet
           
(package private)  OutgoingConnectionHandler transferConnection
           
(package private)  PubRSA transferKey
           
(package private)  int transferRounds
           
(package private)  java.lang.String transferSubsetA
           
(package private)  java.lang.String transferSubsetJ
           
(package private)  java.lang.String transferSubsetK
           
(package private)  java.lang.String transFrom
           
(package private)  java.lang.String transTo
           
 
Constructor Summary
(package private) ActiveMonitorSession(PlayerDB players, java.net.Socket connection)
           
 
Method Summary
 boolean aliveCheck(java.net.InetAddress address, int port, boolean reportProblemsAsCommandError)
           
(package private)  boolean checkConnectingHost(java.lang.String hostname)
           
(package private)  void clearCurCommand()
           
(package private)  void completeOutputAndGetCommand(int maxRetry)
           
(package private)  void completeOutputAndGetCommand(java.lang.String commandRequired, int maxRetry)
           
(package private)  void enableCipherMode()
           
 void endSession()
           
 void endTransfer()
          Turns off transfer mode, unconditionally.
 java.lang.String getAuthorizeSet()
          Get the 'Authorize' set L.
 Player getAuxillaryPlayer()
           
(package private)  Command getCurCommand()
           
(package private)  java.lang.String getExchangeKey()
           
 PlayerCertificate getMonitorCertificate()
          Get the Monitor's Public Certificate.
 RSA getMonitorPrivateKey()
          Get the Monitor's Public Key (Verification).
 PubRSA getMonitorPublicKey()
          Get the Monitor's Private Signing Key.
(package private)  boolean getNewCommand()
           
 Player getPlayer()
           
 PlayerDB getPlayerDB()
           
 java.lang.String getSubSetA()
           
 java.lang.String getSubSetJ()
           
 java.lang.String getSubSetK()
           
 PubRSA getTransferPubKey()
           
 int getTransferRounds()
          Get the stored transfer rounds.
(package private)  void greet()
           
(package private)  void handleCurrentCommand()
           
(package private)  void initEngine(java.lang.String identity)
           
(package private)  boolean initiate()
           
(package private)  boolean initiate(Player playerWeThoughtThisWas)
           
 boolean isTransferAuthorized()
           
 void notTransferAuthorized()
           
(package private)  void println(java.lang.String s)
           
(package private)  java.lang.String readLine()
           
(package private)  Player requestIdent()
           
(package private)  void require(java.lang.String commandRequired)
           
 boolean requireVerifyAndExecute(java.lang.String commandRequried)
           
 void resetTransferDirection()
           
(package private)  void sendComment(java.lang.String s)
           
(package private)  void sendComplete()
           
 void sendDirective(java.lang.String directive, java.lang.String data)
           
 void sendError(java.lang.String error)
           
 void sendErrorOrComment(boolean reportProblemsAsCommandError, java.lang.String message)
           
 void sendResult(java.lang.String result)
           
 void setAuthorizeSet(java.lang.String a)
           
(package private)  boolean setExchangeKey(java.math.BigInteger encValue)
           
 void setSubSetA(java.lang.String a)
           
 void setSubSetJ(java.lang.String j)
           
 void setSubSetK(java.lang.String k)
           
 void setTransfer()
          Sets the variables used in transfer mode .
 void setTransferAuthorized()
           
 void setTransferDirection()
           
 void setTransferPubKey(java.math.BigInteger v, java.math.BigInteger n)
           
 void setTransferRounds(int i)
           
 boolean transferDirection()
           
 boolean transferring()
          Returns that we are in transfer mode right now.
 boolean verifyAlive(Player playerWeThoughtThisWas)
           
 boolean verifyTransaction(Player playerForTransaction, java.lang.String dataToSend, java.lang.String commandRequired)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

rcsid

static final java.lang.String rcsid
See Also:
Constant Field Values

privateKey

RSA privateKey

monitorCert

PlayerCertificate monitorCert

input

java.io.BufferedReader input

output

java.io.PrintStream output

player

Player player

auxiliary

Player auxiliary

playerDB

PlayerDB playerDB

curCommand

Command curCommand

rsaEngine

RSAEngine rsaEngine

cipher

Cipher cipher

inTransfer

boolean inTransfer

direction

boolean direction

transTo

java.lang.String transTo

transFrom

java.lang.String transFrom

transferKey

PubRSA transferKey

transferRounds

int transferRounds

transferAuthorizeSet

java.lang.String transferAuthorizeSet

transferSubsetA

java.lang.String transferSubsetA

transferSubsetK

java.lang.String transferSubsetK

transferSubsetJ

java.lang.String transferSubsetJ

transferAuthorized

boolean transferAuthorized

transferConnection

OutgoingConnectionHandler transferConnection
Constructor Detail

ActiveMonitorSession

ActiveMonitorSession(PlayerDB players,
                     java.net.Socket connection)
               throws MonitorSessionCreationException
Method Detail

initiate

boolean initiate(Player playerWeThoughtThisWas)
           throws MonitorSessionException
Throws:
MonitorSessionException

verifyAlive

public boolean verifyAlive(Player playerWeThoughtThisWas)
                    throws MonitorSessionException
Throws:
MonitorSessionException

verifyTransaction

public boolean verifyTransaction(Player playerForTransaction,
                                 java.lang.String dataToSend,
                                 java.lang.String commandRequired)
                          throws MonitorSessionException
Throws:
MonitorSessionException

setExchangeKey

boolean setExchangeKey(java.math.BigInteger encValue)

getExchangeKey

java.lang.String getExchangeKey()

initEngine

void initEngine(java.lang.String identity)

enableCipherMode

void enableCipherMode()

println

void println(java.lang.String s)

readLine

java.lang.String readLine()
                    throws java.io.IOException
Throws:
java.io.IOException

greet

void greet()

checkConnectingHost

boolean checkConnectingHost(java.lang.String hostname)

getMonitorCertificate

public PlayerCertificate getMonitorCertificate()
Get the Monitor's Public Certificate.


getMonitorPublicKey

public PubRSA getMonitorPublicKey()
Get the Monitor's Private Signing Key.


getMonitorPrivateKey

public RSA getMonitorPrivateKey()
Get the Monitor's Public Key (Verification).


sendComplete

void sendComplete()

requireVerifyAndExecute

public boolean requireVerifyAndExecute(java.lang.String commandRequried)
                                throws java.io.IOException,
                                       MonitorSessionException
Throws:
java.io.IOException
MonitorSessionException

require

void require(java.lang.String commandRequired)
       throws java.io.IOException,
              MonitorSessionException
Throws:
java.io.IOException
MonitorSessionException

completeOutputAndGetCommand

void completeOutputAndGetCommand(int maxRetry)
                           throws java.io.IOException,
                                  MonitorSessionException
Throws:
java.io.IOException
MonitorSessionException

completeOutputAndGetCommand

void completeOutputAndGetCommand(java.lang.String commandRequired,
                                 int maxRetry)
                           throws java.io.IOException,
                                  MonitorSessionException
Throws:
java.io.IOException
MonitorSessionException

requestIdent

Player requestIdent()
              throws java.io.IOException,
                     MonitorSessionException
Throws:
java.io.IOException
MonitorSessionException

getPlayerDB

public PlayerDB getPlayerDB()

getPlayer

public Player getPlayer()

getAuxillaryPlayer

public Player getAuxillaryPlayer()

aliveCheck

public boolean aliveCheck(java.net.InetAddress address,
                          int port,
                          boolean reportProblemsAsCommandError)

initiate

boolean initiate()
           throws MonitorSessionException
Throws:
MonitorSessionException

getNewCommand

boolean getNewCommand()
                throws MonitorSessionException
Throws:
MonitorSessionException

getCurCommand

Command getCurCommand()

clearCurCommand

void clearCurCommand()

handleCurrentCommand

void handleCurrentCommand()

endSession

public void endSession()

sendResult

public void sendResult(java.lang.String result)

sendDirective

public void sendDirective(java.lang.String directive,
                          java.lang.String data)

sendComment

void sendComment(java.lang.String s)

sendError

public void sendError(java.lang.String error)

sendErrorOrComment

public void sendErrorOrComment(boolean reportProblemsAsCommandError,
                               java.lang.String message)

transferring

public boolean transferring()
Returns that we are in transfer mode right now.


endTransfer

public void endTransfer()
Turns off transfer mode, unconditionally.


setTransfer

public void setTransfer()
Sets the variables used in transfer mode .


setTransferPubKey

public void setTransferPubKey(java.math.BigInteger v,
                              java.math.BigInteger n)

getTransferPubKey

public PubRSA getTransferPubKey()

getTransferRounds

public int getTransferRounds()
Get the stored transfer rounds.


setTransferRounds

public void setTransferRounds(int i)

getAuthorizeSet

public java.lang.String getAuthorizeSet()
Get the 'Authorize' set L.


setAuthorizeSet

public void setAuthorizeSet(java.lang.String a)

setSubSetA

public void setSubSetA(java.lang.String a)

getSubSetA

public java.lang.String getSubSetA()

setSubSetK

public void setSubSetK(java.lang.String k)

getSubSetK

public java.lang.String getSubSetK()

setSubSetJ

public void setSubSetJ(java.lang.String j)

getSubSetJ

public java.lang.String getSubSetJ()

transferDirection

public boolean transferDirection()

setTransferDirection

public void setTransferDirection()

resetTransferDirection

public void resetTransferDirection()

setTransferAuthorized

public void setTransferAuthorized()

notTransferAuthorized

public void notTransferAuthorized()

isTransferAuthorized

public boolean isTransferAuthorized()