SunSPOT API V5.0


com.sun.spot.peripheral.radio.mhrp.aodv
Class Sender

java.lang.Object
  extended by java.lang.Thread
      extended by com.sun.spot.peripheral.radio.mhrp.aodv.Sender
All Implemented Interfaces:
Runnable

public class Sender
extends Thread

Version:
0.1
Author:
Allen Ajit George

Field Summary
 
Fields inherited from class java.lang.Thread
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
 
Constructor Summary
Sender(long ourAddress, ILowPan lowPan, Vector listeners)
           
 
Method Summary
 boolean forwardAODVMessage(AODVMessage message)
          put a message that must be forwarded into the queue
 void run()
          Spins on the outgoing message queue and calls the appropriate send methods
 boolean sendNewRERR(long originator, long destination)
          Create an entry for the queue and put it in to the designated queue
 boolean sendNewRREP(RREP message)
          Create an entry for the queue and put it in to the designated queue
 boolean sendNewRREQ(long address, RouteEventClient eventClient, Object uniqueKey)
          Create an entry for the queue and put it in to the designated queue
 void stopThread()
           
 
Methods inherited from class java.lang.Thread
activeCount, currentThread, getName, getPriority, interrupt, isAlive, join, setPriority, sleep, start, toString, yield
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Sender

public Sender(long ourAddress,
              ILowPan lowPan,
              Vector listeners)
Method Detail

run

public void run()
Spins on the outgoing message queue and calls the appropriate send methods

Specified by:
run in interface Runnable
Overrides:
run in class Thread
See Also:
Thread.start(), Runnable.run()

stopThread

public void stopThread()

sendNewRREQ

public boolean sendNewRREQ(long address,
                           RouteEventClient eventClient,
                           Object uniqueKey)
Create an entry for the queue and put it in to the designated queue

Parameters:
address - destination for which a route is wanted
eventClient - the instance that is waiting for this route
uniqueKey - identifier for this rreq
Returns:
succes

sendNewRERR

public boolean sendNewRERR(long originator,
                           long destination)
Create an entry for the queue and put it in to the designated queue

Parameters:
originator -
destination -
Returns:
succes

sendNewRREP

public boolean sendNewRREP(RREP message)
Create an entry for the queue and put it in to the designated queue

Parameters:
message -
Returns:
succes

forwardAODVMessage

public boolean forwardAODVMessage(AODVMessage message)
put a message that must be forwarded into the queue

Returns:
succes

SunSPOT API V5.0


Copyright � 2006-2008 Sun Microsystems, Inc. All Rights Reserved.