• 沒有找到結果。

Common Logging Event Publisher Microagent

在文檔中 TIBCO Hawk ActiveMatrix (頁 26-32)

The Common Logging Event Publisher Microagent

(com.tibco.hawk.commonlogging.event.CLEventPublisher) publishes events from TIBCO Hawk using the TIBCO Common Logging in the Base Event Format (BEF) or Common Base Event (CBE).

Create the Event Definition configuration file with the following definitions:

What events have to be published (Event Output).

Event Data Source (from where to get and collect the events).

Where to publish events (Common Logging Configuration)

How to publish (Event Subscribe).

Sample event definition is available in the folder TIBCO_HOME/amx/3.3/hkam/templates/hma/cl. CLEvent Publisher Microagent Configuration

For configuration of CLEventPublsiher Microagent, refer to the readme.txt available in TIBCO_HOME/amx/3.3/hkam/templates/hma/cl.

Methods

The methods in the microagent allows to start or stop event publisher and returns event publisher's information.

startPublisher

The startPublisher method starts the event publisher to start publishing events from the TIBCO Hawk based on the Event Publisher Description defined in the Event Definitions file.

Type

Synchronous, IMPACT_ACTION.

Arguments

Name Type Description

Event Publisher Name String The Event Publisher Name.

Returns None.

stopPublisher

The stopPublisher method stops the Event Publisher.

Type

Synchronous, IMPACT_ACTION.

Arguments

Name Type Description

Event PublisherName String The Event Publisher Name.

Returns None.

startAllPublishers

The startAllPublishers method starts all valid and not started Event Publishers.

Type

Synchronous, IMPACT_ACTION.

Arguments None.

Returns None.

stopAllPublishers

The stopAllPublishers method stops all started Event Publishers.

Type

Synchronous, IMPACT_ACTION.

Arguments None.

Returns None.

getEventPublisherInfo

The getEventPublisherInfo method returns the Event Publisher information by Event Publisher name.

If the event publisher name argument is blank then all event publishers are returned. On specifying the event publisher name argument, it serves as a regular expression used to filter the event publisher returned.

Type

Synchronous, IMPACT_INFO.

Arguments

Name Type Description

Event Publisher Name String The Event Publisher Name.

Returns

Name Type Description

Name String Name of the Event Publisher.

Status String The current status of the event publisher (started/

stop).

Auto Start String The flag to indicate event publisher is auto start configured.

Interval Time String The interval time to publish events.

Subscribe On Event Source

Name String The name of the Event Source on the Event

Publisher Subscribe.

CL Logger Name String The TIBCO Common Logging logger name.

CL Extended Model Name String The TIBCO Common Logging Extended Model name.

CL Extended Model Package

Name String The TIBCO Common Logging Extended Model

package name.

getEventDataSourceDetails

The getEventDataSourceDetails method returns the event data source details.

Type

Synchronous, IMPACT_INFO.

Arguments None.

Returns

Name Type Description

EventSourceId String ID of the Event Source.

Microagent String The name of the TIBCO Hawk microagent.

Method String The name of the microagent method.

Name Type Description

Status String The status of the event source.

Valid - Whether the microagent available method name is valid.

Invalid - Whether the microagent is available and/or not available and/or method is not valid.

Description/Help String Description/Help of the microagent method or reason for its invalid status.

reloadEventDefinitions

The reloadEventDefinitions method stops all started event publishers, reloads event definitions from the configuration file and starts all valid event publishers with an auto start.

You can make changes in the configuration file and reflect changes without restarting the TIBCO Hawk Agent.

xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:eventdef="http://

xsd.tns.tibco.com/hawk/cleventpublisher/eventdef">

<xsd:annotation>

<xsd:documentation>Provide details of Event Publisher</xsd:documentation>

</xsd:annotation>

<xsd:complexType name="EventSourceType">

<xsd:attribute name="id" type="xsd:string" use="required"></xsd:attribute>

<xsd:attribute name="methodName" type="xsd:string" use="required"></

xsd:attribute>

<xsd:attribute name="microAgentName" type="xsd:string" use="required"></

xsd:attribute>

</xsd:complexType>

<xsd:complexType name="EventDataSourceType">

<xsd:sequence>

<xsd:element name="EventSource" type="eventdef:EventSourceType"

minOccurs="1" maxOccurs="unbounded"></xsd:element>

</xsd:sequence>

</xsd:complexType>

<xsd:complexType name="EventDefinitionsType">

<xsd:sequence>

<xsd:element name="EventPublishers" type="eventdef:EventPublishersType"

minOccurs="1" maxOccurs="1">

</xsd:element>

<xsd:element name="EventDataSource" type="eventdef:EventDataSourceType"

minOccurs="1" maxOccurs="1"></xsd:element>

<xsd:complexType name="EventPublisherType">

<xsd:sequence>

<xsd:element name="CommonLoggingConfigRef"

type="eventdef:CommonLoggingConfigRefType" minOccurs="1"

maxOccurs="1">

type="eventdef:EventOutputType" minOccurs="1" maxOccurs="1">

</xsd:element>

<xsd:element name="EventSubscribe"

type="eventdef:EventSubscribeType" minOccurs="1" maxOccurs="1">

</xsd:element>

</xsd:sequence>

<xsd:attribute name="name" type="xsd:string" use="required"></xsd:attribute>

<xsd:attribute name="validateAtStartup" type="xsd:boolean" use="optional"

default="false"></xsd:attribute>

</xsd:complexType>

