public interface Server
extends java.rmi.Remote
A SAFS Engine RMI Server is the centralized controller that will talk with each RMI Agent embedded within each enabled JVM--local or remote. This provides an RMI alternative to STAF for multi-JVM communications between the very visible SAFS Engine and the invisible Agents in each JVM.
The typical scenario here would be that a SAFS Engine like SAFS/Abbot would still present a single STAF-based event-driven interface for the TID and any other Driver wishing to use it, but underneath the engine will be communicating with multiple JVMs over RMI.
This is somewhat analogous to how other tools like RobotJ, Robot, and WinRunner communicate with all running JVMs through a single script engine or controller.
Note: For consistent operation the java.rmi.server.hostname
needs to be set in code or
on the command line before launching an RMI Server:
System.setProperty("java.rmi.server.hostname", "<rmi server ip>");
System.setProperty("java.rmi.server.hostname", "hostname.company.internal.net");
-Djava.rmi.server.hostname=<rmi server ip>
-Djava.rmi.server.hostname=hostname.company.internal.net
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
JAVA_RMI_SERVER_HOSTNAME_PROPERTY
"java.rmi.server.hostname" System property or command-line JVM setting specifying
the IP address to be used by the RMI Server.
|
static java.lang.String |
SERVER_SYSTEM_PROPERTY
'safs.server.running' System Property signifying this JVM contains the RMI Server
and RMI Agents should shutdown and not attempt to connect to the RMI Server.
|
Modifier and Type | Method and Description |
---|---|
void |
register(Agent anAgent)
A JVM Agent will register with the RMI Server after it has become available in
the RMI Naming registry.
|
java.lang.Object |
runCommand(java.lang.Object command)
This is a "do anything" function that the Server and Clients have a private contract
to implement.
|
void |
unRegister(Agent anAgent)
Unregisters the JVM Agent from the Server.
|
static final java.lang.String SERVER_SYSTEM_PROPERTY
static final java.lang.String JAVA_RMI_SERVER_HOSTNAME_PROPERTY
void register(Agent anAgent) throws java.rmi.RemoteException
Registering with the Server makes that remote JVM available for testing through the controlling SAFS Engine.
java.rmi.RemoteException
void unRegister(Agent anAgent) throws java.rmi.RemoteException
java.rmi.RemoteException
java.lang.Object runCommand(java.lang.Object command) throws java.rmi.RemoteException, java.lang.Exception
For example, the Client and Server may have been coded to pass string commands back and forth and the string commands can be parsed to provide an unlimited number of command possibilities.
command
- Object of a type expected by the Server implementation for this method.java.rmi.RemoteException
java.lang.Exception
Copyright © SAS Institute. All Rights Reserved.