Class RemoteService.resource.Service
All Packages Class Hierarchy This Package Previous Next Index
Class RemoteService.resource.Service
java.lang.Object
|
+----RemoteService.resource.Service
- public class Service
- extends Object
Provides a generic interface to a remote service. Specific services will
be represented by subclasses of this class. Class files for each Service
are obtained by DesignAgents from ServiceAgents. The DesignAgent, after
loading the class file, will instantiate the Service subclass and then
call the run() method to execute the service interface.
The Service object can communicate, via the DesignAgent, with both other
agents (by using the DA's sendMessage() method) and with
service-specific ProD code (by using the DA's send_ProI_message() method).
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.
-
name
-
String name for this Service, used as an identifier in messages and
in storage Hashtables.
-
parent
- ClientAgent which instantiated this Service object.
-
service_agent
- Name of ServiceAgent which supplied the Service class file.
-
Service()
- Creates a new Service object.
-
addSystemMessage(String)
- Sends a system message to the agent.
-
addSystemMessage(String, Exception)
- Sends a system message to the agent w/ exception.
-
getName()
- Returns the name of the Service.
-
message_received(String, String)
- Called when a message is received from the ProIntegrator for this
Service object.
-
run()
- Executes the Service interface.
-
setParams(String, ClientAgent)
-
-
stop()
- Stops the service.
name
protected String name
- String name for this Service, used as an identifier in messages and
in storage Hashtables.
parent
protected ClientAgent parent
- ClientAgent which instantiated this Service object.
service_agent
public static String service_agent
- Name of ServiceAgent which supplied the Service class file.
Service
public Service()
- Creates a new Service object.
setParams
public void setParams(String n,
ClientAgent ca)
getName
public String getName()
- Returns the name of the Service.
- Returns:
- String name of the Service.
run
public void run()
- Executes the Service interface. Specific actions must be implemented for
each subclass.
stop
public void stop()
- Stops the service.
message_received
public void message_received(String message,
String sender)
- Called when a message is received from the ProIntegrator for this
Service object. The message will most likely originate from the
Service specific ProD code. Specific actions must be implemented for
each subclass.
- Parameters:
- message - Message content
- sender - Message origin
addSystemMessage
public void addSystemMessage(String message)
- Sends a system message to the agent.
- Parameters:
- message - The system message to output.
addSystemMessage
public void addSystemMessage(String message,
Exception e)
- Sends a system message to the agent w/ exception.
- Parameters:
- message - The system message to output.
- e - Exception which generated the message, may be null.
All Packages Class Hierarchy This Package Previous Next Index