Driver section
This table shows the Driver section entries in the .ini and .pni files:
Name | Description | Sample threads |
---|---|---|
DRIVERTYPE (Required) |
Permitted values are class or application .
|
All |
CLASS (Required) |
This defines the fully qualified class that contains all the methods mentioned in this list. All of the methods that are defined are members of this class. | All |
INITMETHOD (Optional) |
An optional method in the class that can be used to set
up things before the driver is running. Example: public int doInit(String initarg). If the return value is non-zero, then it is assumed that there was an error and the driver enters the error state. |
WeatherClient
|
INITARG (Optional) |
A string value that is passed to in the invocation to
the init method. It is optional and can be null in
the invocation, so should be checked before using in the method. |
WeatherClient (blank) |
STARTMETHOD
|
Method that is invoked when all of the driver is
operational. It is required for the application mode where the
method is invoked from a special thread. It does not return from the
i until the STOPMETHOD is invoked
on shut down. For the class mode it must return if called. Example: public void doStart(String startarg). Runs after anyINITMETHOD . Optional if Required if |
CallbackJava
|
STARTARG (Optional) |
The string argument to the STARTMETHOD . Check for null before
using to avoid an exception. |
CallbackJava (blank)
|
STOPMETHOD
|
Called during driver shutdown
before operations in the driver are terminated. Example: public void doStop(String stoparg)
Optional if Required
if |
CallbackJava
|
STOPARG (Optional) |
The string argument to the STOPMETHOD . The user should check for
null before using to avoid an exception. |
CallbackJava (blank)
|
NOTIFYMETHOD (Optional) |
Called in the keyed message mode
(see KEYED_MSGS (optional)) when a
new keyed message is placed in the driver queue. It has two calling parameters:
Example: public void doNotify(int count, String msgKey) |
Messageserver
|
TIMEMETHOD
|
If the driver is using a time in the NetConfig, then
this method is called as specified by the user in the driver setup.
The time that is specified can be seconds or can be from Advanced
Scheduling. Times and Advanced Scheduling uses the main protocol thread to trigger the events. If the invocation returns a non-zero value, then the driver is placed in the error state and this method does not invoke again. Example: public int doTimeEvent(String userArg) |
CallbackJava
|
TIMEMETHODARG (Optional) |
The string argument to the TIMEMETHOD . You should check for null
before using to avoid an exception. |
CallbackJava
|
SECONDS (Optional) |
The interval in seconds to invoke the time method. This overrides any entry in the NetConfig. | CallbackJava (commented out example) |
RUNMETHOD
|
Method that accepts outbound messages from the driver
for processing in the Java code. Only one message, with its
parameters, is transferred per invocation. The
invocation contains the user data, driver control, message type
Example: private ArrayList<String[]> doMsg(String userDataS, String driverCtlS, String msgTypeS, String msgS, String userArgS) The ToCloverleafLink and FromCloverleafLink classes implement this method privately, though ToCloverleafLink calls it doReply instead of doMsg because the name is flexible. Required unless |
Bounce
|
RUNARG (Optional) |
The string argument to the RUNMETHOD . The user should check for
null before using to avoid an exception. |
Bounce
MyCallback
|
LINKCLASS
|
Fully qualified name of the class that contains the
built-in methods used to invoke from Java into the driver. This should always be set to com/infor/cloverleaf/driver/ToCloverleafLink. The program sends messages into the system engine or queryies for keyed messages, unless the user has implemented their own version of ToCloverleafLink. |
CallbackJava
|
WRTOKMETHOD (Optional) |
Write OK method that
is called when the engine asks the driver if it can accept an
outbound message. If it returns non-zero, then the driver can accept a message to write outbound. If zero is returned, then the engine does write any waiting messages. This check for "ok to write" is part of all drivers. In a driver similar to the TCP Client driver, it may stop message attempts when the remote is not connected. It works the same in this driver. The default, if method is not defined, is it is "ok to write". Due to the nature of the driver connection, this can be called up to three times before a single write happens. These three calls happen only once every 10 seconds no matter how many messages are in queue. Invocations to this method do not count against a message’s Outbound Retries quantity. This is good to use when the driver is down. It does not keep decrementing the Retries quantity on all messages in queue when the driver is unavailable for the time being. Example: public boolean isWriteOk() |
Bounce
|
NO_KEY_SEND (Optional) |
In keyed message mode the value
sets what happens if an outbound message with no key arrives in the
driver. If the value is true, then the If it is false (default), then the arrival of the message in the driver is considered a serious error. |
Messageserver
|
MSG_MEM_MAX (Optional) |
In keyed message mode, this sets
the maximum memory use for "in memory" messages. When the limit is
reached, outbound messages that are stored in the recovery database
and retrieved as required. The value is in megabytes. The maximum permitted memory is 500 megabytes. The default is 0. |
Messageserver
|
KEYED_MSGS (optional) |
|
Messageserver
|
NO_JVM_DESTROY (Optional) |
If false (default), then when the thread exits the
JVM’s destroy method is called, which invokes any shutdown hooks. If true, then these shutdown hooks are not called. This exists because some applications do not seem to shut down correctly and the JVM destroy method never returns. It is better to stop the JVM by setting this "true". |
None |
DELAY (Optional) |
If the value is greater than zero, then the
engine/driver sleeps this number of seconds after starting the JVM.
It does this before anything is called or it is ready to run. This is used to give time to attach a Java debugger to the JVM. Before the delay starts, a message is written to the error log so that by watching that file you know when to do the attach. (Or set it for 20 seconds, start the thread, wait about 7 seconds and attach). Default 0 |
All |