com.sun.corba.se.spi.transport.CorbaContactInfo Java Examples

The following examples show how to use com.sun.corba.se.spi.transport.CorbaContactInfo. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: ClientRequestInfoImpl.java    From openjdk-jdk8u with GNU General Public License v2.0 6 votes vote down vote up
/**
 * The actual object on which the operation will be invoked.  If the
 * reply_status is LOCATION_FORWARD, then on subsequent requests,
 * effective_target will contain the forwarded IOR while target will
 * remain unchanged.
 */
public org.omg.CORBA.Object effective_target() {
    // access is currently valid for all states:
    //checkAccess( MID_EFFECTIVE_TARGET );

    // Note: This is not necessarily the same as locatedIOR.
    // Reason: See the way we handle COMM_FAILURES in
    // ClientRequestDispatcher.createRequest, v1.32

    if (cachedEffectiveTargetObject == null) {
        CorbaContactInfo corbaContactInfo = (CorbaContactInfo)
            messageMediator.getContactInfo();
        // REVISIT - get through chain like getLocatedIOR helper below.
        cachedEffectiveTargetObject =
            iorToObject(corbaContactInfo.getEffectiveTargetIOR());
    }
    return cachedEffectiveTargetObject;
}
 
Example #2
Source File: ClientRequestInfoImpl.java    From hottub with GNU General Public License v2.0 6 votes vote down vote up
/**
 * The profile that will be used to send the request.  If a location
 * forward has occurred for this operation's object and that object's
 * profile change accordingly, then this profile will be that located
 * profile.
 */
public TaggedProfile effective_profile (){
    // access is currently valid for all states:
    //checkAccess( MID_EFFECTIVE_PROFILE );

    if( cachedEffectiveProfile == null ) {
        CorbaContactInfo corbaContactInfo = (CorbaContactInfo)
            messageMediator.getContactInfo();
        cachedEffectiveProfile =
            corbaContactInfo.getEffectiveProfile().getIOPProfile();
    }

    // Good citizen: In the interest of efficiency, we assume interceptors
    // will not modify the returned TaggedProfile in any way so we need
    // not make a deep copy of it.

    return cachedEffectiveProfile;
}
 
Example #3
Source File: ClientRequestInfoImpl.java    From JDKSourceCode1.8 with MIT License 6 votes vote down vote up
/**
 * The profile that will be used to send the request.  If a location
 * forward has occurred for this operation's object and that object's
 * profile change accordingly, then this profile will be that located
 * profile.
 */
public TaggedProfile effective_profile (){
    // access is currently valid for all states:
    //checkAccess( MID_EFFECTIVE_PROFILE );

    if( cachedEffectiveProfile == null ) {
        CorbaContactInfo corbaContactInfo = (CorbaContactInfo)
            messageMediator.getContactInfo();
        cachedEffectiveProfile =
            corbaContactInfo.getEffectiveProfile().getIOPProfile();
    }

    // Good citizen: In the interest of efficiency, we assume interceptors
    // will not modify the returned TaggedProfile in any way so we need
    // not make a deep copy of it.

    return cachedEffectiveProfile;
}
 
Example #4
Source File: ClientRequestInfoImpl.java    From jdk1.8-source-analysis with Apache License 2.0 6 votes vote down vote up
/**
 * The actual object on which the operation will be invoked.  If the
 * reply_status is LOCATION_FORWARD, then on subsequent requests,
 * effective_target will contain the forwarded IOR while target will
 * remain unchanged.
 */
public org.omg.CORBA.Object effective_target() {
    // access is currently valid for all states:
    //checkAccess( MID_EFFECTIVE_TARGET );

    // Note: This is not necessarily the same as locatedIOR.
    // Reason: See the way we handle COMM_FAILURES in
    // ClientRequestDispatcher.createRequest, v1.32

    if (cachedEffectiveTargetObject == null) {
        CorbaContactInfo corbaContactInfo = (CorbaContactInfo)
            messageMediator.getContactInfo();
        // REVISIT - get through chain like getLocatedIOR helper below.
        cachedEffectiveTargetObject =
            iorToObject(corbaContactInfo.getEffectiveTargetIOR());
    }
    return cachedEffectiveTargetObject;
}
 
