Class RemoteService.context.ClientContext
All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class RemoteService.context.ClientContext

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

public class ClientContext
extends SocketContext
Subclass of SocketContext which provides a context for a ClientAgent. The main function of the ClientAgent is to load and execute interfaces to multiple remote services. Each remote service interface can communicate with a local process via the stdin and stdout of the context (PipeCommunicator).


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.



Variable Index

 o pipecomm
Thread which handles communications through the stdin and stdout.

Constructor Index

 o ClientContext(ClientParams)
ClientContext constructor.

Method Index

 o addAgent()
Creates the ClientAgent object.
 o createGUI()
If the gui flag is set, creates an RSFrame object.
 o main(String[])
Called if the ClientContext is started as an application from the command line.
 o NonAgentMsg(Object)
Sends a String message through the stdout w/ optional interrupt.
 o PipeMsgReceived(String)
Called when a message is received through the PipeCommunicator.
 o resourceChanged(String)
Called when some Agent resource has changed.
 o startPipeCommunicator()
Starts the PipeCommunicator thread.

Variables

 o pipecomm
  protected PipeCommunicator pipecomm
Thread which handles communications through the stdin and stdout.

Constructors

 o ClientContext
  public ClientContext(ClientParams params)
ClientContext constructor.

Methods

 o startPipeCommunicator
  protected void startPipeCommunicator()
Starts the PipeCommunicator thread.
 o createGUI
  protected void createGUI()
If the gui flag is set, creates an RSFrame object.
Overrides:
createGUI in class AgentContext
 o addAgent
  protected boolean addAgent()
Creates the ClientAgent object.
Overrides:
addAgent in class SocketContext
 o NonAgentMsg
  public void NonAgentMsg(Object message) throws NonAgentMsgException
Sends a String message through the stdout w/ optional interrupt.
Overrides:
NonAgentMsg in class AgentContext
 o PipeMsgReceived
  protected void PipeMsgReceived(String message)
Called when a message is received through the PipeCommunicator.
Parameters:
message - String received.
 o resourceChanged
  public void resourceChanged(String type)
Called when some Agent resource has changed. If it is available_service could be a registration or an unregistration.
Parameters:
type - String identifying the type of the resource.
Overrides:
resourceChanged in class AgentContext
 o main
  public static void main(String arg[])
Called if the ClientContext 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