Java Code Examples for com.sun.corba.se.pept.transport.ContactInfo

The following are top voted examples for showing how to use com.sun.corba.se.pept.transport.ContactInfo. These examples are extracted from open source projects. You can vote up the examples you like and your votes will be used in our system to generate more good examples.
Example 1
Project: OpenJSharp   File: CorbaContactInfoBase.java   Source Code and License 6 votes vote down vote up
public MessageMediator createMessageMediator(Broker broker,
                                             ContactInfo contactInfo,
                                             Connection connection,
                                             String methodName,
                                             boolean isOneWay)
{
    // REVISIT: Would like version, ior, requestid, etc., decisions
    // to be in client subcontract.  Cannot pass these to this
    // factory method because it breaks generic abstraction.
    // Maybe set methods on mediator called from subcontract
    // after creation?
    CorbaMessageMediator messageMediator =
        new CorbaMessageMediatorImpl(
            (ORB) broker,
            contactInfo,
            connection,
            GIOPVersion.chooseRequestVersion( (ORB)broker,
                 effectiveTargetIOR),
            effectiveTargetIOR,
            ((CorbaConnection)connection).getNextRequestId(),
            getAddressingDisposition(),
            methodName,
            isOneWay);

    return messageMediator;
}
 
Example 2
Project: OpenJSharp   File: CorbaContactInfoListImpl.java   Source Code and License 6 votes vote down vote up
protected void addRemoteContactInfos(
    IOR  effectiveTargetIOR,
    List effectiveTargetIORContactInfoList)
{
    ContactInfo contactInfo;
    List socketInfos = orb.getORBData()
        .getIORToSocketInfo().getSocketInfo(effectiveTargetIOR);
    Iterator iterator = socketInfos.iterator();
    while (iterator.hasNext()) {
        SocketInfo socketInfo = (SocketInfo) iterator.next();
        String type = socketInfo.getType();
        String host = socketInfo.getHost().toLowerCase();
        int    port = socketInfo.getPort();
        contactInfo = createContactInfo(type, host, port);
        effectiveTargetIORContactInfoList.add(contactInfo);
    }
}
 
Example 3
Project: OpenJSharp   File: CorbaContactInfoListIteratorImpl.java   Source Code and License 6 votes vote down vote up
public CorbaContactInfoListIteratorImpl(
    ORB orb,
    CorbaContactInfoList corbaContactInfoList,
    ContactInfo primaryContactInfo,
    List listOfContactInfos)
{
    this.orb = orb;
    this.contactInfoList = corbaContactInfoList;
    this.primaryContactInfo = primaryContactInfo;
    if (listOfContactInfos != null) {
        // listOfContactInfos is null when used by the legacy
        // socket factory.  In that case this iterator is NOT used.
        this.effectiveTargetIORIterator = listOfContactInfos.iterator();
    }
    // List is immutable so no need to synchronize access.
    this.listOfContactInfos = listOfContactInfos;

    this.previousContactInfo = null;
    this.isAddrDispositionRetry = false;

    this.successContactInfo = null;
    this.failureContactInfo = null;
    this.failureException = null;

    primaryToContactInfo = orb.getORBData().getIIOPPrimaryToContactInfo();
}
 
Example 4
Project: OpenJSharp   File: CorbaContactInfoListIteratorImpl.java   Source Code and License 6 votes vote down vote up
public boolean reportException(ContactInfo contactInfo,
                               RuntimeException ex)
{
    this.failureContactInfo = (CorbaContactInfo)contactInfo;
    this.failureException = ex;
    if (ex instanceof COMM_FAILURE) {
        SystemException se = (SystemException) ex;
        if (se.completed == CompletionStatus.COMPLETED_NO) {
            if (hasNext()) {
                return true;
            }
            if (contactInfoList.getEffectiveTargetIOR() !=
                contactInfoList.getTargetIOR())
            {
                // retry from root ior
                updateEffectiveTargetIOR(contactInfoList.getTargetIOR());
                return true;
            }
        }
    }
    return false;
}
 
Example 5
Project: OpenJSharp   File: SharedCDRContactInfoImpl.java   Source Code and License 6 votes vote down vote up
public MessageMediator createMessageMediator(Broker broker,
                                             ContactInfo contactInfo,
                                             Connection connection,
                                             String methodName,
                                             boolean isOneWay)
{
    if (connection != null) {
        /// XXX LOGGING
        throw new RuntimeException("connection is not null");
    }

    CorbaMessageMediator messageMediator =
        new CorbaMessageMediatorImpl(
            (ORB) broker,
            contactInfo,
            null, // Connection;
            GIOPVersion.chooseRequestVersion( (ORB)broker,
                 effectiveTargetIOR),
            effectiveTargetIOR,
            requestId++, // Fake RequestId
            getAddressingDisposition(),
            methodName,
            isOneWay);

    return messageMediator;
}
 
