Registering for events can occur before or after login. In the example code, EventExample.java, there are three key methods used for defining event registration and starting event notification. These methods are used in the startEventConsumer()method of the example.
In the startEventConsumer() method, the example code leverages several methods from the abstract class com.enterworks.shared.event.SessionEventConsumer in order to register for events on the desired EPX server and to start the event subscriber for event delivery. With the method setEventsServerProfile(), the example defines the unique identifier of the EPX server that it will subscribe for events against. Using the method setEventRegistration(), the example defines the event registrations it is interested in. Finally, the event notification subscriber is started by calling the start() method inherited from the abstract class.