Configuring and Running the Load Generator Utility

26-2 Oracle Complex Event Processing Developers Guide The Event Inspector service uses a common HTTP pub-sub channel and server to trace events. A trace event must have its binding attribute set to outbound. For more information, see: ■ Section 26.1.3, Event Inspector Event Types ■ Section 26.1.4, Event Inspector HTTP Publish-Subscribe Channel and Server ■ Section 26.4, Tracing Events

26.1.2 Injecting Events

Using the Event Inspector service, you can inject events into any stage of the EPN. The Event Inspector service uses a HTTP pub-sub channel and server to inject events. An injected event must have its binding attribute set to inbound. Using an Event Inspector client, you can inject: ■ A single, simple event by type, such as the StockTick event. In this case, the specific event property types that you can use depends on the client. ■ A single event directly to the HTTP pub-sub channel as a JSON-formatted character string. In this case, you can use any event property that JSON can represent. ■ Multiple events using a file that contains one or more JSON-formatted character strings. In this case, you can use any event property that JSON can represent. The Event Inspector service client will parse the file and inject all its JSON strings to the HTTP pub-sub channel. You can use the GSON Java library to help you convert Java objects to JSON format when creating your input file. For more information, see: ■ http:www.json.org ■ http:code.google.compgoogle-gson ■ Section 26.1.3, Event Inspector Event Types ■ Section 26.1.4, Event Inspector HTTP Publish-Subscribe Channel and Server ■ Section 26.3, Injecting Events

26.1.3 Event Inspector Event Types

All Oracle CEP event types are supported: JavaBean, Java Class, MapEvent, and tuple. The Event Inspector service converts events to the JavaScript Object Notation JSON format before publishing to the trace channel and you must inject events in JSON format. JSON-formatted events must conform to the structure that Example 26–1 shows. Table 26–1 lists the required attributes. Testing Applications With the Event Inspector 26-3 Example 26–1 Event Inspector JSON Event { event-type: myEventType, operation: insert, binding: outbound, value:{ firstname: Jane, lastname: Doe, phone: { code: 12345, number: office }, } } For more information, see: ■ http:www.json.org ■ Section 1.1.2, Oracle CEP Event Types ■ Section 26.1.1, Tracing Events ■ Section 26.1.2, Injecting Events

26.1.4 Event Inspector HTTP Publish-Subscribe Channel and Server

The Event Inspector service uses a dynamic HTTP publish-subscribe HTTP pub-sub channel not configured in config.xml that is named: SERVERNAMEAPPLICATIONNAMESTAGENAMEDIRECTION Where: ■ SERVERNAME : the name of the Oracle CEP server on which the Oracle CEP EPN stage is running. ■ APPLICATIONNAME : the name of the Oracle CEP application. ■ STAGENAME : the name of the EPN stage. ■ DIRECTION : one of either: – input: for event injection. Table 26–1 Event Inspector JSON Event Required Attributes Attribute Description event-type The name of the Oracle CEP event as you defined it in the application assembly file’s event-type-repository. operation Specify the type of event: ■ insert: insert event. ■ delete: delete event ■ update: update event ■ heartbeat: heartbeat event binding One of: ■ inbound: injected event. ■ outbound: trace event. value One or more JSON-formatted event properties as defined by the event-type.