1 package org.djutils.event;
2
3 import java.io.Serializable;
4
5 /**
6 * This functional interface provides a sourceId to an EventProducer.
7 * <p>
8 * Copyright (c) 2020-2022 Delft University of Technology, PO Box 5, 2600 AA, Delft, the Netherlands. All rights reserved. <br>
9 * BSD-style license. See <a href="https://djutils.org/docs/license.html">DJUTILS License</a>.
10 * </p>
11 * @author <a href="https://www.tudelft.nl/averbraeck" target="_blank">Alexander Verbraeck</a>
12 */
13 public interface IdProvider extends Serializable
14 {
15 /**
16 * Return an id that identifies the EventProducer, e.g., its toString(), or a unique name by which the EventListener can
17 * identify the sender of an event.
18 * @return Serializable; an id that identifies the EventProducer
19 */
20 Serializable id();
21
22 }