SunSPOT API V6.0


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

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

public class Sender
extends Thread

Version:
0.1
Author:
Allen Ajit George, modifications by Pradip De and Pete St. Pierre

Field Summary
 
Fields inherited from class java.lang.Thread
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
 
Constructor Summary
Sender(long ourAddress, ILowPan lowPan, Vector listeners, Vector LQlisteners)
           
 
Method Summary
 boolean forwardLQRPMessage(LQRPMessage 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 sendNewLQREQ(LQREQ message)
          Add an entry to the LQREQ queue
 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,
              Vector LQlisteners)
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:
success

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:
success

sendNewRREP

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

Parameters:
message -
Returns:
success

sendNewLQREQ

public boolean sendNewLQREQ(LQREQ message)
Add an entry to the LQREQ queue

Parameters:
message -
Returns:
success

forwardLQRPMessage

public boolean forwardLQRPMessage(LQRPMessage message)
put a message that must be forwarded into the queue

Returns:
succes

SunSPOT API V6.0


Copyright © 2006-2010 Oracle. All Rights Reserved.