Package com.yahoo.messagebus.network
Interface NetworkOwner
-
- All Known Implementing Classes:
MessageBus
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:
- Haavard Pettersen
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
deliverMessage(Message message, java.lang.String session)
All messages that arrive in the network layer is passed to its owner through this function.void
deliverReply(Reply reply, ReplyHandler handler)
All replies that arrive in the network layer is passed through this to unentangle it from the network thread.Protocol
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 Detail
-
getProtocol
Protocol 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. 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
void deliverMessage(Message message, java.lang.String session)
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.
-
deliverReply
void deliverReply(Reply reply, ReplyHandler handler)
All replies that arrive in the network layer is passed through this to unentangle it from the network thread.- Parameters:
reply
- The reply that just arrived from the network.handler
- The handler that is to receive the reply.
-
-