Example 6
Project: openjdk-jdk10   File: CorbaContactInfoBase.java   Source Code and License 6 votes vote down vote up
public MessageMediator createMessageMediator(Broker broker,
                                             ContactInfo contactInfo,
                                             Connection connection,
                                             String methodName,
                                             boolean isOneWay)
{
    // REVISIT: Would like version, ior, requestid, etc., decisions
    // to be in client subcontract.  Cannot pass these to this
    // factory method because it breaks generic abstraction.
    // Maybe set methods on mediator called from subcontract
    // after creation?
    CorbaMessageMediator messageMediator =
        new CorbaMessageMediatorImpl(
            (ORB) broker,
            contactInfo,
            connection,
            GIOPVersion.chooseRequestVersion( (ORB)broker,
                 effectiveTargetIOR),
            effectiveTargetIOR,
            ((CorbaConnection)connection).getNextRequestId(),
            getAddressingDisposition(),
            methodName,
            isOneWay);

    return messageMediator;
}
 
Example 7
Project: openjdk-jdk10   File: CorbaContactInfoListImpl.java   Source Code and License 6 votes vote down vote up
protected void addRemoteContactInfos(
    IOR  effectiveTargetIOR,
    List effectiveTargetIORContactInfoList)
{
    ContactInfo contactInfo;
    List socketInfos = orb.getORBData()
        .getIORToSocketInfo().getSocketInfo(effectiveTargetIOR);
    Iterator iterator = socketInfos.iterator();
    while (iterator.hasNext()) {
        SocketInfo socketInfo = (SocketInfo) iterator.next();
        String type = socketInfo.getType();
        String host = socketInfo.getHost().toLowerCase();
        int    port = socketInfo.getPort();
        contactInfo = createContactInfo(type, host, port);
        effectiveTargetIORContactInfoList.add(contactInfo);
    }
}
 
Example 8
Project: openjdk-jdk10   File: CorbaContactInfoListIteratorImpl.java   Source Code and License 6 votes vote down vote up
public CorbaContactInfoListIteratorImpl(
    ORB orb,
    CorbaContactInfoList corbaContactInfoList,
    ContactInfo primaryContactInfo,
    List listOfContactInfos)
{
    this.orb = orb;
    this.contactInfoList = corbaContactInfoList;
    this.primaryContactInfo = primaryContactInfo;
    if (listOfContactInfos != null) {
        // listOfContactInfos is null when used by the legacy
        // socket factory.  In that case this iterator is NOT used.
        this.effectiveTargetIORIterator = listOfContactInfos.iterator();
    }
    // List is immutable so no need to synchronize access.
    this.listOfContactInfos = listOfContactInfos;

    this.previousContactInfo = null;
    this.isAddrDispositionRetry = false;

    this.successContactInfo = null;
    this.failureContactInfo = null;
    this.failureException = null;

    primaryToContactInfo = orb.getORBData().getIIOPPrimaryToContactInfo();
}
 
Example 9
Project: openjdk-jdk10   File: CorbaContactInfoListIteratorImpl.java   Source Code and License 6 votes vote down vote up
public boolean reportException(ContactInfo contactInfo,
                               RuntimeException ex)
{
    this.failureContactInfo = (CorbaContactInfo)contactInfo;
    this.failureException = ex;
    if (ex instanceof COMM_FAILURE) {
        SystemException se = (SystemException) ex;
        if (se.completed == CompletionStatus.COMPLETED_NO) {
            if (hasNext()) {
                return true;
            }
            if (contactInfoList.getEffectiveTargetIOR() !=
                contactInfoList.getTargetIOR())
            {
                // retry from root ior
                updateEffectiveTargetIOR(contactInfoList.getTargetIOR());
                return true;
            }
        }
    }
    return false;
}
 
Example 10
Project: openjdk-jdk10   File: SharedCDRContactInfoImpl.java   Source Code and License 6 votes vote down vote up
public MessageMediator createMessageMediator(Broker broker,
                                             ContactInfo contactInfo,
                                             Connection connection,
                                             String methodName,
                                             boolean isOneWay)
{
    if (connection != null) {
        /// XXX LOGGING
        throw new RuntimeException("connection is not null");
    }

    CorbaMessageMediator messageMediator =
        new CorbaMessageMediatorImpl(
            (ORB) broker,
            contactInfo,
            null, // Connection;
            GIOPVersion.chooseRequestVersion( (ORB)broker,
                 effectiveTargetIOR),
            effectiveTargetIOR,
            requestId++, // Fake RequestId
            getAddressingDisposition(),
            methodName,
            isOneWay);

    return messageMediator;
}
 
