GigaSpaces XAP 10.0.1 API

net.jini.security.proxytrust
Class SingletonProxyTrustIterator

java.lang.Object
  extended by net.jini.security.proxytrust.SingletonProxyTrustIterator
All Implemented Interfaces:
ProxyTrustIterator

public class SingletonProxyTrustIterator
extends Object
implements 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
SingletonProxyTrustIterator(Object obj)
          Creates an instance with the specified object to use as the only element of the iteration.
 
Method Summary
 boolean hasNext()
          Returns true if the iteration has more elements, and false otherwise.
 Object next()
          Returns the next element in the iteration.
 void setException(RemoteException e)
          Provides the iteration with a RemoteException thrown from a remote call made while attempting to obtain a TrustVerifier from the object returned by the most recent call to next.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SingletonProxyTrustIterator

public SingletonProxyTrustIterator(Object obj)
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 is null
Method Detail

hasNext

public boolean hasNext()
Description copied from interface: ProxyTrustIterator
Returns true if the iteration has more elements, and false otherwise.

Specified by:
hasNext in interface ProxyTrustIterator
Returns:
true if the iteration has more elements, and false otherwise

next

public Object next()
Description copied from interface: ProxyTrustIterator
Returns the next element in the iteration. This method can throw an exception (other than NoSuchElementException) without terminating the iteration.

Specified by:
next in interface ProxyTrustIterator
Returns:
the next element in the iteration
Throws:
NoSuchElementException - if the iteration has no more elements

setException

public void setException(RemoteException e)
Description copied from interface: ProxyTrustIterator
Provides the iteration with a RemoteException thrown from a remote call made while attempting to obtain a TrustVerifier from the object returned by the most recent call to next. Setting an exception may influence which (if any) elements are subsequently produced by the iteration. (A RemoteException thrown directly by next should not be passed to this method.)

Specified by:
setException in interface ProxyTrustIterator
Parameters:
e - RemoteException thrown from a remote call
Throws:
NullPointerException - if the argument is null
IllegalStateException - if next has never been called, or if this method has already been called since the most recent call to next, or if hasNext has been called since the most recent call to next, or if the most recent call to next threw a RemoteException

GigaSpaces XAP 10.0.1 API

Copyright © GigaSpaces.