1 package org.codehaus.xfire.service.event;
2
3 import java.util.EventObject;
4
5 import org.codehaus.xfire.service.Service;
6 import org.codehaus.xfire.service.ServiceRegistry;
7
8 /***
9 * An <code>Event</code> object that provides information about the source of a service endpoint-related event.
10 * <code>RegistrationEvent</code> objects are generated when an <code>ServiceEndpoint</code> is registered or
11 * unregistered on a <code>ServiceEndpointRegistry</code>.
12 *
13 * @author <a href="mailto:poutsma@mac.com">Arjen Poutsma</a>
14 * @see RegistrationEventListener
15 * @see Service
16 * @see org.codehaus.xfire.service.ServiceRegistry
17 */
18 public class RegistrationEvent
19 extends EventObject
20 {
21 private Service endpoint;
22
23 /***
24 * Initializes a <code>RegistrationEvent</code> object initialized with the given
25 * <code>ServiceEndpointRegistry</code> and <code>ServiceEndpoint</code> object.
26 *
27 * @param source the endpoint registry that is the source of the event
28 * @param endpoint the endpoint that has been registered
29 */
30 public RegistrationEvent(ServiceRegistry source, Service endpoint)
31 {
32 super(source);
33 this.endpoint = endpoint;
34 }
35
36 /***
37 * Returns the <code>ServiceEndpoint</code> for this <code>RegistrationEvent</code>.
38 *
39 * @return the endpoint
40 */
41 public Service getEndpoint()
42 {
43 return endpoint;
44 }
45 }