Class CacheFinder
java.lang.Object
com.j_spaces.core.client.SpaceFinder
com.j_spaces.map.CacheFinder
Deprecated.
This utility class provides accessing to cacheIMapAPI. The CacheFinder is designed to provide a unified interface for finding a cache in each of the mode specified. To provide a unified manager of accessing the cache use a url based interface which will provide the information of the protocol and the address of the cache that should be found. The general format for this URL is as follows:Protocol://[host]:[port]/[container_name]/[space_name]?[query_string]Protocol: [ rmi | jini | java ] The "java" protocol enables working with an embedded space behind the cache. When choosing so one should specify in the query string one of three operations: > create - to create a new space example of "mySpace" space creation:java://myHost/myContinaer/mySpace?create> open - To open an existing space in an embedded mode: example of opening "mySpace" space:java://myHost/myContinaer/mySpace?open> destroy - for destroy an existing space: example of destroying "mySpace" space:java://myHost/myContinaer/mySpace?destroyHost: The host name. Can be '*', when JINI is used as a protocol, the host value determines whether to use Unicast or Multicast. Port: the registry or lookup port. If the port is not specified, the default port 10098 will be used. Container Name: The name of the container, which holds the space. If the container name is '*' then the container attribute will be ignored and the space will be looked for directly regardless of the container that holds it . Query String: The query_string represents the cache type i.e.: > create - local cachejini://myHost/myContinaer/mySpace?uselocalcache> create - IMap based space interfacejini://myHost/myContinaer/mySpaceExamples of space url's: 1. looking for a cache in rmi registry in a specific host and container.rmi://my_container_host/my_containername/myspace?uselocalcache2. Looking for a cache using JINI Unicast protocol.jini://mylookuphost/mycontainername/myspace?uselocalcacheOrjini://mylookuphost/*/myspace?uselocalcache3. Looking for a cache using the JINI multicast protocol.jini://*/*/containername/myspace?uselocalcacheOrjini://*/*/myspace?uselocalcache
- Since:
- 5.0
- Version:
- 1.0
- Author:
- Guy Korland
- See Also:
-
Field Summary
Fields inherited from class SpaceFinder
_logger -
Method Summary
Modifier and TypeMethodDescriptionstatic ObjectDeprecated.The general format for this URL is as follows: Protocol://[host]:[port]/[container_name]/[space_name]?[query_string] Protocol: [ RMI | JINI | JAVA | WS ] This method also supports multiple urls separate by ";", e.i.protected final ObjectfindService(SpaceURL url, Properties customProperties, LifeCycle lifeCycle, CredentialsProvider credentialsProvider, long timeout, LookupType lookupType) Deprecated.The main method of SpaceFinder to find single Space or Container proxy.Methods inherited from class SpaceFinder
find, find, find, find, find, find, find, findJiniSpace, findService, findService, findService, main, verifyURL
-
Method Details
-
find
Deprecated.The general format for this URL is as follows: Protocol://[host]:[port]/[container_name]/[space_name]?[query_string] Protocol: [ RMI | JINI | JAVA | WS ] This method also supports multiple urls separate by ";", e.i. rmi://localhost/containerName/SpaceName?uselocalcache; jini://localhost/containerName/SpaceName?uselocalcache; It is useful when Jini URL for locating services on the network is not available. If the first URL is unavailable, CacheFinder will try the next one until a live cache will be found. If all URLs are unavailable this method throws FinderException
- Parameters:
urls- the space url- Returns:
- Returns single cache.
- Throws:
FinderException- During finding cache.
-
findService
protected final Object findService(SpaceURL url, Properties customProperties, LifeCycle lifeCycle, CredentialsProvider credentialsProvider, long timeout, LookupType lookupType) throws FinderException Deprecated.Description copied from class:SpaceFinderThe main method of SpaceFinder to find single Space or Container proxy. If the proxy is not found throwsFinderException.- Overrides:
findServicein classSpaceFinder- Parameters:
url- The valid SpaceFinder URL to Container or Space.credentialsProvider- security credentials to be used for authentication in case of a secured space; may benull.- Returns:
- Returns single found proxy.
- Throws:
FinderException- Failed to find proxy of desiredurl.
-
MapConfigurerinstead.