For more information on this example, consult Agent Interaction Java API 7.6 Developer’s Guide.
The Agent Interaction Java API 7.6 Agent Server code example show you how to implement a jsp server based on Agent Interaction Java API, and how to make use of the monitor service available through Agent Interaction Java API. This example also demonstrates how to extend an application block.
With this code example, you can start and stop Agent Server through
a web browser. Once started, Agent Server displays available agents with
their status, and a list of default place. Then, you can perform login
or logout actions by specifying agent data, except place to be used. Agent Server will assign a
place to log the agent in.
For more information about the examples, click
here.
You must install the following components and media:
.jar
filesInstall Tomcat:
Find and open jakarta-tomcat-<release_number>.exe
,
and run it.
At the License Agreement window, click I
Agree
.
At the Installation Options
window,
select Full (w/Source Code)
from the Select type of
install
drop-down list
At the Choose Install Location
window, enter a path to your Tomcat installation location, and click Install
.
Warning! The path to your Tomcat installation directory should
have no space characters in it.
Create, or verify that there exist, two environment variables:
CATALINA_HOME
—your
Tomcat installation directory
JAVA_HOME
—your
JDK base directory.
Note: Throughout this readme,
<CATALINA_HOME>
represents the base directory of your
Tomcat installation.
<CATALINA_HOME>/webapps
location.
Expand.jar
files to the
<CATALINA_HOME>/webapps/AgentServer/
WEB-INF/lib directory.compile
and makeJar files. Replace the <location
of application blocks classes directory> placeholder text with the
appropriate path.
compile <file_name>
in the following order:
AgentServer.jar
file by running the makeJar
command file.<CATALINA_HOME>/bin/startup>
command file.http://localhost:8080/AgentServer/main_frame.jsp
http://hostname:8080/AgentServer/main_frame.jsp
if your workstation differs from Agent Server's host.
Start server
form with application data match objects that already exist in the configuration layer. Otherwise,
Agent Server will not start.Start
Once Agent Server starts, it tooks a few minutes to collect data and display both agent and place information. Do not attempt login or logout actions if data are not available.
Warning: To perform login and logout actions, Agent Server uses a list of default places. If you did not define a few default places for your agents in the Configuration Layer, you will not be able to perform login actions.