org.objectweb.proactive.core.jini
Class ServiceLocatorHelper

java.lang.Object
  |
  +--org.objectweb.proactive.core.jini.ServiceLocatorHelper
All Implemented Interfaces:
net.jini.discovery.DiscoveryListener, java.util.EventListener

public class ServiceLocatorHelper
extends java.lang.Object
implements net.jini.discovery.DiscoveryListener

The ServiceLocatorHelper is a utility class, that takes care of creating or discovering the Lookup Service when using JINI.

Since:
ProActive 0.9.3
Version:
1.0, 2002/09/20
Author:
ProActive Team

Field Summary
protected  boolean locatorChecked
           
protected static org.apache.log4j.Logger logger
           
protected static net.jini.core.discovery.LookupLocator lookup
           
protected static int MAX_RETRY
           
protected static long MAX_WAIT
           
protected static boolean multicastLocator
           
protected static net.jini.core.lookup.ServiceRegistrar registrar
           
protected  boolean shouldCreateServiceLocator
          settings of the service locator
 
Constructor Summary
ServiceLocatorHelper()
           
 
Method Summary
protected static void delDirectory(java.io.File dir)
          Delete recursively all files and directory
 void discarded(net.jini.discovery.DiscoveryEvent evt)
          for multicast discover
 void discovered(net.jini.discovery.DiscoveryEvent evt)
          for multicast discover
 void initializeServiceLocator()
          Initialise the service locator for this host
 void setMulticastLocator(boolean v)
          true if you want a multicast service Locator false if you want a unicast service Locator
 void setShouldCreateServiceLocator(boolean v)
           
 boolean shouldCreateServiceLocator()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

logger

protected static org.apache.log4j.Logger logger

MAX_RETRY

protected static int MAX_RETRY

MAX_WAIT

protected static long MAX_WAIT

lookup

protected static net.jini.core.discovery.LookupLocator lookup

registrar

protected static net.jini.core.lookup.ServiceRegistrar registrar

shouldCreateServiceLocator

protected boolean shouldCreateServiceLocator
settings of the service locator


locatorChecked

protected boolean locatorChecked

multicastLocator

protected static boolean multicastLocator
Constructor Detail

ServiceLocatorHelper

public ServiceLocatorHelper()
Method Detail

shouldCreateServiceLocator

public boolean shouldCreateServiceLocator()

setShouldCreateServiceLocator

public void setShouldCreateServiceLocator(boolean v)

setMulticastLocator

public void setMulticastLocator(boolean v)
true if you want a multicast service Locator false if you want a unicast service Locator


initializeServiceLocator

public void initializeServiceLocator()
Initialise the service locator for this host


discovered

public void discovered(net.jini.discovery.DiscoveryEvent evt)
for multicast discover

Specified by:
discovered in interface net.jini.discovery.DiscoveryListener

discarded

public void discarded(net.jini.discovery.DiscoveryEvent evt)
for multicast discover

Specified by:
discarded in interface net.jini.discovery.DiscoveryListener

delDirectory

protected static void delDirectory(java.io.File dir)
Delete recursively all files and directory

Parameters:
dir - The directory to clean


Copyright © April 2004 INRIA All Rights Reserved.