public interface MessagingLayer
| Modifier and Type | Method and Description |
|---|---|
void |
connect(MessagingAccessLayer accessLayer)
Connects a MessagingAccessLayer object on the buses by using its name as a
unique identifier.
|
void |
disconnect(MessagingAccessLayer accessLayer)
Remove the entry point to the buses for the given MessagingAccessLayer.
|
<T extends BusMessage> |
sendMessage(String senderAgent,
Bus<T> bus,
T msg,
String... destination)
Sends a message on a bus for a given MessagingAccessLayer.
|
<T extends BusMessage> void sendMessage(String senderAgent, Bus<T> bus, T msg, String... destination) throws IOException
T - the type of message sent on the bussenderAgent - provides the name as the origin of the messagebus - the bus on which to send the messagemsg - the messagedestination - could be empty (means broadcast) of a single "" or a single"*" (again means broadcast)
or a list of destinations (DO NOT use things such as "*", "dest1", "dest2" : this will not work!)IOException - this could have a list of causes if some destinations fail.
as much as possible implementers will ensure that all correct destinationa are adressed:
if some fail it is not mandatory to report with a special subclass of IOexception that lists all destination
that failed.org.lsst.ccs.bus.DestinationsExceptionvoid connect(MessagingAccessLayer accessLayer) throws DuplicateAgentNameException, IOException
layer - The layer to be connected on the busesDuplicateAgentNameException - if the name of MessagingAccessLayer is not unique on the busesIOExceptionvoid disconnect(MessagingAccessLayer accessLayer)
layer - Copyright © 2015 LSST. All rights reserved.