FileDocCategorySizeDatePackage
SocketFactoryContactInfoListIteratorImpl.javaAPI DocJava SE 5 API2793Fri Aug 26 14:54:26 BST 2005com.sun.corba.se.impl.legacy.connection

SocketFactoryContactInfoListIteratorImpl

public class SocketFactoryContactInfoListIteratorImpl extends com.sun.corba.se.impl.transport.CorbaContactInfoListIteratorImpl

Fields Summary
private com.sun.corba.se.spi.transport.SocketInfo
socketInfoCookie
Constructors Summary
public SocketFactoryContactInfoListIteratorImpl(com.sun.corba.se.spi.orb.ORB orb, com.sun.corba.se.spi.transport.CorbaContactInfoList corbaContactInfoList)

	super(orb, corbaContactInfoList, null, null);
    
Methods Summary
public booleanhasNext()

	return true;
    
public java.lang.Objectnext()

	if (contactInfoList.getEffectiveTargetIOR().getProfile().isLocal()){
	    return new SharedCDRContactInfoImpl(
		orb, contactInfoList,
		contactInfoList.getEffectiveTargetIOR(),
		orb.getORBData().getGIOPAddressDisposition());
	} else {
	    // REVISIT:
	    // on comm_failure maybe need to give IOR instead of located.
	    return new SocketFactoryContactInfoImpl(
	        orb, contactInfoList,
		contactInfoList.getEffectiveTargetIOR(),
		orb.getORBData().getGIOPAddressDisposition(),
		socketInfoCookie);
	}
    
public booleanreportException(com.sun.corba.se.pept.transport.ContactInfo contactInfo, java.lang.RuntimeException ex)

	this.failureContactInfo = (CorbaContactInfo)contactInfo;
	this.failureException = ex;
	if (ex instanceof org.omg.CORBA.COMM_FAILURE) {

	    if (ex.getCause() instanceof GetEndPointInfoAgainException) {
		socketInfoCookie = 
		    ((GetEndPointInfoAgainException) ex.getCause())
		    .getEndPointInfo();
		return true;
	    }

	    SystemException se = (SystemException) ex;
	    if (se.completed == CompletionStatus.COMPLETED_NO) {
		if (contactInfoList.getEffectiveTargetIOR() !=
		    contactInfoList.getTargetIOR()) 
                {
		    // retry from root ior
                    contactInfoList.setEffectiveTargetIOR(
                        contactInfoList.getTargetIOR());
		    return true;
		}
	    }
	}
	return false;