The documentation set for this product strives to use bias-free language. For the purposes of this documentation set, bias-free is defined as language that does not imply discrimination based on age, disability, gender, racial identity, ethnic identity, sexual orientation, socioeconomic status, and intersectionality. Exceptions may be present in the documentation due to language that is hardcoded in the user interfaces of the product software, language used based on RFP documentation, or language that is used by a referenced third-party product. Learn more about how Cisco is using Inclusive Language.
This chapter provides an overview of the events that the RDU and DPEs provide, and explains how to register and handle these events.
Using the Prime Cable Provisioning RDU Java client library, you can register for numerous types of events, which are sourced from the RDU and the DPEs. The events that are sourced include:
Events are registered by implementing the appropriate event listener interface. The resulting class is then registered from the PACE connection along with a qualifier.
The qualifier further filters the events that the client receives. If the client wants to receive all events, you can use the QualifyAll qualifier. For an object that can be modified in the RDU, a corresponding event is available in the API. For a complete list of available events, see the package.com.cisco.provisioning.cpe.events section in the API Javadocs.
Each event class has a specific qualifier with methods that allow you to refine the events that are to be delivered to the registered listener.
Note You can use only the qualifiers that the RDU Java client library provides. Prime Cable Provisioning does not support implementing your own qualifiers.
For example, to handle all asynchronous operation events that are fired when an on-connect device operation completes:
Step 1 Create the listener class using:
Step 2 Register the created listener class using the PACE connection:
Note If the connection breaks after the listener is registered, you do not have to reregister the listener. The RDU Java client library automatically registers the listener again.
Step 3 Receive the events. The listener class can be executed when the event arrives.
Step 4 Remove the listener that is created.
You can use any of the following methods to remove a listener:
– Where the implementing class can specify if the listener is one shot. This means that the listener receive only the first qualified event and is removed after receiving its first event.
– By using the PACE connection with an explicit remove listener call.
To explicitly remove the event listener that was created in Step 1:
When an event is delivered to your registered listener, you must execute any logic that is required. However, because the thread delivering the event does so from the Prime Cable Provisioning RDU Java client library, you must exercise caution.
When running any logic for handling events:
The RDU Java client library receives events when it maintains a connection with the RDU. If the connection is lost (for example, because of a network crash), events may be lost. You cannot retrieve missed events.
You may also lose events that are generated from the DPE. For example, an interruption in the connection from the DPE to the RDU makes it impossible for the DPE to forward the events to the RDU, and from there, to the client.
For more information on how the RDU Java client library communicates with the RDU, see: