net.spy
Class RHash

java.lang.Object
  extended bynet.spy.SpyObject
      extended bynet.spy.RHash

public class RHash
extends SpyObject

Abstract client for Remote Hash service.


Constructor Summary
RHash(String server)
          Constructor!
 
Method Summary
 boolean connected()
          Verify we still have a connection to the RMI server.
protected  void finalize()
           
 Object get(String name)
          gets an object from the remote object server.
static void main(String[] args)
           
 void put(String name, Object o)
          stores an object in the remote object server.
 
Methods inherited from class net.spy.SpyObject
getLogger
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RHash

public RHash(String server)
      throws NestedException
Constructor!

Parameters:
server - RMI URL to ObjectServer, for example: rmi://rmiregistoryserverthing/ObjectServer
Throws:
NotBoundException - An exception is thrown if an RMI connection cannot be established.
NestedException
Method Detail

get

public Object get(String name)
gets an object from the remote object server.

Parameters:
name - name of the object to fetch.
Returns:
the object from the remote object server.

put

public void put(String name,
                Object o)
stores an object in the remote object server.

Parameters:
name - key under which to store the object
o - object to store.

connected

public boolean connected()
Verify we still have a connection to the RMI server.

Returns:
true if connected

finalize

protected void finalize()
                 throws Throwable
Throws:
Throwable

main

public static void main(String[] args)
                 throws Exception
Throws:
Exception