Package notification
Class SmsCommunication
java.lang.Object
notification.SmsCommunication
- All Implemented Interfaces:
CommunicationStrategy
This is a subclass of the CommunicationStrategy class.
It overrides the envoyer method for the "SMS" mode.
This method produces a simple display output.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidMethod for displaying an alert message sent to a client at a given SMS address.booleanThis method provide a simple test for the adress and throw errors to prevent app crashing because of non-reacheable adress
-
Constructor Details
-
SmsCommunication
SmsCommunication()
-
-
Method Details
-
envoyer
Method for displaying an alert message sent to a client at a given SMS address.- Specified by:
envoyerin interfaceCommunicationStrategy- Parameters:
clientName- : The name of the client.adresse- : The client's address.message- : The message sent.
-
isCorrect
This method provide a simple test for the adress and throw errors to prevent app crashing because of non-reacheable adress- Specified by:
isCorrectin interfaceCommunicationStrategy- Parameters:
adresse- : The adress to check- Returns:
- true if the adress is correct else false
-