solar.service.routing
Class DirectRoutingService

java.lang.Object
  |
  +--solar.service.BaseService
        |
        +--solar.service.routing.ManualRoutingService
              |
              +--solar.service.routing.DirectRoutingService
All Implemented Interfaces:
Cache.CacheListener, EventHandler, RequestHandler, RoutingConstants, RoutingService, Service

public class DirectRoutingService
extends ManualRoutingService

The direct routing service uses same routing contruction as ManualRoutingService, only to gain knowledge of all live hosts. It does not attempt to route using the knowledge, but simply route on IP. The services exchange information about each other so each node eventually knows all other live nodes in the network. This service requires a transport, a cache and a timer services. The valid properties are:

Version:
$Id: DirectRoutingService.java,v 1.18 2003/10/05 18:51:01 glchen Exp $
Author:
Guanling Chen

Nested Class Summary
 
Nested classes inherited from class solar.service.routing.ManualRoutingService
ManualRoutingService.RoutingTask
 
Field Summary
protected  boolean _rtable
           
 
Fields inherited from class solar.service.routing.ManualRoutingService
_dispatch, _interval, _log, _nearby, _peer, _remote, _routingName, _timer, _transportAddress, _transportName
 
Fields inherited from class solar.service.BaseService
_inited, _manager, _name
 
Fields inherited from interface solar.service.routing.RoutingConstants
ROUTING_HOST, ROUTING_INTERVAL, ROUTING_LASTHOP, ROUTING_SOURCE
 
Constructor Summary
DirectRoutingService()
           
 
Method Summary
 Address getNextHop(Address dest)
          Return the next hop for the messages with specified destination.
 void init()
          Initiate the service, do not try to init dependent services here.
 void initDependents()
          Initialize dependent services here.
 
Methods inherited from class solar.service.routing.ManualRoutingService
handleEvent, notifyObjectExpired
 
Methods inherited from class solar.service.BaseService
assertInited, getDependentService, getName, getServiceManager, handleDispatchUnit, handleEvent, handleRequest, hasInited, init, setInited, setName, setServiceManager, start, stop
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface solar.service.Service
getName, getServiceManager, handleDispatchUnit, hasInited, setName, setServiceManager, start, stop
 
Methods inherited from interface solar.api.RequestHandler
handleRequest
 

Field Detail

_rtable

protected boolean _rtable
Constructor Detail

DirectRoutingService

public DirectRoutingService()
Method Detail

init

public void init()
          throws ServiceException
Description copied from interface: Service
Initiate the service, do not try to init dependent services here.

Specified by:
init in interface Service
Overrides:
init in class ManualRoutingService
ServiceException

initDependents

public void initDependents()
                    throws ServiceException
Description copied from interface: Service
Initialize dependent services here.

Specified by:
initDependents in interface Service
Overrides:
initDependents in class ManualRoutingService
ServiceException

getNextHop

public Address getNextHop(Address dest)
                   throws RoutingException
Description copied from interface: RoutingService
Return the next hop for the messages with specified destination.

Specified by:
getNextHop in interface RoutingService
Overrides:
getNextHop in class ManualRoutingService
RoutingException