|
GigaSpaces XAP 7.0 API | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.j_spaces.core.client.LookupFinder
public class LookupFinder
LookupFinder is a generalized concept of the SpaceFinder utility. It simplifies the process of service lookup and acquiring a proxy of this service. The lookup performed on three criterions: service name, service class and service attributes. Any one of the above criterion can be null.
Nested Class Summary | |
---|---|
static class |
LookupFinder.LookupEntriesComparator
|
Field Summary | |
---|---|
static String |
ACTUAL_CLOSE_SYSTEM_PROPERTY
If this system property is set to "true", close() will actually perform the close operation,
otherwise, it will not perform anything. |
static long |
DEFAULT_TIMEOUT
Default service lookup timeout Default value is 5 seconds |
Fields inherited from interface com.j_spaces.core.Constants.Client |
---|
CLIENT_RETRY_CONNECTION_DEFAULT, CLIENT_RETRY_CONNECTION_PROP, FULL_CLIENT_RETRY_CONNECTION_PROP, FULL_NUMBER_OF_IMPLICIT_INDEXES_PROP, NUMBER_OF_IMPLICIT_INDEXES_DEFAULT, NUMBER_OF_IMPLICIT_INDEXES_PROP |
Constructor Summary | |
---|---|
LookupFinder()
|
Method Summary | |
---|---|
static void |
close()
Closes the lookup finder if the ACTUAL_CLOSE_SYSTEM_PROPERTY is set to "true". |
static Object |
find(Class[] classes,
net.jini.core.entry.Entry[] srvAttr,
String lookupHost,
long timeout,
Properties customProps)
Finds specified service according to service classes and service attributes. |
static Object |
find(String serviceName,
Class[] classes,
net.jini.core.entry.Entry[] serviceAttributes,
String lookupHost,
String groups,
long timeout)
Finds specified server using all the criterion: service name, service classes and service attributes. |
static Object |
find(String serviceName,
Class[] classes,
net.jini.core.entry.Entry[] serviceAttributes,
String lookupHost,
String groups,
long timeout,
long timeoutInterval,
Properties customProps)
Finds specified server using all the criterions: service name, service classes and service attributes. |
static Object |
find(String serviceName,
Class[] classes,
net.jini.core.entry.Entry[] serviceAttributes,
String lookupHost,
String groups,
long timeout,
Properties customProps)
Finds specified server using all the criterions: service name, service classes and service attributes. |
static Object |
find(String serviceName,
Class srvClass,
String lookupHost,
long timeout,
Properties customProps)
Finds specified service according to service name and service class only. |
static void |
forceClose()
Forces close regardless of the ACTUAL_CLOSE_SYSTEM_PROPERTY system proepty. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final long DEFAULT_TIMEOUT
public static final String ACTUAL_CLOSE_SYSTEM_PROPERTY
close()
will actually perform the close operation,
otherwise, it will not perform anything. To force close, please call forceClose()
.
Constructor Detail |
---|
public LookupFinder()
Method Detail |
---|
public static void close()
ACTUAL_CLOSE_SYSTEM_PROPERTY
is set to "true". IF it is
not set, will default to "true".
public static void forceClose()
ACTUAL_CLOSE_SYSTEM_PROPERTY
system proepty.
public static Object find(String serviceName, Class[] classes, net.jini.core.entry.Entry[] serviceAttributes, String lookupHost, String groups, long timeout, Properties customProps) throws FinderException
serviceName
- Service name. Can be null.classes
- Array of service class. Can be nullserviceAttributes
- Array of service attributes. Can be nulllookupHost
- A hostname of the computer running the Jini Lookup service where the search to be done
If null then the search is issued on any available Jini Lookup service using multicast protocol.groups
- Comma separated string of groups that the service belongs totimeout
- lookup timeoutcustomProps
- The custom properties object which might contain overwrites to the configuration.
In our case, it can include the unicast list of hosts which we will lookup upon using unicast discovery.
FinderException
- Failed to find desired serviceName
.public static Object find(String serviceName, Class[] classes, net.jini.core.entry.Entry[] serviceAttributes, String lookupHost, String groups, long timeout, long timeoutInterval, Properties customProps) throws FinderException
serviceName
- Service name. Can be null.classes
- Array of service class. Can be nullserviceAttributes
- Array of service attributes. Can be nulllookupHost
- A hostname of the computer running the Jini Lookup service where the search to be done
If null then the search is issued on any available Jini Lookup service using multicast protocol.groups
- Comma separated string of groups that the service belongs totimeout
- lookup timeouttimeoutInterval
- The interval we use in order to poll the SDM for lookup itemscustomProps
- The custom properties object which might contain overwrites to the configuration.
In our case, it can include the unicast list of hosts which we will lookup upon using unicast discovery.
FinderException
- Failed to find desired serviceName
.public static Object find(String serviceName, Class[] classes, net.jini.core.entry.Entry[] serviceAttributes, String lookupHost, String groups, long timeout) throws FinderException
serviceName
- Service name. Can be null.classes
- Array of service class. Can be nullserviceAttributes
- Array of service attributes. Can be nulllookupHost
- A hostname of the computer running the Jini Lookup service where the search to be done
If null then the search is issued on any available Jini Lookup service using multicast protocol.groups
- Comma separated string of groups that the service belongs totimeout
- lookup timeout
FinderException
- Failed to find desired serviceName
.public static Object find(String serviceName, Class srvClass, String lookupHost, long timeout, Properties customProps) throws FinderException
serviceName
- Service name. Can be null.srvClass
- Service classes. Can be nulllookupHost
- A hostname of the computer running the Jini Lookup service where the search to be done
If null then the search is issued on any available Jini Lookup servicetimeout
- lookup timeoutcustomProps
- The custom properties object which might contain overwrites to the configuration.
In our case, it might include the unicast list of hosts which we will lookup upon using unicast discovery.
FinderException
- Failed to find desired serviceName
.public static Object find(Class[] classes, net.jini.core.entry.Entry[] srvAttr, String lookupHost, long timeout, Properties customProps) throws FinderException
classes
- Array of service classes. Can be nullsrvAttr
- Array of service attributes. Can be nulllookupHost
- A hostname of the computer running the Jini Lookup service where the search to be done
If null then the search is issued on any available Jini Lookup servicetimeout
- lookup timeoutcustomProps
- The custom properties object which might contain overwrites to the configuration.
In our case, it can include the unicast list of hosts which we will lookup upon using unicast discovery.
FinderException
- Failed to find desired serviceName
.
|
GigaSpaces XAP 7.0 API | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |