net.sourceforge.esw.service
Class LookupServiceUtil

java.lang.Object
  |
  +--net.sourceforge.esw.service.LookupServiceUtil
All Implemented Interfaces:
java.util.EventListener, java.beans.PropertyChangeListener

public class LookupServiceUtil
extends java.lang.Object
implements java.beans.PropertyChangeListener

This object will find a specific service in the Enterprise for any requesting client.


Field Summary
protected  net.jini.core.lookup.ServiceTemplate template
          The object that performs the dicovery of Reggie services, notifying the DiscoveryListener of a discoverd reggie or a discarded reggie.
 
Constructor Summary
LookupServiceUtil()
          Creates a new LookupServiceUtil.
LookupServiceUtil(java.lang.Class[] aServiceTypes, net.jini.core.entry.Entry[] aAttributes)
          Creates a new LookupServiceUtil.
LookupServiceUtil(net.jini.core.lookup.ServiceID aID, java.lang.Class[] aServiceTypes, net.jini.core.entry.Entry[] aAttributes)
          Creates a new LookupServiceUtil.
LookupServiceUtil(net.jini.core.lookup.ServiceTemplate temp)
          Creates a new LookupServiceUtil passing in the Template you want
 
Method Summary
 void addServiceEntry(net.jini.core.entry.Entry aAttribute)
          Adds a new Entry to be used by this this LookupServiceUtil instance.
 void addServiceType(java.lang.Class aServiceType)
          Adds a new Service Type to be used by this this LookupServiceUtil instance.
 net.jini.core.lookup.ServiceTemplate getServiceTemplate()
          Returns the ServiceTemplate for this LookupServiceUtil instance.
 java.lang.Object lookupService()
          Performs Lookup of the service described by this LookupServiceUtil.
 net.jini.core.lookup.ServiceMatches lookupServices()
          Performs Lookup of the services described by this LookupServiceUtil.
 void propertyChange(java.beans.PropertyChangeEvent pce)
           
 void setServiceID(net.jini.core.lookup.ServiceID aID)
          Sets the ServiceID to be used by this LookupServiceUtil instance.
 void setServiceTemplate(net.jini.core.lookup.ServiceTemplate aTemplate)
          Sets the ServiceTemplate for this LookupServiceUtil instance.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

template

protected net.jini.core.lookup.ServiceTemplate template
The object that performs the dicovery of Reggie services, notifying the DiscoveryListener of a discoverd reggie or a discarded reggie.
Constructor Detail

LookupServiceUtil

public LookupServiceUtil()
Creates a new LookupServiceUtil.


LookupServiceUtil

public LookupServiceUtil(java.lang.Class[] aServiceTypes,
                         net.jini.core.entry.Entry[] aAttributes)
Creates a new LookupServiceUtil.

Parameters:
aServiceTypes - the types of services the client wishes to lookup.
aAttributes - the array iof Entry objects that describe the service.

LookupServiceUtil

public LookupServiceUtil(net.jini.core.lookup.ServiceID aID,
                         java.lang.Class[] aServiceTypes,
                         net.jini.core.entry.Entry[] aAttributes)
Creates a new LookupServiceUtil.

Parameters:
aID - the ServiceID of the Service you wish to find.
aServiceTypes - the types of services the client wishes to lookup.
aAttributes - the array iof Entry objects that describe the service.

LookupServiceUtil

public LookupServiceUtil(net.jini.core.lookup.ServiceTemplate temp)
Creates a new LookupServiceUtil passing in the Template you want

Parameters:
temp - the ServiceTemplate of the Services you wish to find.
Method Detail

setServiceTemplate

public void setServiceTemplate(net.jini.core.lookup.ServiceTemplate aTemplate)
Sets the ServiceTemplate for this LookupServiceUtil instance.

Parameters:
aTemplate - the new ServiceTemplate to be used for lookup.

getServiceTemplate

public net.jini.core.lookup.ServiceTemplate getServiceTemplate()
Returns the ServiceTemplate for this LookupServiceUtil instance.

Returns:
the ServiceTemplate for this LookupServiceUtil instance.

setServiceID

public void setServiceID(net.jini.core.lookup.ServiceID aID)
Sets the ServiceID to be used by this LookupServiceUtil instance.

Parameters:
aID - the new ServiceID to be used for lookup.

addServiceType

public void addServiceType(java.lang.Class aServiceType)
Adds a new Service Type to be used by this this LookupServiceUtil instance.

Parameters:
aServiceType - a Class to be added to the list of classes that describe the service being lookup'd.

addServiceEntry

public void addServiceEntry(net.jini.core.entry.Entry aAttribute)
Adds a new Entry to be used by this this LookupServiceUtil instance.

Parameters:
aAttribute - a Entry to be added to the list of classes that describe the service being lookup'd.

lookupServices

public net.jini.core.lookup.ServiceMatches lookupServices()
Performs Lookup of the services described by this LookupServiceUtil. This method will return an ServiceMatches Jini object that describes all the discovered services.

Returns:
a ServiceMatches Jini object that contains the discovered services.

lookupService

public java.lang.Object lookupService()
Performs Lookup of the service described by this LookupServiceUtil.

Returns:
the Proxy to the requested Service, or null if no service was found.

propertyChange

public void propertyChange(java.beans.PropertyChangeEvent pce)
Specified by:
propertyChange in interface java.beans.PropertyChangeListener


Copyright 2002 Free Software Foundation. All Rights Reserved.