Class SendDrv

java.lang.Object
  |
  +--Node
        |
        +--RunningNode
              |
              +--SendDrv
All Implemented Interfaces:
SendDrvInterface

public class SendDrv
extends RunningNode
implements SendDrvInterface


Fields inherited from interface SendDrvInterface
QUEUE_SIZE
 
Constructor Summary
SendDrv()
          Creates new SendDrv
 
Method Summary
 boolean sendDrvAcceptMode()
          Checks whether object can accept more messages
 void sendDrvGet(RawMail mail)
          Adds the passed Message to the object
 void sendDrvSend()
          Sends out a message with a prior error checking (checks whether link is garbled or not) If link is garbled retries to send message in 5 seconds.
 
Methods inherited from class RunningNode
getLinkAccess, getNodeDescription, getNodeID, receivers, senders
 
Methods inherited from class Node
setNodeLink
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SendDrv

public SendDrv()
Creates new SendDrv
Method Detail

sendDrvGet

public void sendDrvGet(RawMail mail)
Adds the passed Message to the object

sendDrvAcceptMode

public boolean sendDrvAcceptMode()
Checks whether object can accept more messages
Returns:
boolean true if it can accept more messages, false otherwise
REQUIRES:
MODIFIES:
EFFECTS: If object container capacity is allowing to add more messages true is returned, otherwise false is returned

sendDrvSend

public void sendDrvSend()
Sends out a message with a prior error checking (checks whether link is garbled or not) If link is garbled retries to send message in 5 seconds.
REQUIRES:
MODIFIES: this, Link
EFFECTS: 1. Sends out message from the container and removes it from the container 2. Checks the link on the quality of transfer, and if the link is garbled message is not removed from the container, but preserved 3. Updates the statistical fields of this