Example #5
Source File: CorbaContactInfoListIteratorImpl.java    From jdk1.8-source-analysis with Apache License 2.0 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 #6
Source File: ClientRequestInfoImpl.java    From openjdk-jdk9 with GNU General Public License v2.0 6 votes vote down vote up
/**
 * The profile that will be used to send the request.  If a location
 * forward has occurred for this operation's object and that object's
 * profile change accordingly, then this profile will be that located
 * profile.
 */
public TaggedProfile effective_profile (){
    // access is currently valid for all states:
    //checkAccess( MID_EFFECTIVE_PROFILE );

    if( cachedEffectiveProfile == null ) {
        CorbaContactInfo corbaContactInfo = (CorbaContactInfo)
            messageMediator.getContactInfo();
        cachedEffectiveProfile =
            corbaContactInfo.getEffectiveProfile().getIOPProfile();
    }

    // Good citizen: In the interest of efficiency, we assume interceptors
    // will not modify the returned TaggedProfile in any way so we need
    // not make a deep copy of it.

    return cachedEffectiveProfile;
}
 
Example #7
Source File: CorbaContactInfoListIteratorImpl.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 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 #8
Source File: ClientRequestInfoImpl.java    From openjdk-8-source with GNU General Public License v2.0 6 votes vote down vote up
/**
 * The actual object on which the operation will be invoked.  If the
 * reply_status is LOCATION_FORWARD, then on subsequent requests,
 * effective_target will contain the forwarded IOR while target will
 * remain unchanged.
 */
public org.omg.CORBA.Object effective_target() {
    // access is currently valid for all states:
    //checkAccess( MID_EFFECTIVE_TARGET );

    // Note: This is not necessarily the same as locatedIOR.
    // Reason: See the way we handle COMM_FAILURES in
    // ClientRequestDispatcher.createRequest, v1.32

    if (cachedEffectiveTargetObject == null) {
        CorbaContactInfo corbaContactInfo = (CorbaContactInfo)
            messageMediator.getContactInfo();
        // REVISIT - get through chain like getLocatedIOR helper below.
        cachedEffectiveTargetObject =
            iorToObject(corbaContactInfo.getEffectiveTargetIOR());
    }
    return cachedEffectiveTargetObject;
}
 
Example #9
Source File: ClientRequestInfoImpl.java    From openjdk-jdk8u with GNU General Public License v2.0 6 votes vote down vote up
/**
 * The profile that will be used to send the request.  If a location
 * forward has occurred for this operation's object and that object's
 * profile change accordingly, then this profile will be that located
 * profile.
 */
public TaggedProfile effective_profile (){
    // access is currently valid for all states:
    //checkAccess( MID_EFFECTIVE_PROFILE );

    if( cachedEffectiveProfile == null ) {
        CorbaContactInfo corbaContactInfo = (CorbaContactInfo)
            messageMediator.getContactInfo();
        cachedEffectiveProfile =
            corbaContactInfo.getEffectiveProfile().getIOPProfile();
    }

    // Good citizen: In the interest of efficiency, we assume interceptors
    // will not modify the returned TaggedProfile in any way so we need
    // not make a deep copy of it.

    return cachedEffectiveProfile;
}
 
Example #10
Source File: CorbaMessageMediatorImpl.java    From openjdk-jdk8u with GNU General Public License v2.0 6 votes vote down vote up
private byte getStreamFormatVersionForThisRequest(IOR ior,
                                                  GIOPVersion giopVersion)
{

    byte localMaxVersion
        = ORBUtility.getMaxStreamFormatVersion();

    IOR effectiveTargetIOR =
        ((CorbaContactInfo)this.contactInfo).getEffectiveTargetIOR();
    IIOPProfileTemplate temp =
        (IIOPProfileTemplate)effectiveTargetIOR.getProfile().getTaggedProfileTemplate();
    Iterator iter = temp.iteratorById(TAG_RMI_CUSTOM_MAX_STREAM_FORMAT.value);
    if (!iter.hasNext()) {
        // Didn't have the max stream format version tagged
        // component.
        if (giopVersion.lessThan(GIOPVersion.V1_3))
            return ORBConstants.STREAM_FORMAT_VERSION_1;
        else
            return ORBConstants.STREAM_FORMAT_VERSION_2;
    }

    byte remoteMaxVersion
        = ((MaxStreamFormatVersionComponent)iter.next()).getMaxStreamFormatVersion();

    return (byte)Math.min(localMaxVersion, remoteMaxVersion);
}
 
