cz.muni.fi.pb162.task2
Class DeliveryServiceImpl

java.lang.Object
  extended by cz.muni.fi.pb162.task2.DeliveryServiceImpl
All Implemented Interfaces:
DeliveryService

public class DeliveryServiceImpl
extends Object
implements DeliveryService

Implements the DeliveryService interface

Version:
06 11 2009
Author:
Tomas Sedmik, xsedmik@fi.muni.cz

Constructor Summary
DeliveryServiceImpl()
          Constructor creates default delivery service via standart mail
 
Method Summary
 void sendMessage(Message msg)
          Simulates message delivery.
 void setExpressMailMessaging()
          Sets messaging type to express mail.
 void setPigeonMessaging(int fitness, int distance)
          Sets messaging type to pigeon.
 void setStandardMailMessaging()
          Sets messaging type to standard mail.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DeliveryServiceImpl

public DeliveryServiceImpl()
Constructor creates default delivery service via standart mail

Method Detail

sendMessage

public void sendMessage(Message msg)
Simulates message delivery. This method takes a message as input parameter, passes it on the messenger (pigeon, mail, ...) and then lets the messanger send the message.

Specified by:
sendMessage in interface DeliveryService
Parameters:
msg - Message to send

setExpressMailMessaging

public void setExpressMailMessaging()
Sets messaging type to express mail.

Specified by:
setExpressMailMessaging in interface DeliveryService

setPigeonMessaging

public void setPigeonMessaging(int fitness,
                               int distance)
Sets messaging type to pigeon.

Specified by:
setPigeonMessaging in interface DeliveryService
Parameters:
fitness - Pigeon fittness
distance - Distance of the pigeon from addressee

setStandardMailMessaging

public void setStandardMailMessaging()
Sets messaging type to standard mail.

Specified by:
setStandardMailMessaging in interface DeliveryService