<xsd:complexType name="CommonLoggingConfigType">

<xsd:annotation>

<xsd:documentation>Common Logging details.</xsd:documentation>

</xsd:annotation>

<xsd:sequence>

<xsd:element name="ExtendedModel" type="eventdef:ExtendedModelType"

minOccurs="1" maxOccurs="1"></xsd:element>

</xsd:sequence>

<xsd:attribute name="id" type="xsd:string" use="required"></xsd:attribute>

<xsd:attribute name="loggerName" type="xsd:string" use="required"></

xsd:attribute>

</xsd:complexType>

<xsd:element name="EventDefinitions" type="eventdef:EventDefinitionsType"></

xsd:element>

<xsd:complexType name="EventDataSourceRefType">

<xsd:sequence>

<xsd:element name="EventSourceRef" type="eventdef:EventSourceRefType"

minOccurs="1" maxOccurs="unbounded"></xsd:element>

</xsd:sequence>

</xsd:complexType>

<xsd:complexType name="EventSourceRefType">

<xsd:sequence>

<xsd:element name="InputParameters" type="eventdef:InputParametersType"

minOccurs="0" maxOccurs="1"></xsd:element>

<xsd:element name="EventCorrelation"

type="eventdef:EventCorrelationType" minOccurs="0" maxOccurs="1"></xsd:element>

</xsd:sequence>

<xsd:attribute name="ref" type="xsd:string" use="required"></xsd:attribute>

</xsd:complexType>

<xsd:complexType name="InputParametersType">

<xsd:sequence>

<xsd:element name="InputParameter" type="eventdef:InputParameterType"

minOccurs="1" maxOccurs="unbounded"></xsd:element>

</xsd:sequence>

</xsd:complexType>

<xsd:complexType name="InputParameterType">

<xsd:simpleContent>

<xsd:extension base="xsd:string">

<xsd:attribute name="name" type="xsd:string" use="required"></

xsd:attribute>

</xsd:extension>

</xsd:complexType>

<xsd:complexType name="EventOutputType">

<xsd:sequence>

<xsd:element name="EventElements" type="eventdef:EventElementsType"

minOccurs="1" maxOccurs="1"></xsd:element>

</xsd:sequence>

</xsd:complexType>

<xsd:complexType name="EventElementsType">

<xsd:choice>

<xsd:element name="EventElement"

type="eventdef:EventElementType" minOccurs="0"

maxOccurs="unbounded">

</xsd:element>

<xsd:element name="eventSourceRefs" type="xsd:string" minOccurs="1"

maxOccurs="1"></xsd:element>

</xsd:choice>

</xsd:complexType>

<xsd:complexType name="EventElementType">

<xsd:attribute name="source" type="xsd:string" use="required"></

xsd:attribute>

<xsd:attribute name="output" type="xsd:string" use="optional"></

xsd:attribute>

</xsd:complexType>

<xsd:complexType name="EventSubscribeType">

<xsd:sequence>

<xsd:element name="IntervalTime" type="xsd:int"

minOccurs="0" maxOccurs="1" nillable="false">

</xsd:element>

</xsd:sequence>

<xsd:attribute name="sourceEventId" type="xsd:string" use="required"></

xsd:attribute>

<xsd:attribute name="autoStart" type="xsd:boolean" use="optional"

default="false"></xsd:attribute>

</xsd:complexType>

<xsd:complexType name="FilterType">

<xsd:attribute name="identifier" type="xsd:string" use="required"></

xsd:attribute>

<xsd:attribute name="operator" use="required">

<xsd:simpleType>

<xsd:complexType name="LoggerType">

<xsd:attribute name="name" type="xsd:string" use="required"></xsd:attribute>

<xsd:attribute name="configFile" type="xsd:string" use="optional"></

xsd:attribute>

</xsd:complexType>

<xsd:complexType name="ExtendedModelType">

<xsd:sequence>

<xsd:element name="Classpath" type="eventdef:ClasspathType"

minOccurs="0" maxOccurs="1"></xsd:element>

</xsd:sequence>

<xsd:attribute name="name" type="xsd:string" use="required"></xsd:attribute>

<xsd:attribute name="packageName" type="xsd:string"

use="required">

</xsd:attribute>

</xsd:complexType>

<xsd:complexType name="EventPublishersType">

<xsd:sequence>

<xsd:element name="EventPublisher" type="eventdef:EventPublisherType"

minOccurs="1" maxOccurs="unbounded"></xsd:element>

</xsd:sequence>

</xsd:complexType>

<xsd:complexType name="CommonLoggingConfigsType">

<xsd:sequence>

<xsd:element name="CommonLoggingConfig"

type="eventdef:CommonLoggingConfigType" minOccurs="1" maxOccurs="unbounded">

</xsd:element>

</xsd:sequence>

<xsd:attribute name="logConfigFile" type="xsd:string" use="required"></

xsd:attribute>

</xsd:complexType>

<xsd:complexType name="CommonLoggingConfigRefType">

<xsd:attribute name="ref" type="xsd:string" use="required"></xsd:attribute>

</xsd:complexType>

<xsd:complexType name="EventCorrelationType">

<xsd:annotation>

<xsd:complexType name="ClasspathType">

<xsd:sequence>

<xsd:element name="path" type="xsd:string" minOccurs="1"

maxOccurs="unbounded"></xsd:element>

</xsd:sequence>

</xsd:complexType>

</xsd:schema>

在文檔中 TIBCO Hawk ActiveMatrix (頁 26-32)

相關文件