edu.uci.isr.yancees.server.service.slp
Class SLPService

java.lang.Object
  extended byedu.uci.isr.yancees.server.service.AbstractService
      extended byedu.uci.isr.yancees.server.service.slp.SLPService
All Implemented Interfaces:
ServiceInterface

public class SLPService
extends AbstractService

This service connects YANCESS with its peers in a subnetwork. It uses the service location protocol (SLP)


Field Summary
static java.lang.String SERVICE_NAME
           
 java.lang.String YANCEES_SERVICE_NAME
           
 
Constructor Summary
SLPService()
           
 
Method Summary
 ServiceURL[] getNeighborhoodURLs()
           
 ServiceURL getThisServerURL()
           
 void printLANYanceesURLs()
          Locates and display a list of other YANCEES instances in the neighborhod
 void publishToPeers(EventInterface evt)
          Propagates, or publishes an event in all the peers of the network.
 void publishToPeers(EventInterface[] evtList)
          Propagates, or publishes an event in all the peers of the network.
 
Methods inherited from class edu.uci.isr.yancees.server.service.AbstractService
getName, isActive, setName
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

SERVICE_NAME

public static java.lang.String SERVICE_NAME

YANCEES_SERVICE_NAME

public final java.lang.String YANCEES_SERVICE_NAME
See Also:
Constant Field Values
Constructor Detail

SLPService

public SLPService()
Method Detail

printLANYanceesURLs

public void printLANYanceesURLs()
Locates and display a list of other YANCEES instances in the neighborhod


getNeighborhoodURLs

public ServiceURL[] getNeighborhoodURLs()
Returns:
a list of IPs of the nosts running the YANCEES server in the local network (or the network configured in the SLP service).

getThisServerURL

public ServiceURL getThisServerURL()
Returns:
the ServiceURL for the current YANCEES implementation, the newest one registered for this server.

publishToPeers

public void publishToPeers(EventInterface evt)
Propagates, or publishes an event in all the peers of the network. Note that for this operation, we do not use the regular publishing interface of YANCEES as a way to prevent repeated circular publishing of events.

Parameters:
evt - is the event to be propagated to the other peers.

publishToPeers

public void publishToPeers(EventInterface[] evtList)
Propagates, or publishes an event in all the peers of the network. Note that for this operation, we do not use the regular publishing interface of YANCEES as a way to prevent repeated circular publishing of events.

Parameters:
evtList - is the event list to be propagated to the other peers.