Package i5.las2peer.security
Interface MessageReceiver
- All Known Implementing Classes:
AgentImpl,AnonymousAgentImpl,BotAgent,EthereumAgent,EthereumGroupAgent,GroupAgentImpl,Mediator,MonitoringAgent,PassphraseAgentImpl,ServiceAgentImpl,TestAgent,UserAgentImpl
public interface MessageReceiver
-
Method Summary
Modifier and TypeMethodDescriptionIn case aMediatorimplements this interface, this method will return the id of the agent, this mediator is responsible for.voidnotifyRegistrationTo(Node node) Called by aNodeon registering a MessageReceiver to the network.voidCalled by aNodeon unregistering a MessageReceiver from the network.voidreceiveMessage(Message message, AgentContext c) Receives a message.
-
Method Details
-
receiveMessage
Receives a message. Will be called by aNodeimplementation on reception of messages that this receiver is responsible for.- Parameters:
message-c-- Throws:
MessageException
-
getResponsibleForAgentSafeId
String getResponsibleForAgentSafeId()In case aMediatorimplements this interface, this method will return the id of the agent, this mediator is responsible for. Otherwise it will just return theAgentImpls id.- Returns:
- id of the agent, this receiver is responsible for
-
notifyRegistrationTo
Called by aNodeon registering a MessageReceiver to the network.- Parameters:
node- the node this receiver has been registered to- Throws:
AgentException
-
notifyUnregister
void notifyUnregister()Called by aNodeon unregistering a MessageReceiver from the network.
-