Package net.jini.security.proxytrust
Class SingletonProxyTrustIterator
java.lang.Object
net.jini.security.proxytrust.SingletonProxyTrustIterator
- All Implemented Interfaces:
ProxyTrustIterator
A simple
ProxyTrustIterator that produces a single object as the only element of the
iteration.- Since:
- 2.0
- Author:
- Sun Microsystems, Inc.
-
Constructor Summary
ConstructorsConstructorDescriptionCreates an instance with the specified object to use as the only element of the iteration. -
Method Summary
Modifier and TypeMethodDescriptionbooleanhasNext()Returnstrueif the iteration has more elements, andfalseotherwise.next()Returns the next element in the iteration.voidProvides the iteration with aRemoteExceptionthrown from a remote call made while attempting to obtain aTrustVerifierfrom the object returned by the most recent call tonext.
-
Constructor Details
-
SingletonProxyTrustIterator
Creates an instance with the specified object to use as the only element of the iteration.- Parameters:
obj- the object to use as the element of the iteration- Throws:
NullPointerException- if the argument isnull
-
-
Method Details
-
hasNext
public boolean hasNext()Description copied from interface:ProxyTrustIteratorReturnstrueif the iteration has more elements, andfalseotherwise.- Specified by:
hasNextin interfaceProxyTrustIterator- Returns:
trueif the iteration has more elements, andfalseotherwise
-
next
Description copied from interface:ProxyTrustIteratorReturns the next element in the iteration. This method can throw an exception (other thanNoSuchElementException) without terminating the iteration.- Specified by:
nextin interfaceProxyTrustIterator- Returns:
- the next element in the iteration
- Throws:
NoSuchElementException- if the iteration has no more elements
-
setException
Description copied from interface:ProxyTrustIteratorProvides the iteration with aRemoteExceptionthrown from a remote call made while attempting to obtain aTrustVerifierfrom the object returned by the most recent call tonext. Setting an exception may influence which (if any) elements are subsequently produced by the iteration. (ARemoteExceptionthrown directly bynextshould not be passed to this method.)- Specified by:
setExceptionin interfaceProxyTrustIterator- Parameters:
e-RemoteExceptionthrown from a remote call- Throws:
NullPointerException- if the argument isnullIllegalStateException- ifnexthas never been called, or if this method has already been called since the most recent call tonext, or ifhasNexthas been called since the most recent call tonext, or if the most recent call tonextthrew aRemoteException
-