WebSphere brand IBM WebSphere Premises Server, Version 6.1.x

Creating a Reusable Event Monitor user interface

This topic provides information on how to create a user interface using the event monitor component.

About this task

To create the user interface, add the following to the JSP file for the user interface:

<SCRIPT language="JavaScript" src="ajax.js"></SCRIPT>
<SCRIPT language="JavaScript" src="ajaxEventMonitor.js"></SCRIPT>
<SCRIPT language="JavaScript" src="jsonEventProcessor.js"></SCRIPT>

The ajax.js library provides basic AJAX support. The ajaxEventMonitor.js library provides Reusable Event Monitor AJAX framework such as calling the Reusable Event Monitor servlet, calling the user interface's call-back methods, and manipulating the refresh rate. The jsonEventProcessor.js library provides functions to inspect the returned events. The user interface does not call any functions from the ajax.js library. These functions are called from within the framework.

Provide the following functions in the JSP file:
monitorRefreshPage(jsonEventsObj)
Callback method to provide custom output
monitorError()
Callback method to display a custom error message
The following functions are provided in the ajaxEventMonitor.js library:
monitorSetMessageSelector(messageSelector)
Sets the monitor message selector. Default value is ibmse like '%'.
monitorSetRefreshInterval(refreshInterval)
Sets the monitor refresh interval. Default value is 1000.
monitorStartRefresh()
Starts the monitor refresh timer
monitorStopRefresh()
Stops the monitor refresh timer
The following functions are provided in the jsonEventProcessor.js library:
getEvent(jsonObj, index)
Returns the event by index in the jsonObj
getEventCount(jsonObj)
Returns the event count in the jsonObj
getEventGroup(jsonEventObj)
Returns the eventGroup from the event payload
getGroup(jsonGroup, name)
Returns the named subgroup from the group
getGroupAttributeValue(jsonGroupObj, attrName)
Returns the attribute value for the attribute name in the group
getHeader(jsonEventObj)
Returns the event header
getHeaderAttributeValue(jsonEventObj, attrName)
Returns the attribute value for the attribute name in the event header
getPayload(jsonEventObj)
Returns the even payload
getPayloadClassName(jsonEventObj)
Returns the event payloadClassName
getPayloadData(jsonEventObj)
Returns the payload data specific to the eventType
getPayloadMetaData(jsonEventObj)
Returns the event payloadMetaData
getPayloadMetaDataAttributeValue(jsonEventObj, attrName)
Returns the attribute value for the attribute name in the event payloadMetaData
isEventAlertDebug(jsonEventObj)
Returns true if the jsonEventObj is a debug alert event
isEventAlertError(jsonEventObj)
Returns true if the jsonEventObj is an error alert event
isEventAlertInfo(jsonEventObj)
Returns true if the jsonEventObj is an info alert event
isEventAlertWarning(jsonEventObj)
Returns true if the jsonEventObj is a warning alert event
isEventApplicationPing(jsonEventObj)
Returns true if the jsonEventObj is an application ping event
isEventApplicationPong(jsonEventObj)
Returns true if the jsonEventObj is an application pong event
isEventHeartbeat(jsonEventObj)
Returns true if the jsonEventObj is a heartbeat event
isEventPassiveRFIDAggregatedTagRead(jsonEventObj)
Returns true if the jsonEventObj is a PassiveRFIDAggregatedTagRead event
isEventPassiveRFIDTagRead(jsonEventObj)
Returns true if the jsonEventObj is a PassiveRFIDAggregatedTagRead event
isEventPortalActivation(jsonEventObj)
Returns true if the jsonEventObj is a portal activation event
isEventPortalReport(jsonEventObj)
Returns true if the jsonEventObj is a portal report event
isEventReload(jsonEventObj)
returns true if the jsonEventObj is a reload event
isEventRestart(jsonEventObj)
Returns true if the jsonEventObj is a restart event
isEventTagReportFeedback(jsonEventObj)
Returns true if the jsonEventObj is a tag report feedback event
monitorSetMessageSelector(messageSelector)
Sets the monitor message selector. The default is ibmse like '%'
monitorSetRefreshInterval(refreshInterval)
Sets the monitor refresh interval. The default is 1000.
monitorStartRefresh()
Starts the monitor refresh timer
monitorStopRefresh()
Stops the monitor refresh timer

Library | Support | Terms of use

(c) Copyright IBM Corporation 2004, 2008. All rights reserved.
U.S. Government Users Restricted Rights - Use, duplication or disclosure restricted by GSA ADP Schedule Contract with IBM Corp.