Class JavaAgent.context.SocketContext
All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class JavaAgent.context.SocketContext

java.lang.Object
   |
   +----JavaAgent.context.AgentContext
           |
           +----JavaAgent.context.SocketContext

public class SocketContext
extends AgentContext
Subclass of AgentContext which uses the SocketInterface class for communication.


Copyright (c) 1995, H. Robert Frost, Stanford University. All rights reserved.

Copyright (c) 1996, H. Robert Frost, Enterprise Integration Technologies, Inc. All rights reserved.

RESTRICTED RIGHTS LEGEND: Use, duplication or disclosure by the Government is subject to restrictions as set forth in subparagraph(c)(1)(ii) of the Rights in Technical Data and Computer Software clause at DFARS 252.227-7013 and in similar clauses in the FAR and NASA FAR supplement.

This software is bound by the terms and conditions listed in the attached LICENSE file.



Constructor Index

 o SocketContext(SocketParams)
Sets the parameters and creates the CommInterface, represented Agent and possibly the AgentFrame.

Method Index

 o addAgent()
Creates an Agent object.
 o createCommInterface()
Creates a SocketInterface for the Agent.
 o main(String[])
Called if the SocketContext is started as an application from the command line.
 o setAgentAddress(int)
Sets the agents address, and name if no name was specified.
 o SubmitAddress()
Send the agent's name and address to the ANS.

Constructors

 o SocketContext
  public SocketContext(SocketParams params)
Sets the parameters and creates the CommInterface, represented Agent and possibly the AgentFrame.
Parameters:
params - Runtime parameters for the AgentContext.

Methods

 o addAgent
  protected boolean addAgent()
Creates an Agent object.
Returns:
Success of creation.
Overrides:
addAgent in class AgentContext
 o createCommInterface
  protected void createCommInterface()
Creates a SocketInterface for the Agent.
Overrides:
createCommInterface in class AgentContext
 o setAgentAddress
  protected void setAgentAddress(int port)
Sets the agents address, and name if no name was specified.
 o SubmitAddress
  protected void SubmitAddress()
Send the agent's name and address to the ANS.
 o main
  public static void main(String arg[])
Called if the SocketContext is started as an application from the command line. Command line args:

Parameters:
arg - Array of command line arguments.

All Packages  Class Hierarchy  This Package  Previous  Next  Index