# Uses of Class
madkit.kernel.AgentAddress

Packages that use AgentAddress
Package
Description
madkit.kernel
Provides classes that are fundamental to the design of MaDKit applications.
madkit.message
Contains subclasses of `Message` which could be easily reused.
madkit.message.hook
Contains message classes useful for monitoring MaDKit kernel events.

- ## Uses of AgentAddress in madkit.kernel

  Methods in madkit.kernel that return AgentAddress
  Modifier and Type
  Method
  Description
  `AgentAddress`
  AbstractAgent.`getAgentAddressIn(String community, String group, String role)`
  Agent's address at this CGR location.
  `AgentAddress`
  AbstractAgent.`getAgentWithRole(String community, String group, String role)`
  Returns an `AgentAddress` corresponding to an agent having this position in the organization.
  `AgentAddress`
  AbstractAgent.`getDistantAgentWithRole(String community, String group, String role, KernelAddress from)`
  `AgentAddress` corresponding to an agent having this position in the organization on a particular kernel.
  `AgentAddress`
  Message.`getReceiver()`
  Returns the agent address corresponding to the agent that receive this message.
  `AgentAddress`
  Message.`getSender()`
  Returns the agent address corresponding to the agent that sends this message.
  Methods in madkit.kernel that return types with arguments of type AgentAddress
  Modifier and Type
  Method
  Description
  `List<AgentAddress>`
  AbstractAgent.`getAgentsWithRole(String community, String group, String role)`
  A list containing other agents playing this role in the organization.
  `List<AgentAddress>`
  AbstractAgent.`getAgentsWithRole(String community, String group, String role, boolean callerIncluded)`
  A list containing all the agents playing this role in the organization.
  Methods in madkit.kernel with parameters of type AgentAddress
  Modifier and Type
  Method
  Description
  `boolean`
  AbstractAgent.`checkAgentAddress(AgentAddress agentAddress)`
  Checks if this agent address is still valid.
  `AbstractAgent.ReturnCode`
  AbstractAgent.`sendMessage(AgentAddress receiver, Message messageToSend)`
  Sends a message to an agent using an agent address.
  `Message`
  Agent.`sendMessageAndWaitForReply(AgentAddress receiver, Message messageToSend)`
  Sends a message and waits indefinitely for an answer to it.
  `Message`
  Agent.`sendMessageAndWaitForReply(AgentAddress receiver, Message messageToSend, int timeOutMilliSeconds)`
  Sends a message and waits for an answer to it.
  `AbstractAgent.ReturnCode`
  AbstractAgent.`sendMessageWithRole(AgentAddress receiver, Message message, String senderRole)`
  Sends a message, using an agent address, specifying explicitly the role used to send it.
  `Message`
  Agent.`sendMessageWithRoleAndWaitForReply(AgentAddress receiver, Message messageToSend, String senderRole)`
  Sends a message and waits for an answer to it.
  `Message`
  Agent.`sendMessageWithRoleAndWaitForReply(AgentAddress receiver, Message messageToSend, String senderRole, Integer timeOutMilliSeconds)`
  Sends a message and waits for an answer to it.

- ## Uses of AgentAddress in madkit.message

  Methods in madkit.message that return types with arguments of type AgentAddress
  Modifier and Type
  Method
  Description
  `List<AgentAddress>`
  ACLMessage.`getReceivers()`
  Return the list of receivers..
  Methods in madkit.message with parameters of type AgentAddress
  Modifier and Type
  Method
  Description
  `void`
  ACLMessage.`addReceiver(AgentAddress r)`
  Adds a value to `:receiver` slot.
  `void`
  ACLMessage.`addReplyTo(AgentAddress dest)`
  Adds a value to `:reply-to` slot.
  `boolean`
  ACLMessage.`removeReceiver(AgentAddress r)`
  Removes a value from `:receiver` slot.
  `boolean`
  ACLMessage.`removeReplyTo(AgentAddress dest)`
  Removes a value from `:reply_to` slot.

- ## Uses of AgentAddress in madkit.message.hook

  Methods in madkit.message.hook that return AgentAddress
  Modifier and Type
  Method
  Description
  `abstract AgentAddress`
  CGREvent.`getSourceAgent()`
  Returns the address of the agent that did the request.
  `AgentAddress`
  MessageEvent.`getSourceAgent()`
  `AgentAddress`
  OrganizationEvent.`getSourceAgent()`
  Constructors in madkit.message.hook with parameters of type AgentAddress
  Modifier
  Constructor
  Description
  ``
  `OrganizationEvent(HookMessage.AgentActionEvent agentAction, AgentAddress source)`