Job Management Partner 1/Base User's Guide

[Contents][Glossary][Index][Back][Next]


API settings file

Format

server event-server-name communication-type [address [port]]
client event-server-name connection-source-address
log-keep number-of-log-files
log-size file-size

File name

api

Storage destination directory

In Windows:
installation-folder\conf\event\

In UNIX:
/etc/opt/jp1base/conf/event/ 

Description

Defines the method for connecting from the application program to the event server and the port to use for the connection. There is usually no need to change the default settings in an API settings file. You can add additional information if you want to execute an application program on the local host that obtains JP1 events from an event server on another host.

If you change the default value of the ports parameter in the event server settings file (conf), you must specify the same port number in the API settings file.

Application of settings

The settings are applied when the JP1/Base event converter or programs linked to an event service, such as JP1/IM or JP1/AJS, starts or restarts.

Definition details

The following conventions apply to entries in the API settings file (api):

server event-server-name communication-type [address [port]]
Specify how to connect to the event server. You can specify multiple server parameters if the value in event-server-name is different in each case.

event-server-name
Specify the event server name in either of the following ways:
  • event-server-name
    Specify a specific event server name that is no more than 255 bytes.
  • *
    Specify a value for the event servers that have not been individually specified.
    If this setting is omitted, an application program cannot connect to any event servers that are not individually specified.

communication-type
Specify the method for connecting to the specified remote server:
  • keep-alive
    Keeps the TCP/IP connection open for reuse unless explicitly disconnected by the application program.
  • close
    Closes the TCP/IP connection after acquiring each JP1 event. Specify close if you are using a telephone line, for example, and you do not want to keep the connection open all of the time. Note that specifying close reduces efficiency.

Notes
  • Be sure to specify keep-alive if you want to link with the event service in JP1/AJS, JP1/IM, or JP1/Power Monitor.
  • In the following cases, even if you set close, keep-alive is used for the setting:
    The IP address resolved from the OS by the physical host name (returned by the hostname command) is the same as the IP address of the event service to which a linked program (such as JP1/AJS, JP1/IM, or JP1/Power Monitor) is trying to connect to.

address
Specify the IP address to connect to by using one of the methods below. The specified address must match the value set in the ports parameter for the event server specified in the event server settings file (conf). The default host name is the event server name.
  • IP-address
    Specify numbers separated by periods (example: 172.16.50.50).
  • host-name
    Specify a name that is no more than 255 bytes and can be converted into an IP address by the system's hosts file or name server.
  • 0.0.0.0
    This value prevents application programs from issuing or acquiring events. (This includes JP1 programs, but excludes application programs that use functions or commands from the pre-Version 6 JP1 programs, JP1/SES and JP1/AJS.)
    JP1/AJS and most other programs will still issue events if you specify 0.0.0.0. But by specifying this value, you can reduce the overhead for processing issued events, and speed up event processing.

port
Specify the port number using one of the methods below. The specified address must match the value set in the ports parameter for the event server specified in the event server settings file (conf). When no port is specified, the service name is assumed to be jp1imevtapi.
  • port-number
    Use numbers to specify the port number.
  • Service name
    Specify the tcp service name defined in the system's services file.

client event-server-name connection-source-address
Specify the connection source address to be used when connecting to the event server. By default, the OS automatically assigns the source connection address. However, in an environment where multiple NICs are assigned, you need to define this parameter to explicitly specify which source connection address to use. You can specify multiple values for this parameter.

event-server-name
Specify the destination event server name in one of the following ways:
  • event-server-name
    Specify a specific event server name that is no more than 255 bytes.
  • *
    Specify a value for the event servers that have not been individually specified.
    The default connection source address is 0.0.0.0.

Connection source address
Specify the connection source address using one of the following methods:
  • IP-address
    Specify numbers separated by periods (example: 172.16.50.50). The IP address specified here must be the IP address assigned to the local host.
  • 0.0.0.0
    The OS automatically assigns the connection source IP to be used.

log-keep number-of-log-files

Number of log files
Specify the number of event service API log files (IMEvapi.*) to be saved. The current log file is switched when its size reaches the limit specified in log-size. When the number of log files reaches the maximum you specify here, the oldest file is deleted. Specify a number from 0 to 50. The default is 5. When 0 is specified, logs are not kept.

log-size file-size

File size
Specify the maximum size (in bytes) of an event service API log file (IMEvapi.*). Specify a number from 65536 to 2147483647. The default is 1000000. Log information is output only when the API is loaded and when an error occurs.

[Contents][Back][Next]


[Trademarks]

All Rights Reserved. Copyright (C) 2009, Hitachi, Ltd.