BBjEventData

Description

In BBj 17.0 and higher, BBjEventData provides access to the data generated by a configured event handler.

Creation

BBjAPI > BBjEventData

BBjFileSystem may be obtained through the BBjAPI object method:

Return Value

Method

BBjEventData

getEventData()

Methods of BBjEventData

Return Value

Method

string

getEventId()

string

getEventDetail()

string

getEventName()

BBjNumber

getEventType()

string

getEventTypeName()

Remarks

The BBjEventData is available only during execution of an event handler program.

NOTE: setXXX() methods also exist on the BBjEventData object. These methods are used internally by BBjServices to set values of the object. Calling these methods on an instance returned from a call to getEventData() has no effect on any functionality.

Constants

The following constants are returned from the getEventType() method (see Methods of BBjEvent Data above). The constant is a general reason for the triggered event. See getEventDetail() for more information regarding the specifics of the event.

1

REPLICATION_ADD_BAD_FILE

Occurs when a problematic file is added to the “bad files” list.

2

REPLICATION_RESET_BAD_FILE

Occurs when a files in the “bad files” list is resolved and removed from the list.

3

REPLICATION_ENABLED_STATE

The state of the replication job was changed from enabled/disabled.

4

REPLICATION_RECOPY_STATE

The state of the recopy feature was enabled/disabled.

5

REPLICATION_INIT_FILE

The replication job created a file on the target.

6

REPLICATION_FALL_BEHIND

The replication job fell behind processing of operation by the specified event handler threshold.

7

REPLICATION_TARGET_CONNECTION

The replication job failed to connect to the target machine.

8

REPLICATION_RECOPY_INITIATED

The replication job determined it needed to recopy a file from the source to the target in its entirety.

9

REPLICATION_ERROR_OCCURRED

An error occurred in the replication job.

20

MEMORY_OUT_OF_MEMORY

BBjServices received an out of memory error.

21

MEMORY_FREE_MEMORY_TOO_LOW

The free memory in the JVM running BBjServices dropped below the specified threshold in the event handler.

40

DISK_FREE_DISK_SPACE_LOW

The free disk space dropped below the specified threshold in the event handler.

60

PROCESS_COUNT

The current number of running BBj processes exceeded the specified threshold in the event handler.

61

PROCESS_NOT_RUNNING

Placeholder for future feature.

62

PROCESS_HUNG

Placeholder for future feature.

80

SECURITY_INVALID_PASSWORD

Placeholder for future feature.

100

LICENSE_CHECKOUT_FAILED

BBjServices attempted to checkout a license and was unable to do so.

Example

rem 'Get the event data object

data! = BBjAPI().getEventData()

rem 'Log the event type and name to sysout
System.out.println(data!.getEventTypeName() + “ -- “ + data!.getEventName())

See Also

BBjAPI

BBjAPI::getEventData

See the BBj Object Diagram for an illustration of the relationship between BBj Objects.