Example #11
Source File: ClientRequestInfoImpl.java    From JDKSourceCode1.8 with MIT License 6 votes vote down vote up
/**
 * The actual object on which the operation will be invoked.  If the
 * reply_status is LOCATION_FORWARD, then on subsequent requests,
 * effective_target will contain the forwarded IOR while target will
 * remain unchanged.
 */
public org.omg.CORBA.Object effective_target() {
    // access is currently valid for all states:
    //checkAccess( MID_EFFECTIVE_TARGET );

    // Note: This is not necessarily the same as locatedIOR.
    // Reason: See the way we handle COMM_FAILURES in
    // ClientRequestDispatcher.createRequest, v1.32

    if (cachedEffectiveTargetObject == null) {
        CorbaContactInfo corbaContactInfo = (CorbaContactInfo)
            messageMediator.getContactInfo();
        // REVISIT - get through chain like getLocatedIOR helper below.
        cachedEffectiveTargetObject =
            iorToObject(corbaContactInfo.getEffectiveTargetIOR());
    }
    return cachedEffectiveTargetObject;
}
 
Example #12
Source File: ClientRequestInfoImpl.java    From jdk1.8-source-analysis with Apache License 2.0 6 votes vote down vote up
/**
 * The profile that will be used to send the request.  If a location
 * forward has occurred for this operation's object and that object's
 * profile change accordingly, then this profile will be that located
 * profile.
 */
public TaggedProfile effective_profile (){
    // access is currently valid for all states:
    //checkAccess( MID_EFFECTIVE_PROFILE );

    if( cachedEffectiveProfile == null ) {
        CorbaContactInfo corbaContactInfo = (CorbaContactInfo)
            messageMediator.getContactInfo();
        cachedEffectiveProfile =
            corbaContactInfo.getEffectiveProfile().getIOPProfile();
    }

    // Good citizen: In the interest of efficiency, we assume interceptors
    // will not modify the returned TaggedProfile in any way so we need
    // not make a deep copy of it.

    return cachedEffectiveProfile;
}
 
Example #13
Source File: CorbaContactInfoListIteratorImpl.java    From openjdk-8-source with GNU General Public License v2.0 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 #14
Source File: ClientRequestInfoImpl.java    From openjdk-8-source with GNU General Public License v2.0 6 votes vote down vote up
/**
 * The profile that will be used to send the request.  If a location
 * forward has occurred for this operation's object and that object's
 * profile change accordingly, then this profile will be that located
 * profile.
 */
public TaggedProfile effective_profile (){
    // access is currently valid for all states:
    //checkAccess( MID_EFFECTIVE_PROFILE );

    if( cachedEffectiveProfile == null ) {
        CorbaContactInfo corbaContactInfo = (CorbaContactInfo)
            messageMediator.getContactInfo();
        cachedEffectiveProfile =
            corbaContactInfo.getEffectiveProfile().getIOPProfile();
    }

    // Good citizen: In the interest of efficiency, we assume interceptors
    // will not modify the returned TaggedProfile in any way so we need
    // not make a deep copy of it.

    return cachedEffectiveProfile;
}
 
Example #15
Source File: ClientRequestInfoImpl.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 6 votes vote down vote up
/**
 * The profile that will be used to send the request.  If a location
 * forward has occurred for this operation's object and that object's
 * profile change accordingly, then this profile will be that located
 * profile.
 */
public TaggedProfile effective_profile (){
    // access is currently valid for all states:
    //checkAccess( MID_EFFECTIVE_PROFILE );

    if( cachedEffectiveProfile == null ) {
        CorbaContactInfo corbaContactInfo = (CorbaContactInfo)
            messageMediator.getContactInfo();
        cachedEffectiveProfile =
            corbaContactInfo.getEffectiveProfile().getIOPProfile();
    }

    // Good citizen: In the interest of efficiency, we assume interceptors
    // will not modify the returned TaggedProfile in any way so we need
    // not make a deep copy of it.

    return cachedEffectiveProfile;
}
 