Example 11
Project: openjdk9   File: CorbaContactInfoBase.java   Source Code and License 6 votes vote down vote up
public MessageMediator createMessageMediator(Broker broker,
                                             ContactInfo contactInfo,
                                             Connection connection,
                                             String methodName,
                                             boolean isOneWay)
{
    // REVISIT: Would like version, ior, requestid, etc., decisions
    // to be in client subcontract.  Cannot pass these to this
    // factory method because it breaks generic abstraction.
    // Maybe set methods on mediator called from subcontract
    // after creation?
    CorbaMessageMediator messageMediator =
        new CorbaMessageMediatorImpl(
            (ORB) broker,
            contactInfo,
            connection,
            GIOPVersion.chooseRequestVersion( (ORB)broker,
                 effectiveTargetIOR),
            effectiveTargetIOR,
            ((CorbaConnection)connection).getNextRequestId(),
            getAddressingDisposition(),
            methodName,
            isOneWay);

    return messageMediator;
}
 
Example 12
Project: openjdk9   File: CorbaContactInfoListImpl.java   Source Code and License 6 votes vote down vote up
protected void addRemoteContactInfos(
    IOR  effectiveTargetIOR,
    List effectiveTargetIORContactInfoList)
{
    ContactInfo contactInfo;
    List socketInfos = orb.getORBData()
        .getIORToSocketInfo().getSocketInfo(effectiveTargetIOR);
    Iterator iterator = socketInfos.iterator();
    while (iterator.hasNext()) {
        SocketInfo socketInfo = (SocketInfo) iterator.next();
        String type = socketInfo.getType();
        String host = socketInfo.getHost().toLowerCase();
        int    port = socketInfo.getPort();
        contactInfo = createContactInfo(type, host, port);
        effectiveTargetIORContactInfoList.add(contactInfo);
    }
}
 
Example 13
Project: openjdk9   File: CorbaContactInfoListIteratorImpl.java   Source Code and License 6 votes vote down vote up
public CorbaContactInfoListIteratorImpl(
    ORB orb,
    CorbaContactInfoList corbaContactInfoList,
    ContactInfo primaryContactInfo,
    List listOfContactInfos)
{
    this.orb = orb;
    this.contactInfoList = corbaContactInfoList;
    this.primaryContactInfo = primaryContactInfo;
    if (listOfContactInfos != null) {
        // listOfContactInfos is null when used by the legacy
        // socket factory.  In that case this iterator is NOT used.
        this.effectiveTargetIORIterator = listOfContactInfos.iterator();
    }
    // List is immutable so no need to synchronize access.
    this.listOfContactInfos = listOfContactInfos;

    this.previousContactInfo = null;
    this.isAddrDispositionRetry = false;

    this.successContactInfo = null;
    this.failureContactInfo = null;
    this.failureException = null;

    primaryToContactInfo = orb.getORBData().getIIOPPrimaryToContactInfo();
}
 
Example 14
Project: openjdk9   File: CorbaContactInfoListIteratorImpl.java   Source Code and License 6 votes vote down vote up
public boolean reportException(ContactInfo contactInfo,
                               RuntimeException ex)
{
    this.failureContactInfo = (CorbaContactInfo)contactInfo;
    this.failureException = ex;
    if (ex instanceof COMM_FAILURE) {
        SystemException se = (SystemException) ex;
        if (se.completed == CompletionStatus.COMPLETED_NO) {
            if (hasNext()) {
                return true;
            }
            if (contactInfoList.getEffectiveTargetIOR() !=
                contactInfoList.getTargetIOR())
            {
                // retry from root ior
                updateEffectiveTargetIOR(contactInfoList.getTargetIOR());
                return true;
            }
        }
    }
    return false;
}
 
Example 15
Project: openjdk9   File: SharedCDRContactInfoImpl.java   Source Code and License 6 votes vote down vote up
public MessageMediator createMessageMediator(Broker broker,
                                             ContactInfo contactInfo,
                                             Connection connection,
                                             String methodName,
                                             boolean isOneWay)
{
    if (connection != null) {
        /// XXX LOGGING
        throw new RuntimeException("connection is not null");
    }

    CorbaMessageMediator messageMediator =
        new CorbaMessageMediatorImpl(
            (ORB) broker,
            contactInfo,
            null, // Connection;
            GIOPVersion.chooseRequestVersion( (ORB)broker,
                 effectiveTargetIOR),
            effectiveTargetIOR,
            requestId++, // Fake RequestId
            getAddressingDisposition(),
            methodName,
            isOneWay);

    return messageMediator;
}
 
