Implementing the Event Listener
Procedure
-
Employ the Traffic Event Listener interface (introduced in
Event Listener API) as shown in the following example:
package com.company.extension; public class CustomProcessor implements TrafficEventListener{ public void handleEvent(TrafficEvent event){ //write your custom code here } }
-
Annotate your code to ensure that the processor is identified correctly for callbacks on events related to the specific endpoints it is written to handle:
@ProcessorBean(enabled=true, name=”com.company.extension.CustomProcessor”, immediate=true) public class CustomProcessor implements TrafficEventListener{ public void handleEvent(TrafficEvent event){ //write your custom code here } }
Copyright © 2022. Cloud Software Group, Inc. All Rights Reserved.