Example #16
Source File: CorbaContactInfoListIteratorImpl.java    From hottub with GNU General Public License v2.0 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 #17
Source File: ClientRequestInfoImpl.java    From jdk8u60 with GNU General Public License v2.0 6 votes vote down vote up
/**
 * The actual object on which the operation will be invoked.  If the
 * reply_status is LOCATION_FORWARD, then on subsequent requests,
 * effective_target will contain the forwarded IOR while target will
 * remain unchanged.
 */
public org.omg.CORBA.Object effective_target() {
    // access is currently valid for all states:
    //checkAccess( MID_EFFECTIVE_TARGET );

    // Note: This is not necessarily the same as locatedIOR.
    // Reason: See the way we handle COMM_FAILURES in
    // ClientRequestDispatcher.createRequest, v1.32

    if (cachedEffectiveTargetObject == null) {
        CorbaContactInfo corbaContactInfo = (CorbaContactInfo)
            messageMediator.getContactInfo();
        // REVISIT - get through chain like getLocatedIOR helper below.
        cachedEffectiveTargetObject =
            iorToObject(corbaContactInfo.getEffectiveTargetIOR());
    }
    return cachedEffectiveTargetObject;
}
 
Example #18
Source File: ClientRequestInfoImpl.java    From jdk8u60 with GNU General Public License v2.0 6 votes vote down vote up
/**
 * The profile that will be used to send the request.  If a location
 * forward has occurred for this operation's object and that object's
 * profile change accordingly, then this profile will be that located
 * profile.
 */
public TaggedProfile effective_profile (){
    // access is currently valid for all states:
    //checkAccess( MID_EFFECTIVE_PROFILE );

    if( cachedEffectiveProfile == null ) {
        CorbaContactInfo corbaContactInfo = (CorbaContactInfo)
            messageMediator.getContactInfo();
        cachedEffectiveProfile =
            corbaContactInfo.getEffectiveProfile().getIOPProfile();
    }

    // Good citizen: In the interest of efficiency, we assume interceptors
    // will not modify the returned TaggedProfile in any way so we need
    // not make a deep copy of it.

    return cachedEffectiveProfile;
}
 
Example #19
Source File: ClientRequestInfoImpl.java    From TencentKona-8 with GNU General Public License v2.0 6 votes vote down vote up
/**
 * The actual object on which the operation will be invoked.  If the
 * reply_status is LOCATION_FORWARD, then on subsequent requests,
 * effective_target will contain the forwarded IOR while target will
 * remain unchanged.
 */
public org.omg.CORBA.Object effective_target() {
    // access is currently valid for all states:
    //checkAccess( MID_EFFECTIVE_TARGET );

    // Note: This is not necessarily the same as locatedIOR.
    // Reason: See the way we handle COMM_FAILURES in
    // ClientRequestDispatcher.createRequest, v1.32

    if (cachedEffectiveTargetObject == null) {
        CorbaContactInfo corbaContactInfo = (CorbaContactInfo)
            messageMediator.getContactInfo();
        // REVISIT - get through chain like getLocatedIOR helper below.
        cachedEffectiveTargetObject =
            iorToObject(corbaContactInfo.getEffectiveTargetIOR());
    }
    return cachedEffectiveTargetObject;
}
 
Example #20
Source File: CorbaMessageMediatorImpl.java    From openjdk-jdk9 with GNU General Public License v2.0 6 votes vote down vote up
private byte getStreamFormatVersionForThisRequest(IOR ior,
                                                  GIOPVersion giopVersion)
{

    byte localMaxVersion
        = ORBUtility.getMaxStreamFormatVersion();

    IOR effectiveTargetIOR =
        ((CorbaContactInfo)this.contactInfo).getEffectiveTargetIOR();
    IIOPProfileTemplate temp =
        (IIOPProfileTemplate)effectiveTargetIOR.getProfile().getTaggedProfileTemplate();
    Iterator iter = temp.iteratorById(TAG_RMI_CUSTOM_MAX_STREAM_FORMAT.value);
    if (!iter.hasNext()) {
        // Didn't have the max stream format version tagged
        // component.
        if (giopVersion.lessThan(GIOPVersion.V1_3))
            return ORBConstants.STREAM_FORMAT_VERSION_1;
        else
            return ORBConstants.STREAM_FORMAT_VERSION_2;
    }

    byte remoteMaxVersion
        = ((MaxStreamFormatVersionComponent)iter.next()).getMaxStreamFormatVersion();

    return (byte)Math.min(localMaxVersion, remoteMaxVersion);
}
 
