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 aMediator
implements this interface, this method will return the id of the agent, this mediator is responsible for.void
notifyRegistrationTo
(Node node) Called by aNode
on registering a MessageReceiver to the network.void
Called by aNode
on unregistering a MessageReceiver from the network.void
receiveMessage
(Message message, AgentContext c) Receives a message.
-
Method Details
-
receiveMessage
Receives a message. Will be called by aNode
implementation on reception of messages that this receiver is responsible for.- Parameters:
message
-c
-- Throws:
MessageException
-
getResponsibleForAgentSafeId
String getResponsibleForAgentSafeId()In case aMediator
implements this interface, this method will return the id of the agent, this mediator is responsible for. Otherwise it will just return theAgentImpl
s id.- Returns:
- id of the agent, this receiver is responsible for
-
notifyRegistrationTo
Called by aNode
on registering a MessageReceiver to the network.- Parameters:
node
- the node this receiver has been registered to- Throws:
AgentException
-
notifyUnregister
void notifyUnregister()Called by aNode
on unregistering a MessageReceiver from the network.
-