com.gigaspaces.grid.lookup
Class LookupHandler

java.lang.Object
  extended by com.gigaspaces.grid.lookup.LookupHandler
All Implemented Interfaces:
java.util.EventListener, net.jini.discovery.DiscoveryListener

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

The LookupHandler provides autonomic support for handling Jini Lookup Service activation. The LookupHandler creates a LookupDiscovery class which uses multicast to find lookup services. 

If lookup service(s) have not been discovered in an amount of time determined by a random number generator, this utility will start an instance of a Jini Lookup Service (reggie) with member groups obtained from this utility's configuration. 

Conversely, if the instantiated LookupDiscovery instance notifies the DiscoveryListener of a discarded lookup service, this utility will verify that the requisite number of Jini Lookup Services exist, and if they do not, schedule the creation of an instance of a Jini Lookup Service (reggie) with member groups obtained from this utility's configuration.


Field Summary
static int UNDEFINED
           
 
Constructor Summary
LookupHandler(java.lang.String[] configArgs, com.sun.jini.start.LifeCycle lifeCycle)
          Create a LookupHandler instance
 
Method Summary
 void discarded(net.jini.discovery.DiscoveryEvent de)
           
 void discovered(net.jini.discovery.DiscoveryEvent de)
           
static void main(java.lang.String[] args)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

UNDEFINED

public static final int UNDEFINED
See Also:
Constant Field Values
Constructor Detail

LookupHandler

public LookupHandler(java.lang.String[] configArgs,
                     com.sun.jini.start.LifeCycle lifeCycle)
              throws java.io.IOException,
                     net.jini.config.ConfigurationException
Create a LookupHandler instance

Parameters:
configArgs - The configuration args used to initialize the utility
Throws:
java.io.IOException
net.jini.config.ConfigurationException
Method Detail

discovered

public void discovered(net.jini.discovery.DiscoveryEvent de)
Specified by:
discovered in interface net.jini.discovery.DiscoveryListener
See Also:
DiscoveryListener.discovered(net.jini.discovery.DiscoveryEvent)

discarded

public void discarded(net.jini.discovery.DiscoveryEvent de)
Specified by:
discarded in interface net.jini.discovery.DiscoveryListener
See Also:
DiscoveryListener.discarded(net.jini.discovery.DiscoveryEvent)

main

public static void main(java.lang.String[] args)


Copyright (c) 2007 GigaSpaces Technologies, Inc.
All Rights Reserved.