Example #21
Source File: CorbaContactInfoListIteratorImpl.java    From openjdk-8 with GNU General Public License v2.0 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 #22
Source File: ClientRequestInfoImpl.java    From hottub with GNU General Public License v2.0 6 votes vote down vote up
/**
 * The actual object on which the operation will be invoked.  If the
 * reply_status is LOCATION_FORWARD, then on subsequent requests,
 * effective_target will contain the forwarded IOR while target will
 * remain unchanged.
 */
public org.omg.CORBA.Object effective_target() {
    // access is currently valid for all states:
    //checkAccess( MID_EFFECTIVE_TARGET );

    // Note: This is not necessarily the same as locatedIOR.
    // Reason: See the way we handle COMM_FAILURES in
    // ClientRequestDispatcher.createRequest, v1.32

    if (cachedEffectiveTargetObject == null) {
        CorbaContactInfo corbaContactInfo = (CorbaContactInfo)
            messageMediator.getContactInfo();
        // REVISIT - get through chain like getLocatedIOR helper below.
        cachedEffectiveTargetObject =
            iorToObject(corbaContactInfo.getEffectiveTargetIOR());
    }
    return cachedEffectiveTargetObject;
}
 
Example #23
Source File: CorbaMessageMediatorImpl.java    From openjdk-8-source with GNU General Public License v2.0 6 votes vote down vote up
private byte getStreamFormatVersionForThisRequest(IOR ior,
                                                  GIOPVersion giopVersion)
{

    byte localMaxVersion
        = ORBUtility.getMaxStreamFormatVersion();

    IOR effectiveTargetIOR =
        ((CorbaContactInfo)this.contactInfo).getEffectiveTargetIOR();
    IIOPProfileTemplate temp =
        (IIOPProfileTemplate)effectiveTargetIOR.getProfile().getTaggedProfileTemplate();
    Iterator iter = temp.iteratorById(TAG_RMI_CUSTOM_MAX_STREAM_FORMAT.value);
    if (!iter.hasNext()) {
        // Didn't have the max stream format version tagged
        // component.
        if (giopVersion.lessThan(GIOPVersion.V1_3))
            return ORBConstants.STREAM_FORMAT_VERSION_1;
        else
            return ORBConstants.STREAM_FORMAT_VERSION_2;
    }

    byte remoteMaxVersion
        = ((MaxStreamFormatVersionComponent)iter.next()).getMaxStreamFormatVersion();

    return (byte)Math.min(localMaxVersion, remoteMaxVersion);
}
 
Example #24
Source File: CorbaContactInfoListIteratorImpl.java    From JDKSourceCode1.8 with MIT 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
Source File: ClientRequestInfoImpl.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 6 votes vote down vote up
/**
 * The actual object on which the operation will be invoked.  If the
 * reply_status is LOCATION_FORWARD, then on subsequent requests,
 * effective_target will contain the forwarded IOR while target will
 * remain unchanged.
 */
public org.omg.CORBA.Object effective_target() {
    // access is currently valid for all states:
    //checkAccess( MID_EFFECTIVE_TARGET );

    // Note: This is not necessarily the same as locatedIOR.
    // Reason: See the way we handle COMM_FAILURES in
    // ClientRequestDispatcher.createRequest, v1.32

    if (cachedEffectiveTargetObject == null) {
        CorbaContactInfo corbaContactInfo = (CorbaContactInfo)
            messageMediator.getContactInfo();
        // REVISIT - get through chain like getLocatedIOR helper below.
        cachedEffectiveTargetObject =
            iorToObject(corbaContactInfo.getEffectiveTargetIOR());
    }
    return cachedEffectiveTargetObject;
}
 
Example #26
Source File: ClientRequestInfoImpl.java    From JDKSourceCode1.8 with MIT License 5 votes vote down vote up
/**
 * The object which the client called to perform the operation.
 */
