edu.uci.isr.yancees.server.service.jmdns
Class JmDNSService
java.lang.Object
edu.uci.isr.yancees.server.service.AbstractService
edu.uci.isr.yancees.server.service.jmdns.JmDNSService
- All Implemented Interfaces:
- ServiceInterface
- public class JmDNSService
- extends AbstractService
This service connects YANCESS with its peers in a subnetwork. It uses the
service location protocol (SLP)
Method Summary |
void |
addService(JmDNS jmdns,
java.lang.String type,
java.lang.String name)
|
void |
executeRemoveService(JmDNS jmdns,
java.lang.String type,
java.lang.String name)
Starts a thread to execute the remove command |
protected boolean |
isNotMyURL(java.lang.String textString)
|
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. |
void |
removeService(JmDNS jmdns,
java.lang.String type,
java.lang.String name)
This method is called whenever a new service is unregistered from the LAN |
void |
resolveService(JmDNS jmdns,
java.lang.String type,
java.lang.String name,
ServiceInfo info)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
SERVICE_NAME
public static java.lang.String SERVICE_NAME
LOOKUP_NAME
public static java.lang.String LOOKUP_NAME
JMDNS_SERVICE_TYPE
public static java.lang.String JMDNS_SERVICE_TYPE
TIME_OUT
public static int TIME_OUT
RETRY_TIMEOUT
public static int RETRY_TIMEOUT
RETRY_TENTATIVES
public static int RETRY_TENTATIVES
_myURLList
public java.util.Vector _myURLList
_myJmDNSList
public java.util.Vector _myJmDNSList
JmDNSService
public JmDNSService()
addService
public void addService(JmDNS jmdns,
java.lang.String type,
java.lang.String name)
isNotMyURL
protected boolean isNotMyURL(java.lang.String textString)
removeService
public void removeService(JmDNS jmdns,
java.lang.String type,
java.lang.String name)
- This method is called whenever a new service is unregistered from the LAN
- Parameters:
jmdns
- is the reference to the service running locallytype
- is the type of the service removedname
- is the name of the resource removed
executeRemoveService
public void executeRemoveService(JmDNS jmdns,
java.lang.String type,
java.lang.String name)
- Starts a thread to execute the remove command
- Parameters:
jmdns
- is the reference to the jmdns protocol managertype
- is the type of the service that left the networkname
- is the unique name of the service that left the network
resolveService
public void resolveService(JmDNS jmdns,
java.lang.String type,
java.lang.String name,
ServiceInfo info)
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.