Class RoomCommunicationService

Object
RoomCommunicationService

public class RoomCommunicationService extends Object
Author:
maartenl
  • Method Details

    • sendMessage

      public void sendMessage(Person aPerson, String aMessage) throws MudException
      character communication method to everyone in the room. The message is parsed, based on who is sending the message.
      Parameters:
      aPerson - the person who is the source of the message.
      aMessage - the message
      Throws:
      MudException
      See Also:
      • invalid reference
        Person#writeMessage(mmud.database.entities.characters.Person, java.lang.String)
    • sendMessage

      public void sendMessage(Person aPerson, Person aSecondPerson, String aMessage) throws MudException
      character communication method to everyone in the room. The first person is the source of the message. The second person is the target of the message. The message is parsed based on the source and target. Will also be sent to the person doing the communicatin' and the target.
      Parameters:
      aPerson - the person doing the communicatin'.
      aSecondPerson - the person communicated to.
      aMessage - the message to be sent
      Throws:
      MudException - if the room is not correct
      See Also:
      • invalid reference
        Person#writeMessage(mmud.database.entities.characters.Person, mmud.database.entities.characters.Person, java.lang.String)
    • sendMessage

      public void sendMessage(String aMessage) throws MudException
      room communication method to everyone in the room. The message is not parsed. Bear in mind that this method should only be used for communication about environmental issues. If the communication originates from a User/Person, you should use sendMessage(mmud.database.entities.characters.Person, java.lang.String). Otherwise the Ignore functionality will be omitted.
      Parameters:
      aMessage - the message
      Throws:
      MudException - if the room is not correct
      See Also:
      • invalid reference
        Person#writeMessage(java.lang.String)
    • sendMessageExcl

      public void sendMessageExcl(Person aPerson, Person aSecondPerson, String aMessage) throws MudException
      character communication method to everyone in the room except to the two persons mentioned in the header. The message is parsed based on the source and target.
      Parameters:
      aPerson - the person doing the communicatin'.
      aSecondPerson - the person communicated to.
      aMessage - the message to be sent
      Throws:
      MudException - if the room is not correct
      See Also:
      • invalid reference
        Person#writeMessage(mmud.database.entities.characters.Person, mmud.database.entities.characters.Person, java.lang.String)
    • sendMessageExcl

      public void sendMessageExcl(Person aPerson, String aMessage) throws MudException
      character communication method to everyone in the room excluded the person mentioned in the parameters. The message is parsed, based on who is sending the message.
      Parameters:
      aPerson - the person who is the source of the message.
      aMessage - the message
      Throws:
      MudException - if the room is not correct
      See Also:
      • invalid reference
        Person#writeMessage(mmud.database.entities.characters.Person, java.lang.String)