Java Access to WordNet

danbikel.wordnet
Class RemoteEnumerator

java.lang.Object
  |
  +--java.rmi.server.RemoteObject
        |
        +--java.rmi.server.RemoteServer
              |
              +--java.rmi.server.UnicastRemoteObject
                    |
                    +--danbikel.wordnet.RemoteEnumerator
All Implemented Interfaces:
Remote, RemoteEnumeration, Serializable

public class RemoteEnumerator
extends UnicastRemoteObject
implements RemoteEnumeration

This class provides a wrapper for Enumeration objects to be accessed remotely via RMI. Its primary use is to provide access to the methods WordNet.getCachedDataEntries(java.lang.String) and WordNet.getCachedIndexEntries(java.lang.String) for RMI clients, as defined by the same-named methods in WordNetRemote (which are implemented by WordNetServer). RemoteEnumerator objects are fail-fast, just as normal Enumeration objects are.

See Also:
Serialized Form

Field Summary
 
Fields inherited from class java.rmi.server.RemoteObject
ref
 
Constructor Summary
RemoteEnumerator(Enumeration e)
          Constructs a RemoteEnumerator object, wrapping a locally-accessed Enumeration object.
 
Method Summary
 boolean hasMoreElements()
          Tests if the underlying enumeration object contains more elements.
 Object nextElement()
          Returns the next element of the underlying enumeration if the underlying enumeration object has at least one more element to provide.
 
Methods inherited from class java.rmi.server.UnicastRemoteObject
clone, exportObject, exportObject, exportObject, unexportObject
 
Methods inherited from class java.rmi.server.RemoteServer
getClientHost, getLog, setLog
 
Methods inherited from class java.rmi.server.RemoteObject
equals, getRef, hashCode, toString, toStub
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

RemoteEnumerator

public RemoteEnumerator(Enumeration e)
                 throws RemoteException
Constructs a RemoteEnumerator object, wrapping a locally-accessed Enumeration object.

Method Detail

hasMoreElements

public boolean hasMoreElements()
                        throws RemoteException
Tests if the underlying enumeration object contains more elements.

Specified by:
hasMoreElements in interface RemoteEnumeration
Returns:
true if and only if this enumeration object contains at least one more element to provide; false otherwise.
RemoteException

nextElement

public Object nextElement()
                   throws RemoteException
Returns the next element of the underlying enumeration if the underlying enumeration object has at least one more element to provide.

Specified by:
nextElement in interface RemoteEnumeration
RemoteException

Java Access to WordNet

Author: Dan Bikel