Example 16
Project: lookaside_java-1.8.0-openjdk   File: CorbaContactInfoBase.java   Source Code and License 6 votes vote down vote up
public MessageMediator createMessageMediator(Broker broker,
                                             ContactInfo contactInfo,
                                             Connection connection,
                                             String methodName,
                                             boolean isOneWay)
{
    // REVISIT: Would like version, ior, requestid, etc., decisions
    // to be in client subcontract.  Cannot pass these to this
    // factory method because it breaks generic abstraction.
    // Maybe set methods on mediator called from subcontract
    // after creation?
    CorbaMessageMediator messageMediator =
        new CorbaMessageMediatorImpl(
            (ORB) broker,
            contactInfo,
            connection,
            GIOPVersion.chooseRequestVersion( (ORB)broker,
                 effectiveTargetIOR),
            effectiveTargetIOR,
            ((CorbaConnection)connection).getNextRequestId(),
            getAddressingDisposition(),
            methodName,
            isOneWay);

    return messageMediator;
}
 
Example 17
Project: lookaside_java-1.8.0-openjdk   File: CorbaContactInfoListImpl.java   Source Code and License 6 votes vote down vote up
protected void addRemoteContactInfos(
    IOR  effectiveTargetIOR,
    List effectiveTargetIORContactInfoList)
{
    ContactInfo contactInfo;
    List socketInfos = orb.getORBData()
        .getIORToSocketInfo().getSocketInfo(effectiveTargetIOR);
    Iterator iterator = socketInfos.iterator();
    while (iterator.hasNext()) {
        SocketInfo socketInfo = (SocketInfo) iterator.next();
        String type = socketInfo.getType();
        String host = socketInfo.getHost().toLowerCase();
        int    port = socketInfo.getPort();
        contactInfo = createContactInfo(type, host, port);
        effectiveTargetIORContactInfoList.add(contactInfo);
    }
}
 
Example 18
Project: lookaside_java-1.8.0-openjdk   File: CorbaContactInfoListIteratorImpl.java   Source Code and License 6 votes vote down vote up
public CorbaContactInfoListIteratorImpl(
    ORB orb,
    CorbaContactInfoList corbaContactInfoList,
    ContactInfo primaryContactInfo,
    List listOfContactInfos)
{
    this.orb = orb;
    this.contactInfoList = corbaContactInfoList;
    this.primaryContactInfo = primaryContactInfo;
    if (listOfContactInfos != null) {
        // listOfContactInfos is null when used by the legacy
        // socket factory.  In that case this iterator is NOT used.
        this.effectiveTargetIORIterator = listOfContactInfos.iterator();
    }
    // List is immutable so no need to synchronize access.
    this.listOfContactInfos = listOfContactInfos;

    this.previousContactInfo = null;
    this.isAddrDispositionRetry = false;

    this.successContactInfo = null;
    this.failureContactInfo = null;
    this.failureException = null;

    primaryToContactInfo = orb.getORBData().getIIOPPrimaryToContactInfo();
}
 
Example 19
Project: lookaside_java-1.8.0-openjdk   File: CorbaContactInfoListIteratorImpl.java   Source Code and License 6 votes vote down vote up
public boolean reportException(ContactInfo contactInfo,
                               RuntimeException ex)
{
    this.failureContactInfo = (CorbaContactInfo)contactInfo;
    this.failureException = ex;
    if (ex instanceof COMM_FAILURE) {
        SystemException se = (SystemException) ex;
        if (se.completed == CompletionStatus.COMPLETED_NO) {
            if (hasNext()) {
                return true;
            }
            if (contactInfoList.getEffectiveTargetIOR() !=
                contactInfoList.getTargetIOR())
            {
                // retry from root ior
                updateEffectiveTargetIOR(contactInfoList.getTargetIOR());
                return true;
            }
        }
    }
    return false;
}
 
Example 20
Project: lookaside_java-1.8.0-openjdk   File: SharedCDRContactInfoImpl.java   Source Code and License 6 votes vote down vote up
public MessageMediator createMessageMediator(Broker broker,
                                             ContactInfo contactInfo,
                                             Connection connection,
                                             String methodName,
                                             boolean isOneWay)
{
    if (connection != null) {
        /// XXX LOGGING
        throw new RuntimeException("connection is not null");
    }

    CorbaMessageMediator messageMediator =
        new CorbaMessageMediatorImpl(
            (ORB) broker,
            contactInfo,
            null, // Connection;
            GIOPVersion.chooseRequestVersion( (ORB)broker,
                 effectiveTargetIOR),
            effectiveTargetIOR,
            requestId++, // Fake RequestId
            getAddressingDisposition(),
            methodName,
            isOneWay);

    return messageMediator;
}
 
