Class SpaceAccessor

java.lang.Object
  |
  +--SpaceAccessor

public final class SpaceAccessor
extends java.lang.Object

This class can be used as replacement for the SpaceAccessor class used in the book: JavaSpaces(tm) Principles, Patterns and Practice" by Freeman, Hupfer, Arnold I took the liberty to refactor Luba Powell's SpaceWrapper class and this is the result. It shouldn't break (I hope) any(?) existing code which uses the original SpaceAccessor. Thanks Luba for your code! (robert.hellwig@sun.com)

Since:
21.07.2001
Updated: mnoble.@cfa.harvard.edu, version 1.1, 24.08.2002
- Added code to check com.sun.jini.outrigger.spaceName property before defaulting to using SPACE_DEFAULT_NAME.
- Replaced use of SpaceAccessorException with standard Exception, for simplicity.
- Commented out intrusive "Searching for space" message
- Added code to check com.sun.jini.lookup.locator property before defaulting to using DEFAULT_JINI_URL
- Need to format this better for JavaDoc!
Author:
robert.hellwig@sun.com

Field Summary
static long ALLOWED_DELTA
           
 
Constructor Summary
SpaceAccessor()
           
 
Method Summary
static net.jini.space.JavaSpace getJavaSpace()
           
static net.jini.space.JavaSpace getJavaSpace(java.lang.String jiniURL)
           
static net.jini.space.JavaSpace getJavaSpace(java.lang.String jiniURL, java.lang.String spaceName)
           
static net.jini.space.JavaSpace getJavaSpace(java.lang.String jiniURL, java.lang.String spaceName, net.jini.core.lookup.ServiceID serviceID)
           
static net.jini.space.JavaSpace getSpace()
          Deprecated. Use getJavaSpace()
static net.jini.space.JavaSpace getSpace(java.lang.String name)
          Deprecated. Use getJavaSpace(String jiniURL, String spaceName)
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ALLOWED_DELTA

public static long ALLOWED_DELTA
Constructor Detail

SpaceAccessor

public SpaceAccessor()
Method Detail

getJavaSpace

public static net.jini.space.JavaSpace getJavaSpace()
                                             throws java.lang.Exception
Returns:
A JavaSpace looked up with default values
Throws:
java.lang.Exception - If there is no space found within (ALLOWED_DELTA/1000) sec's

getJavaSpace

public static net.jini.space.JavaSpace getJavaSpace(java.lang.String jiniURL)
                                             throws java.lang.Exception
Returns:
A JavaSpace looked up and discovered at the given URL
Throws:
java.lang.Exception - If there is no space found within (ALLOWED_DELTA/1000) sec's

getJavaSpace

public static net.jini.space.JavaSpace getJavaSpace(java.lang.String jiniURL,
                                                    java.lang.String spaceName)
                                             throws java.lang.Exception
Returns:
A JavaSpace looked up with the following parameters:
Throws:
java.lang.Exception - If there is no space found within (ALLOWED_DELTA/1000) sec's

getJavaSpace

public static net.jini.space.JavaSpace getJavaSpace(java.lang.String jiniURL,
                                                    java.lang.String spaceName,
                                                    net.jini.core.lookup.ServiceID serviceID)
                                             throws java.lang.Exception
Returns:
A JavaSpace found with default values
Throws:
java.lang.Exception - If there is no space found within (ALLOWED_DELTA/1000) sec's

getSpace

public static net.jini.space.JavaSpace getSpace(java.lang.String name)
                                         throws java.lang.Exception
Deprecated. Use getJavaSpace(String jiniURL, String spaceName)

Returns:
A JavaSpace found with the following name:
java.lang.Exception

getSpace

public static net.jini.space.JavaSpace getSpace()
                                         throws java.lang.Exception
Deprecated. Use getJavaSpace()

Returns:
A JavaSpace looked up with default values
java.lang.Exception