appl.parallel.services
Class MulticastDiscoveryService

java.lang.Object
  extended by appl.parallel.services.MulticastDiscoveryService
All Implemented Interfaces:
DiscoveryService, Service

public class MulticastDiscoveryService
extends Object
implements DiscoveryService

Responsible for discovery of RemoteResources on the network, especially but not only XuluServers. It listens for the following messages:

"Hello Xulu from XuluServer" - sent by RemoteResources like XuluServer when starting
"Goodbye Xulu" - sent by RemoteResources like XuluServer when stopping

and sends:
"Hello Servers" - when started If multicasting does not work try to disable your firewall or better configure it to allow multicast packages. Notice also, that multicasting may not work in virtual machines like MS Virtual PC 2004. THIS CLASS IS STILL FOR DEMONSTRATION ONLY

Author:
Dominik Appl
See Also:
XuluServer

Constructor Summary
MulticastDiscoveryService()
          Constructs a new service reading port and lease time from XuluConfig
MulticastDiscoveryService(int port, int lease)
          Constructs a new service
 
Method Summary
 Vector<ComputingResourceContainer> getResources()
           
 boolean isRunning()
           
static void main(String[] args)
          just for testing..edit as you like
 void startService()
          Starts the service
 void stopService()
          Stops the service
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MulticastDiscoveryService

public MulticastDiscoveryService()
Constructs a new service reading port and lease time from XuluConfig


MulticastDiscoveryService

public MulticastDiscoveryService(int port,
                                 int lease)
Constructs a new service

Parameters:
port - port where the multicasting happens
lease - timeintervall (in ms) after whi
Method Detail

startService

public void startService()
Description copied from interface: Service
Starts the service

Specified by:
startService in interface Service

getResources

public Vector<ComputingResourceContainer> getResources()
Specified by:
getResources in interface DiscoveryService
Returns:
the discovered resources

stopService

public void stopService()
Description copied from interface: Service
Stops the service

Specified by:
stopService in interface Service

isRunning

public boolean isRunning()
Specified by:
isRunning in interface Service
Returns:
true, if the service is running

main

public static void main(String[] args)
just for testing..edit as you like