Example 21
Project: jdk8u_corba   File: CorbaContactInfoBase.java   Source Code and License 6 votes vote down vote up
public MessageMediator createMessageMediator(Broker broker,
                                             ContactInfo contactInfo,
                                             Connection connection,
                                             String methodName,
                                             boolean isOneWay)
{
    // REVISIT: Would like version, ior, requestid, etc., decisions
    // to be in client subcontract.  Cannot pass these to this
    // factory method because it breaks generic abstraction.
    // Maybe set methods on mediator called from subcontract
    // after creation?
    CorbaMessageMediator messageMediator =
        new CorbaMessageMediatorImpl(
            (ORB) broker,
            contactInfo,
            connection,
            GIOPVersion.chooseRequestVersion( (ORB)broker,
                 effectiveTargetIOR),
            effectiveTargetIOR,
            ((CorbaConnection)connection).getNextRequestId(),
            getAddressingDisposition(),
            methodName,
            isOneWay);

    return messageMediator;
}
 
Example 22
Project: jdk8u_corba   File: CorbaContactInfoListImpl.java   Source Code and License 6 votes vote down vote up
protected void addRemoteContactInfos(
    IOR  effectiveTargetIOR,
    List effectiveTargetIORContactInfoList)
{
    ContactInfo contactInfo;
    List socketInfos = orb.getORBData()
        .getIORToSocketInfo().getSocketInfo(effectiveTargetIOR);
    Iterator iterator = socketInfos.iterator();
    while (iterator.hasNext()) {
        SocketInfo socketInfo = (SocketInfo) iterator.next();
        String type = socketInfo.getType();
        String host = socketInfo.getHost().toLowerCase();
        int    port = socketInfo.getPort();
        contactInfo = createContactInfo(type, host, port);
        effectiveTargetIORContactInfoList.add(contactInfo);
    }
}
 
Example 23
Project: jdk8u_corba   File: CorbaContactInfoListIteratorImpl.java   Source Code and License 6 votes vote down vote up
public CorbaContactInfoListIteratorImpl(
    ORB orb,
    CorbaContactInfoList corbaContactInfoList,
    ContactInfo primaryContactInfo,
    List listOfContactInfos)
{
    this.orb = orb;
    this.contactInfoList = corbaContactInfoList;
    this.primaryContactInfo = primaryContactInfo;
    if (listOfContactInfos != null) {
        // listOfContactInfos is null when used by the legacy
        // socket factory.  In that case this iterator is NOT used.
        this.effectiveTargetIORIterator = listOfContactInfos.iterator();
    }
    // List is immutable so no need to synchronize access.
    this.listOfContactInfos = listOfContactInfos;

    this.previousContactInfo = null;
    this.isAddrDispositionRetry = false;

    this.successContactInfo = null;
    this.failureContactInfo = null;
    this.failureException = null;

    primaryToContactInfo = orb.getORBData().getIIOPPrimaryToContactInfo();
}
 
Example 24
Project: jdk8u_corba   File: CorbaContactInfoListIteratorImpl.java   Source Code and License 6 votes vote down vote up
public boolean reportException(ContactInfo contactInfo,
                               RuntimeException ex)
{
    this.failureContactInfo = (CorbaContactInfo)contactInfo;
    this.failureException = ex;
    if (ex instanceof COMM_FAILURE) {
        SystemException se = (SystemException) ex;
        if (se.completed == CompletionStatus.COMPLETED_NO) {
            if (hasNext()) {
                return true;
            }
            if (contactInfoList.getEffectiveTargetIOR() !=
                contactInfoList.getTargetIOR())
            {
                // retry from root ior
                updateEffectiveTargetIOR(contactInfoList.getTargetIOR());
                return true;
            }
        }
    }
    return false;
}
 
Example 25
Project: jdk8u_corba   File: SharedCDRContactInfoImpl.java   Source Code and License 6 votes vote down vote up
public MessageMediator createMessageMediator(Broker broker,
                                             ContactInfo contactInfo,
                                             Connection connection,
                                             String methodName,
                                             boolean isOneWay)
{
    if (connection != null) {
        /// XXX LOGGING
        throw new RuntimeException("connection is not null");
    }

    CorbaMessageMediator messageMediator =
        new CorbaMessageMediatorImpl(
            (ORB) broker,
            contactInfo,
            null, // Connection;
            GIOPVersion.chooseRequestVersion( (ORB)broker,
                 effectiveTargetIOR),
            effectiveTargetIOR,
            requestId++, // Fake RequestId
            getAddressingDisposition(),
            methodName,
            isOneWay);

    return messageMediator;
}
 
