Package notification
Class CommunicationFactory
java.lang.Object
notification.CommunicationFactory
This class is responsible for instantiating the correct version of the object in charge of transmission according to a certain mode.
It does thanks to a single class method.
This class cannot be instantiated.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate voidPrivate constructor that does nothing to prevent instantiation.static CommunicationStrategyMethod that selects the appropriate object to instantiate based on the transmission mode.
-
Constructor Details
-
CommunicationFactory
CommunicationFactory()
-
-
Method Details
-
CommunicationFactory
private void CommunicationFactory()Private constructor that does nothing to prevent instantiation. -
create
Method that selects the appropriate object to instantiate based on the transmission mode.- Parameters:
mode- : The transmission mode.- Returns:
- the object responsible for transmission according to the mode, otherwise null.
-