public org.omg.CORBA.Object target (){
    // access is currently valid for all states:
    //checkAccess( MID_TARGET );
    if (cachedTargetObject == null) {
        CorbaContactInfo corbaContactInfo = (CorbaContactInfo)
            messageMediator.getContactInfo();
        cachedTargetObject =
            iorToObject(corbaContactInfo.getTargetIOR());
    }
    return cachedTargetObject;
}
 
Example #27
Source File: CorbaClientDelegateImpl.java    From openjdk-jdk9 with GNU General Public License v2.0 5 votes vote down vote up
public OutputStream request(org.omg.CORBA.Object self,
                            String operation,
                            boolean responseExpected)
{
    ClientInvocationInfo invocationInfo =
        orb.createOrIncrementInvocationInfo();
    Iterator contactInfoListIterator =
        invocationInfo.getContactInfoListIterator();
    if (contactInfoListIterator == null) {
        contactInfoListIterator = contactInfoList.iterator();
        invocationInfo.setContactInfoListIterator(contactInfoListIterator);
    }
    if (! contactInfoListIterator.hasNext()) {
        throw ((CorbaContactInfoListIterator)contactInfoListIterator)
            .getFailureException();
    }
    CorbaContactInfo contactInfo = (CorbaContactInfo) contactInfoListIterator.next();
    ClientRequestDispatcher subcontract = contactInfo.getClientRequestDispatcher();
    // Remember chosen subcontract for invoke and releaseReply.
    // NOTE: This is necessary since a stream is not available in
    // releaseReply if there is a client marshaling error or an
    // error in _invoke.
    invocationInfo.setClientRequestDispatcher(subcontract);
    return (OutputStream)
        subcontract.beginRequest(self, operation,
                                 !responseExpected, contactInfo);
}
 
Example #28
Source File: ClientRequestInfoImpl.java    From openjdk-jdk8u with GNU General Public License v2.0 5 votes vote down vote up
/**
 * The object which the client called to perform the operation.
 */
public org.omg.CORBA.Object target (){
    // access is currently valid for all states:
    //checkAccess( MID_TARGET );
    if (cachedTargetObject == null) {
        CorbaContactInfo corbaContactInfo = (CorbaContactInfo)
            messageMediator.getContactInfo();
        cachedTargetObject =
            iorToObject(corbaContactInfo.getTargetIOR());
    }
    return cachedTargetObject;
}
 
Example #29
Source File: CorbaMessageMediatorImpl.java    From openjdk-jdk8u with GNU General Public License v2.0 5 votes vote down vote up
public CorbaMessageMediatorImpl(ORB orb,
                                ContactInfo contactInfo,
                                Connection connection,
                                GIOPVersion giopVersion,
                                IOR ior,
                                int requestId,
                                short addrDisposition,
                                String operationName,
                                boolean isOneWay)
{
    this( orb, connection ) ;

    this.contactInfo = (CorbaContactInfo) contactInfo;
    this.addrDisposition = addrDisposition;

    streamFormatVersion =
        getStreamFormatVersionForThisRequest(
            ((CorbaContactInfo)this.contactInfo).getEffectiveTargetIOR(),
            giopVersion);
    streamFormatVersionSet = true;

    requestHeader = (RequestMessage) MessageBase.createRequest(
        this.orb,
        giopVersion,
        ORBUtility.getEncodingVersion(orb, ior),
        requestId,
        !isOneWay,
        ((CorbaContactInfo)this.contactInfo).getEffectiveTargetIOR(),
        this.addrDisposition,
        operationName,
        new ServiceContexts(orb),
        null);
}
 
Example #30
Source File: ClientRequestInfoImpl.java    From hottub with GNU General Public License v2.0 5 votes vote down vote up
/**
 * The object which the client called to perform the operation.
 */
public org.omg.CORBA.Object target (){
    // access is currently valid for all states:
    //checkAccess( MID_TARGET );
    if (cachedTargetObject == null) {
        CorbaContactInfo corbaContactInfo = (CorbaContactInfo)
            messageMediator.getContactInfo();
        cachedTargetObject =
            iorToObject(corbaContactInfo.getTargetIOR());
    }
    return cachedTargetObject;
}