Example 26
Project: infobip-open-jdk-8   File: CorbaContactInfoBase.java   Source Code and License 6 votes vote down vote up
public MessageMediator createMessageMediator(Broker broker,
                                             ContactInfo contactInfo,
                                             Connection connection,
                                             String methodName,
                                             boolean isOneWay)
{
    // REVISIT: Would like version, ior, requestid, etc., decisions
    // to be in client subcontract.  Cannot pass these to this
    // factory method because it breaks generic abstraction.
    // Maybe set methods on mediator called from subcontract
    // after creation?
    CorbaMessageMediator messageMediator =
        new CorbaMessageMediatorImpl(
            (ORB) broker,
            contactInfo,
            connection,
            GIOPVersion.chooseRequestVersion( (ORB)broker,
                 effectiveTargetIOR),
            effectiveTargetIOR,
            ((CorbaConnection)connection).getNextRequestId(),
            getAddressingDisposition(),
            methodName,
            isOneWay);

    return messageMediator;
}
 
Example 27
Project: infobip-open-jdk-8   File: CorbaContactInfoListImpl.java   Source Code and License 6 votes vote down vote up
protected void addRemoteContactInfos(
    IOR  effectiveTargetIOR,
    List effectiveTargetIORContactInfoList)
{
    ContactInfo contactInfo;
    List socketInfos = orb.getORBData()
        .getIORToSocketInfo().getSocketInfo(effectiveTargetIOR);
    Iterator iterator = socketInfos.iterator();
    while (iterator.hasNext()) {
        SocketInfo socketInfo = (SocketInfo) iterator.next();
        String type = socketInfo.getType();
        String host = socketInfo.getHost().toLowerCase();
        int    port = socketInfo.getPort();
        contactInfo = createContactInfo(type, host, port);
        effectiveTargetIORContactInfoList.add(contactInfo);
    }
}
 
Example 28
Project: infobip-open-jdk-8   File: CorbaContactInfoListIteratorImpl.java   Source Code and License 6 votes vote down vote up
public CorbaContactInfoListIteratorImpl(
    ORB orb,
    CorbaContactInfoList corbaContactInfoList,
    ContactInfo primaryContactInfo,
    List listOfContactInfos)
{
    this.orb = orb;
    this.contactInfoList = corbaContactInfoList;
    this.primaryContactInfo = primaryContactInfo;
    if (listOfContactInfos != null) {
        // listOfContactInfos is null when used by the legacy
        // socket factory.  In that case this iterator is NOT used.
        this.effectiveTargetIORIterator = listOfContactInfos.iterator();
    }
    // List is immutable so no need to synchronize access.
    this.listOfContactInfos = listOfContactInfos;

    this.previousContactInfo = null;
    this.isAddrDispositionRetry = false;

    this.successContactInfo = null;
    this.failureContactInfo = null;
    this.failureException = null;

    primaryToContactInfo = orb.getORBData().getIIOPPrimaryToContactInfo();
}
 
Example 29
Project: infobip-open-jdk-8   File: CorbaContactInfoListIteratorImpl.java   Source Code and License 6 votes vote down vote up
public boolean reportException(ContactInfo contactInfo,
                               RuntimeException ex)
{
    this.failureContactInfo = (CorbaContactInfo)contactInfo;
    this.failureException = ex;
    if (ex instanceof COMM_FAILURE) {
        SystemException se = (SystemException) ex;
        if (se.completed == CompletionStatus.COMPLETED_NO) {
            if (hasNext()) {
                return true;
            }
            if (contactInfoList.getEffectiveTargetIOR() !=
                contactInfoList.getTargetIOR())
            {
                // retry from root ior
                updateEffectiveTargetIOR(contactInfoList.getTargetIOR());
                return true;
            }
        }
    }
    return false;
}
 
Example 30
Project: infobip-open-jdk-8   File: SharedCDRContactInfoImpl.java   Source Code and License 6 votes vote down vote up
public MessageMediator createMessageMediator(Broker broker,
                                             ContactInfo contactInfo,
                                             Connection connection,
                                             String methodName,
                                             boolean isOneWay)
{
    if (connection != null) {
        /// XXX LOGGING
        throw new RuntimeException("connection is not null");
    }

    CorbaMessageMediator messageMediator =
        new CorbaMessageMediatorImpl(
            (ORB) broker,
            contactInfo,
            null, // Connection;
            GIOPVersion.chooseRequestVersion( (ORB)broker,
                 effectiveTargetIOR),
            effectiveTargetIOR,
            requestId++, // Fake RequestId
            getAddressingDisposition(),
            methodName,
            isOneWay);

    return messageMediator;
}
 
