11.2. Implementing event handlers
Some handlers have a parameter ‘e’ of type ServiceEndpointEvent. Its only member of our interest is the getEndpoint method with the following signature:
public ServiceEndpoint getEndpoint()
The method returns an endpoint, which is of type ServiceEndpoint, that invoked the handler. In such case, your application gets the updated object, that caused an event to be raised, from the endpoint as the handler’s parameter e does not contain it.
Some of the handlers associated with Users Membership have a parameter e of type MembershipUserEvent derived from ServiceEndpointEvent. Along with a derived method getEndpoint, it has a field user of type MembershipUser. This is a membership user that caused the event to be raised by the platform.
Let’s look at how to work with each of the event handlers declared by the ServiceEventListener interface.