ajanta.server
Class DDEntry

java.lang.Object
  |
  +--ajanta.server.DDEntry

public class DDEntry
extends java.lang.Object

The server maintains a domain registry indexed by thread group ids, in which it stores the agent's URN and credentials, as well as a reference to the agent object itself. This entry is used by the server's security-conscious code whenever it needs access to the agent or its identity --- for example, when an agent attempts to acquire a resource, its credentials may be needed to determine the level of access permitted. The resource's code finds the current thread's thread group id and looks up the domain registry using that id as the index. The registry entry can then be used to determine the agent's access privileges.


Constructor Summary
DDEntry(ajanta.naming.URN name, ajanta.agent.Agent ag, java.lang.ThreadGroup tg, ajanta.server.AgentLoader cl, ajanta.server.AgentEnv h, java.io.ObjectInputStream in, java.io.ObjectOutputStream out, ajanta.util.MethodSpec action, ajanta.agent.Credentials cred, int nonce, ajanta.naming.URN credSignedBY)
           
 
Method Summary
 ajanta.util.MethodSpec getAction()
          return MeyhodSpec of the method to be executed on this server
 ajanta.agent.Agent getAgent()
          return reference of the agent
 ajanta.server.AgentEnv getAgentEnv()
          return agent server enevironment context available to this agent
 boolean getAgentLoaded()
           
 ajanta.agent.Credentials getCredentials()
          return credential object of the agent
 java.security.Signature getCredSignature()
          return credntial signature object of the DDEntry
 java.io.ObjectInputStream getIS()
          return ObjectInputStream on which agent is transfered
 ajanta.server.AgentLoader getLoader()
          return agent loader for the agent
 ajanta.naming.URN getName()
          return URN of the agent
 int getNonce()
          return current challenge ( nonce ) for the agent
 java.io.ObjectOutputStream getOS()
          return ObjectOutputStream on which server can send reply or ack to sender
 ajanta.naming.URN getSignedBY()
          return URN of the signer of the signature
 java.lang.ThreadGroup getTG()
          return thread group id of the agent
 boolean getVerified()
           
 void setAgent(ajanta.agent.Agent x)
          Set agent field of the DDEntry to the agent reference passed as argument
 void setAgentLoaded(boolean stat)
          set agentLoaded field to stat value passed as argument.
 void setCertificateAndPrivateKey(java.security.cert.X509Certificate agentCertificate, java.security.PrivateKey agentPrivateKey)
           
 void setCredentials(ajanta.agent.Credentials c)
          Set credntial object of the DDEntry to the credential object passed as argument
 void setCredSignature(java.security.Signature s)
          Set credntial signature object of the DDEntry to the signature object passed as argument
 void setTransferMode()
          These public methods are called by the launch() method in the AgentEnv to set or unset the boolean when it is in the process of launching an agent so that the security manager will know when to allow the connection
 void setVerified(boolean stat)
          set verified filed to stat value passed as argument.
 void unsetTransferMode()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DDEntry

public DDEntry(ajanta.naming.URN name,
               ajanta.agent.Agent ag,
               java.lang.ThreadGroup tg,
               ajanta.server.AgentLoader cl,
               ajanta.server.AgentEnv h,
               java.io.ObjectInputStream in,
               java.io.ObjectOutputStream out,
               ajanta.util.MethodSpec action,
               ajanta.agent.Credentials cred,
               int nonce,
               ajanta.naming.URN credSignedBY)
Parameters:
name - the agent's URN
ag - the agent object
tg - the thread group created for this agent
cl - the class loader assigned to this agent
h - agent server environment context object
in - the stream on which the agent is transferred
out - the corresponding output stream to send acknowledgement
action - the agent's action to be executed at this site
cred - agent's credentials
nonce - challenge sent in the ATPReply to sending server
credSignedBY - URN of the signer of the credential bytes
Method Detail

getAgent

public ajanta.agent.Agent getAgent()
return reference of the agent


getName

public ajanta.naming.URN getName()
return URN of the agent


getTG

public java.lang.ThreadGroup getTG()
return thread group id of the agent


getIS

public java.io.ObjectInputStream getIS()
return ObjectInputStream on which agent is transfered


getOS

public java.io.ObjectOutputStream getOS()
return ObjectOutputStream on which server can send reply or ack to sender


getLoader

public ajanta.server.AgentLoader getLoader()
return agent loader for the agent


getCredentials

public ajanta.agent.Credentials getCredentials()
return credential object of the agent


getAction

public ajanta.util.MethodSpec getAction()
return MeyhodSpec of the method to be executed on this server


getAgentEnv

public ajanta.server.AgentEnv getAgentEnv()
return agent server enevironment context available to this agent


getNonce

public int getNonce()
return current challenge ( nonce ) for the agent


setAgent

public void setAgent(ajanta.agent.Agent x)
Set agent field of the DDEntry to the agent reference passed as argument


setCredentials

public void setCredentials(ajanta.agent.Credentials c)
Set credntial object of the DDEntry to the credential object passed as argument


setCredSignature

public void setCredSignature(java.security.Signature s)
Set credntial signature object of the DDEntry to the signature object passed as argument


getCredSignature

public java.security.Signature getCredSignature()
return credntial signature object of the DDEntry


setVerified

public void setVerified(boolean stat)
set verified filed to stat value passed as argument. True indicate signature is verfied


getVerified

public boolean getVerified()
Returns:
true if signature is verified false otherwise

setAgentLoaded

public void setAgentLoaded(boolean stat)
set agentLoaded field to stat value passed as argument. True indicate Agent is Loaded


getAgentLoaded

public boolean getAgentLoaded()
Returns:
true if agent is loaded by the ATP

getSignedBY

public ajanta.naming.URN getSignedBY()
return URN of the signer of the signature


setTransferMode

public void setTransferMode()
These public methods are called by the launch() method in the AgentEnv to set or unset the boolean when it is in the process of launching an agent so that the security manager will know when to allow the connection


unsetTransferMode

public void unsetTransferMode()

setCertificateAndPrivateKey

public void setCertificateAndPrivateKey(java.security.cert.X509Certificate agentCertificate,
                                        java.security.PrivateKey agentPrivateKey)