Example 31
Project: openjdk-source-code-learn   File: CorbaContactInfoBase.java   Source Code and License 6 votes vote down vote up
public MessageMediator createMessageMediator(Broker broker,
                                             ContactInfo contactInfo,
                                             Connection connection,
                                             String methodName,
                                             boolean isOneWay)
{
    // REVISIT: Would like version, ior, requestid, etc., decisions
    // to be in client subcontract.  Cannot pass these to this
    // factory method because it breaks generic abstraction.
    // Maybe set methods on mediator called from subcontract
    // after creation?
    CorbaMessageMediator messageMediator =
        new CorbaMessageMediatorImpl(
            (ORB) broker,
            contactInfo,
            connection,
            GIOPVersion.chooseRequestVersion( (ORB)broker,
                 effectiveTargetIOR),
            effectiveTargetIOR,
            ((CorbaConnection)connection).getNextRequestId(),
            getAddressingDisposition(),
            methodName,
            isOneWay);

    return messageMediator;
}
 
Example 32
Project: openjdk-source-code-learn   File: CorbaContactInfoListImpl.java   Source Code and License 6 votes vote down vote up
protected void addRemoteContactInfos(
    IOR  effectiveTargetIOR,
    List effectiveTargetIORContactInfoList)
{
    ContactInfo contactInfo;
    List socketInfos = orb.getORBData()
        .getIORToSocketInfo().getSocketInfo(effectiveTargetIOR);
    Iterator iterator = socketInfos.iterator();
    while (iterator.hasNext()) {
        SocketInfo socketInfo = (SocketInfo) iterator.next();
        String type = socketInfo.getType();
        String host = socketInfo.getHost().toLowerCase();
        int    port = socketInfo.getPort();
        contactInfo = createContactInfo(type, host, port);
        effectiveTargetIORContactInfoList.add(contactInfo);
    }
}
 
Example 33
Project: openjdk-source-code-learn   File: CorbaContactInfoListIteratorImpl.java   Source Code and License 6 votes vote down vote up
public CorbaContactInfoListIteratorImpl(
    ORB orb,
    CorbaContactInfoList corbaContactInfoList,
    ContactInfo primaryContactInfo,
    List listOfContactInfos)
{
    this.orb = orb;
    this.contactInfoList = corbaContactInfoList;
    this.primaryContactInfo = primaryContactInfo;
    if (listOfContactInfos != null) {
        // listOfContactInfos is null when used by the legacy
        // socket factory.  In that case this iterator is NOT used.
        this.effectiveTargetIORIterator = listOfContactInfos.iterator();
    }
    // List is immutable so no need to synchronize access.
    this.listOfContactInfos = listOfContactInfos;

    this.previousContactInfo = null;
    this.isAddrDispositionRetry = false;

    this.successContactInfo = null;
    this.failureContactInfo = null;
    this.failureException = null;

    primaryToContactInfo = orb.getORBData().getIIOPPrimaryToContactInfo();
}
 
Example 34
Project: openjdk-source-code-learn   File: CorbaContactInfoListIteratorImpl.java   Source Code and License 6 votes vote down vote up
public boolean reportException(ContactInfo contactInfo,
                               RuntimeException ex)
{
    this.failureContactInfo = (CorbaContactInfo)contactInfo;
    this.failureException = ex;
    if (ex instanceof COMM_FAILURE) {
        SystemException se = (SystemException) ex;
        if (se.completed == CompletionStatus.COMPLETED_NO) {
            if (hasNext()) {
                return true;
            }
            if (contactInfoList.getEffectiveTargetIOR() !=
                contactInfoList.getTargetIOR())
            {
                // retry from root ior
                updateEffectiveTargetIOR(contactInfoList.getTargetIOR());
                return true;
            }
        }
    }
    return false;
}
 
Example 35
Project: openjdk-source-code-learn   File: SharedCDRContactInfoImpl.java   Source Code and License 6 votes vote down vote up
public MessageMediator createMessageMediator(Broker broker,
                                             ContactInfo contactInfo,
                                             Connection connection,
                                             String methodName,
                                             boolean isOneWay)
{
    if (connection != null) {
        /// XXX LOGGING
        throw new RuntimeException("connection is not null");
    }

    CorbaMessageMediator messageMediator =
        new CorbaMessageMediatorImpl(
            (ORB) broker,
            contactInfo,
            null, // Connection;
            GIOPVersion.chooseRequestVersion( (ORB)broker,
                 effectiveTargetIOR),
            effectiveTargetIOR,
            requestId++, // Fake RequestId
            getAddressingDisposition(),
            methodName,
            isOneWay);

    return messageMediator;
}
 
