Package notification

Class ComNetAdaptator

java.lang.Object
notification.ComNetAdaptator
All Implemented Interfaces:
CommunicationStrategy

class ComNetAdaptator extends Object implements CommunicationStrategy
This is a subclass of the CommunicationStrategy class. It overrides the envoyer method for the "CHAT" mode. This method produces a simple display output and call the send method from ComNet
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    private utilitaire.ComNet
    Attribut that contains the ComNet object from utilitaire
  • Constructor Summary

    Constructors
    Constructor
    Description
    Constructor for the class that initialize attribut theCom to a ComNet object
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    envoyer(String clientName, String adresse, String message)
    Method for displaying an alert message sent to a client at a given CHAT address and send it throught ComNet.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface notification.CommunicationStrategy

    isCorrect
  • Field Details

    • theCom

      private utilitaire.ComNet theCom
      Attribut that contains the ComNet object from utilitaire
  • Constructor Details

    • ComNetAdaptator

      public ComNetAdaptator()
      Constructor for the class that initialize attribut theCom to a ComNet object
  • Method Details

    • envoyer

      public void envoyer(String clientName, String adresse, String message)
      Method for displaying an alert message sent to a client at a given CHAT address and send it throught ComNet.
      Specified by:
      envoyer in interface CommunicationStrategy
      Parameters:
      clientName - : The name of the client.
      adresse - : The client's address.
      message - : The message sent.