Package com.yahoo.messagebus.network
Interface NetworkOwner
- All Known Implementing Classes:
MessageBus
,NetworkMultiplexer
public interface NetworkOwner
A network owner is the object that instantiates and uses a network. The API to send messages
across the network is part of the Network interface, whereas this interface exposes the required
functionality of a network owner to be able to decode and deliver incoming messages.
- Author:
- havardpe
-
Method Summary
Modifier and TypeMethodDescriptionvoid
deliverMessage
(Message message, String session) All messages that arrive in the network layer is passed to its owner through this function.getProtocol
(com.yahoo.text.Utf8Array name) All messages are sent across the network with its accompanying protocol name so that it can be decoded at the receiving end.
-
Method Details
-
getProtocol
All messages are sent across the network with its accompanying protocol name so that it can be decoded at the receiving end. The network queries its owner through this function to resolve the protocol from its name.- Parameters:
name
- The name of the protocol to return.- Returns:
- The named protocol.
-
deliverMessage
All messages that arrive in the network layer is passed to its owner through this function.- Parameters:
message
- The message that just arrived from the network.session
- The name of the session that is the recipient of the request.
-