Example 36
Project: OLD-OpenJDK8   File: CorbaContactInfoBase.java   Source Code and License 6 votes vote down vote up
public MessageMediator createMessageMediator(Broker broker,
                                             ContactInfo contactInfo,
                                             Connection connection,
                                             String methodName,
                                             boolean isOneWay)
{
    // REVISIT: Would like version, ior, requestid, etc., decisions
    // to be in client subcontract.  Cannot pass these to this
    // factory method because it breaks generic abstraction.
    // Maybe set methods on mediator called from subcontract
    // after creation?
    CorbaMessageMediator messageMediator =
        new CorbaMessageMediatorImpl(
            (ORB) broker,
            contactInfo,
            connection,
            GIOPVersion.chooseRequestVersion( (ORB)broker,
                 effectiveTargetIOR),
            effectiveTargetIOR,
            ((CorbaConnection)connection).getNextRequestId(),
            getAddressingDisposition(),
            methodName,
            isOneWay);

    return messageMediator;
}
 
Example 37
Project: OLD-OpenJDK8   File: CorbaContactInfoListImpl.java   Source Code and License 6 votes vote down vote up
protected void addRemoteContactInfos(
    IOR  effectiveTargetIOR,
    List effectiveTargetIORContactInfoList)
{
    ContactInfo contactInfo;
    List socketInfos = orb.getORBData()
        .getIORToSocketInfo().getSocketInfo(effectiveTargetIOR);
    Iterator iterator = socketInfos.iterator();
    while (iterator.hasNext()) {
        SocketInfo socketInfo = (SocketInfo) iterator.next();
        String type = socketInfo.getType();
        String host = socketInfo.getHost().toLowerCase();
        int    port = socketInfo.getPort();
        contactInfo = createContactInfo(type, host, port);
        effectiveTargetIORContactInfoList.add(contactInfo);
    }
}
 
Example 38
Project: OLD-OpenJDK8   File: CorbaContactInfoListIteratorImpl.java   Source Code and License 6 votes vote down vote up
public CorbaContactInfoListIteratorImpl(
    ORB orb,
    CorbaContactInfoList corbaContactInfoList,
    ContactInfo primaryContactInfo,
    List listOfContactInfos)
{
    this.orb = orb;
    this.contactInfoList = corbaContactInfoList;
    this.primaryContactInfo = primaryContactInfo;
    if (listOfContactInfos != null) {
        // listOfContactInfos is null when used by the legacy
        // socket factory.  In that case this iterator is NOT used.
        this.effectiveTargetIORIterator = listOfContactInfos.iterator();
    }
    // List is immutable so no need to synchronize access.
    this.listOfContactInfos = listOfContactInfos;

    this.previousContactInfo = null;
    this.isAddrDispositionRetry = false;

    this.successContactInfo = null;
    this.failureContactInfo = null;
    this.failureException = null;

    primaryToContactInfo = orb.getORBData().getIIOPPrimaryToContactInfo();
}
 
Example 39
Project: OLD-OpenJDK8   File: CorbaContactInfoListIteratorImpl.java   Source Code and License 6 votes vote down vote up
public boolean reportException(ContactInfo contactInfo,
                               RuntimeException ex)
{
    this.failureContactInfo = (CorbaContactInfo)contactInfo;
    this.failureException = ex;
    if (ex instanceof COMM_FAILURE) {
        SystemException se = (SystemException) ex;
        if (se.completed == CompletionStatus.COMPLETED_NO) {
            if (hasNext()) {
                return true;
            }
            if (contactInfoList.getEffectiveTargetIOR() !=
                contactInfoList.getTargetIOR())
            {
                // retry from root ior
                updateEffectiveTargetIOR(contactInfoList.getTargetIOR());
                return true;
            }
        }
    }
    return false;
}
 
Example 40
Project: OLD-OpenJDK8   File: SharedCDRContactInfoImpl.java   Source Code and License 6 votes vote down vote up
public MessageMediator createMessageMediator(Broker broker,
                                             ContactInfo contactInfo,
                                             Connection connection,
                                             String methodName,
                                             boolean isOneWay)
{
    if (connection != null) {
        /// XXX LOGGING
        throw new RuntimeException("connection is not null");
    }

    CorbaMessageMediator messageMediator =
        new CorbaMessageMediatorImpl(
            (ORB) broker,
            contactInfo,
            null, // Connection;
            GIOPVersion.chooseRequestVersion( (ORB)broker,
                 effectiveTargetIOR),
            effectiveTargetIOR,
            requestId++, // Fake RequestId
            getAddressingDisposition(),
            methodName,
            isOneWay);

    return messageMediator;
}