1 package org.opentrafficsim.sim0mq.publisher;
2
3 import org.djutils.event.EventProducer;
4 import org.djutils.metadata.MetaData;
5 import org.djutils.serialization.SerializationException;
6 import org.sim0mq.Sim0MQException;
7
8 /**
9 * Object that can find the EventProducer object for an address.
10 */
11 public interface LookupEventProducer
12 {
13 /**
14 * Find the EventProducerInterface with the given address.
15 * @param address Object[]; the address
16 * @param returnWrapper ReturnWrapper; to be used to send back complaints about bad addresses, etc.
17 * @return EventProducerInterface; can be null in case the address is (no longer) valid
18 * @throws SerializationException when an error occurs while serializing an error response
19 * @throws Sim0MQException when an error occurs while serializing an error response
20 */
21 EventProducer lookup(Object[] address, ReturnWrapper returnWrapper) throws Sim0MQException, SerializationException;
22
23 /**
24 * Return a MetaData object that can be used to verify the correctness of an address for the <code>lookup</code> method.
25 * @return MetaData; to be used to verify the correctness of an address for the <code>lookup</code> method
26 */
27 MetaData getAddressMetaData();
28
29 }