Package notification

Interface CommunicationStrategy

All Known Implementing Classes:
ComNetAdaptator, MailCommunication, SmsCommunication, XmessCommunication

interface CommunicationStrategy
Interface for all communication modes. It offers only one abstract method.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    envoyer(String clientName, String adresse, String message)
    The concrete implementations of this method in subclasses will allow sending a message in the correct mode to a client identified by their name and address.
    default boolean
    isCorrect(String adresse)
    The concrete implementation of this method will set the tests for the different adress types
  • Method Details

    • envoyer

      void envoyer(String clientName, String adresse, String message)
      The concrete implementations of this method in subclasses will allow sending a message in the correct mode to a client identified by their name and address.
      Parameters:
      clientName - : The name of the client.
      adresse - : The destination address for the client.
      message - : The message to be sent.
    • isCorrect

      default boolean isCorrect(String adresse)
      The concrete implementation of this method will set the tests for the different adress types
      Parameters:
      adresse - : The adresse to check
      Returns:
      true if the adress is correct otherwise false