com.sun.corba.se.impl.protocol.giopmsgheaders.LocateReplyMessage Java Examples

The following examples show how to use com.sun.corba.se.impl.protocol.giopmsgheaders.LocateReplyMessage. 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: CorbaMessageMediatorImpl.java    From jdk1.8-source-analysis with Apache License 2.0 6 votes vote down vote up
private CDROutputObject createAppropriateOutputObject(
    CorbaMessageMediator messageMediator,
    Message msg, LocateReplyMessage reply)
{
    CDROutputObject outputObject;

    if (msg.getGIOPVersion().lessThan(GIOPVersion.V1_2)) {
        // locate msgs 1.0 & 1.1 :=> grow,
        outputObject = sun.corba.OutputStreamFactory.newCDROutputObject(
                         (ORB) messageMediator.getBroker(),
                         this,
                         GIOPVersion.V1_0,
                         (CorbaConnection) messageMediator.getConnection(),
                         reply,
                         ORBConstants.STREAM_FORMAT_VERSION_1);
    } else {
        // 1.2 :=> stream
        outputObject = sun.corba.OutputStreamFactory.newCDROutputObject(
                         (ORB) messageMediator.getBroker(),
                         messageMediator,
                         reply,
                         ORBConstants.STREAM_FORMAT_VERSION_1);
    }
    return outputObject;
}
 
Example #2
Source File: CorbaMessageMediatorImpl.java    From openjdk-8 with GNU General Public License v2.0 6 votes vote down vote up
private CDROutputObject createAppropriateOutputObject(
    CorbaMessageMediator messageMediator,
    Message msg, LocateReplyMessage reply)
{
    CDROutputObject outputObject;

    if (msg.getGIOPVersion().lessThan(GIOPVersion.V1_2)) {
        // locate msgs 1.0 & 1.1 :=> grow,
        outputObject = sun.corba.OutputStreamFactory.newCDROutputObject(
                         (ORB) messageMediator.getBroker(),
                         this,
                         GIOPVersion.V1_0,
                         (CorbaConnection) messageMediator.getConnection(),
                         reply,
                         ORBConstants.STREAM_FORMAT_VERSION_1);
    } else {
        // 1.2 :=> stream
        outputObject = sun.corba.OutputStreamFactory.newCDROutputObject(
                         (ORB) messageMediator.getBroker(),
                         messageMediator,
                         reply,
                         ORBConstants.STREAM_FORMAT_VERSION_1);
    }
    return outputObject;
}
 
Example #3
Source File: CorbaMessageMediatorImpl.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 6 votes vote down vote up
private CDROutputObject createAppropriateOutputObject(
    CorbaMessageMediator messageMediator,
    Message msg, LocateReplyMessage reply)
{
    CDROutputObject outputObject;

    if (msg.getGIOPVersion().lessThan(GIOPVersion.V1_2)) {
        // locate msgs 1.0 & 1.1 :=> grow,
        outputObject = sun.corba.OutputStreamFactory.newCDROutputObject(
                         (ORB) messageMediator.getBroker(),
                         this,
                         GIOPVersion.V1_0,
                         (CorbaConnection) messageMediator.getConnection(),
                         reply,
                         ORBConstants.STREAM_FORMAT_VERSION_1);
    } else {
        // 1.2 :=> stream
        outputObject = sun.corba.OutputStreamFactory.newCDROutputObject(
                         (ORB) messageMediator.getBroker(),
                         messageMediator,
                         reply,
                         ORBConstants.STREAM_FORMAT_VERSION_1);
    }
    return outputObject;
}
 
Example #4
Source File: CorbaMessageMediatorImpl.java    From openjdk-jdk8u with GNU General Public License v2.0 6 votes vote down vote up
private CDROutputObject createAppropriateOutputObject(
    CorbaMessageMediator messageMediator,
    Message msg, LocateReplyMessage reply)
{
    CDROutputObject outputObject;

    if (msg.getGIOPVersion().lessThan(GIOPVersion.V1_2)) {
        // locate msgs 1.0 & 1.1 :=> grow,
        outputObject = sun.corba.OutputStreamFactory.newCDROutputObject(
                         (ORB) messageMediator.getBroker(),
                         this,
                         GIOPVersion.V1_0,
                         (CorbaConnection) messageMediator.getConnection(),
                         reply,
                         ORBConstants.STREAM_FORMAT_VERSION_1);
    } else {
        // 1.2 :=> stream
        outputObject = sun.corba.OutputStreamFactory.newCDROutputObject(
                         (ORB) messageMediator.getBroker(),
                         messageMediator,
                         reply,
                         ORBConstants.STREAM_FORMAT_VERSION_1);
    }
    return outputObject;
}
 
Example #5
Source File: CorbaMessageMediatorImpl.java    From TencentKona-8 with GNU General Public License v2.0 6 votes vote down vote up
private CDROutputObject createAppropriateOutputObject(
    CorbaMessageMediator messageMediator,
    Message msg, LocateReplyMessage reply)
{
    CDROutputObject outputObject;

    if (msg.getGIOPVersion().lessThan(GIOPVersion.V1_2)) {
        // locate msgs 1.0 & 1.1 :=> grow,
        outputObject = sun.corba.OutputStreamFactory.newCDROutputObject(
                         (ORB) messageMediator.getBroker(),
                         this,
                         GIOPVersion.V1_0,
                         (CorbaConnection) messageMediator.getConnection(),
                         reply,
                         ORBConstants.STREAM_FORMAT_VERSION_1);
    } else {
        // 1.2 :=> stream
        outputObject = sun.corba.OutputStreamFactory.newCDROutputObject(
                         (ORB) messageMediator.getBroker(),
                         messageMediator,
                         reply,
                         ORBConstants.STREAM_FORMAT_VERSION_1);
    }
    return outputObject;
}
 
Example #6
Source File: CorbaMessageMediatorImpl.java    From openjdk-8-source with GNU General Public License v2.0 6 votes vote down vote up
private CDROutputObject createAppropriateOutputObject(
    CorbaMessageMediator messageMediator,
    Message msg, LocateReplyMessage reply)
{
    CDROutputObject outputObject;

    if (msg.getGIOPVersion().lessThan(GIOPVersion.V1_2)) {
        // locate msgs 1.0 & 1.1 :=> grow,
        outputObject = sun.corba.OutputStreamFactory.newCDROutputObject(
                         (ORB) messageMediator.getBroker(),
                         this,
                         GIOPVersion.V1_0,
                         (CorbaConnection) messageMediator.getConnection(),
                         reply,
                         ORBConstants.STREAM_FORMAT_VERSION_1);
    } else {
        // 1.2 :=> stream
        outputObject = sun.corba.OutputStreamFactory.newCDROutputObject(
                         (ORB) messageMediator.getBroker(),
                         messageMediator,
                         reply,
                         ORBConstants.STREAM_FORMAT_VERSION_1);
    }
    return outputObject;
}
 
Example #7
Source File: CorbaMessageMediatorImpl.java    From jdk8u60 with GNU General Public License v2.0 6 votes vote down vote up
private CDROutputObject createAppropriateOutputObject(
    CorbaMessageMediator messageMediator,
    Message msg, LocateReplyMessage reply)
{
    CDROutputObject outputObject;

    if (msg.getGIOPVersion().lessThan(GIOPVersion.V1_2)) {
        // locate msgs 1.0 & 1.1 :=> grow,
        outputObject = sun.corba.OutputStreamFactory.newCDROutputObject(
                         (ORB) messageMediator.getBroker(),
                         this,
                         GIOPVersion.V1_0,
                         (CorbaConnection) messageMediator.getConnection(),
                         reply,
                         ORBConstants.STREAM_FORMAT_VERSION_1);
    } else {
        // 1.2 :=> stream
        outputObject = sun.corba.OutputStreamFactory.newCDROutputObject(
                         (ORB) messageMediator.getBroker(),
                         messageMediator,
                         reply,
                         ORBConstants.STREAM_FORMAT_VERSION_1);
    }
    return outputObject;
}
 
Example #8
Source File: CorbaMessageMediatorImpl.java    From hottub with GNU General Public License v2.0 6 votes vote down vote up
private CDROutputObject createAppropriateOutputObject(
    CorbaMessageMediator messageMediator,
    Message msg, LocateReplyMessage reply)
{
    CDROutputObject outputObject;

    if (msg.getGIOPVersion().lessThan(GIOPVersion.V1_2)) {
        // locate msgs 1.0 & 1.1 :=> grow,
        outputObject = sun.corba.OutputStreamFactory.newCDROutputObject(
                         (ORB) messageMediator.getBroker(),
                         this,
                         GIOPVersion.V1_0,
                         (CorbaConnection) messageMediator.getConnection(),
                         reply,
                         ORBConstants.STREAM_FORMAT_VERSION_1);
    } else {
        // 1.2 :=> stream
        outputObject = sun.corba.OutputStreamFactory.newCDROutputObject(
                         (ORB) messageMediator.getBroker(),
                         messageMediator,
                         reply,
                         ORBConstants.STREAM_FORMAT_VERSION_1);
    }
    return outputObject;
}
 
Example #9
Source File: CorbaMessageMediatorImpl.java    From openjdk-jdk9 with GNU General Public License v2.0 6 votes vote down vote up
private CDROutputObject createAppropriateOutputObject(
    CorbaMessageMediator messageMediator,
    Message msg, LocateReplyMessage reply)
{
    CDROutputObject outputObject;

    if (msg.getGIOPVersion().lessThan(GIOPVersion.V1_2)) {
        // locate msgs 1.0 & 1.1 :=> grow,
        outputObject = sun.corba.OutputStreamFactory.newCDROutputObject(
                         (ORB) messageMediator.getBroker(),
                         this,
                         GIOPVersion.V1_0,
                         (CorbaConnection) messageMediator.getConnection(),
                         reply,
                         ORBConstants.STREAM_FORMAT_VERSION_1);
    } else {
        // 1.2 :=> stream
        outputObject = sun.corba.OutputStreamFactory.newCDROutputObject(
                         (ORB) messageMediator.getBroker(),
                         messageMediator,
                         reply,
                         ORBConstants.STREAM_FORMAT_VERSION_1);
    }
    return outputObject;
}
 
Example #10
Source File: CorbaMessageMediatorImpl.java    From JDKSourceCode1.8 with MIT License 6 votes vote down vote up
private CDROutputObject createAppropriateOutputObject(
    CorbaMessageMediator messageMediator,
    Message msg, LocateReplyMessage reply)
{
    CDROutputObject outputObject;

    if (msg.getGIOPVersion().lessThan(GIOPVersion.V1_2)) {
        // locate msgs 1.0 & 1.1 :=> grow,
        outputObject = sun.corba.OutputStreamFactory.newCDROutputObject(
                         (ORB) messageMediator.getBroker(),
                         this,
                         GIOPVersion.V1_0,
                         (CorbaConnection) messageMediator.getConnection(),
                         reply,
                         ORBConstants.STREAM_FORMAT_VERSION_1);
    } else {
        // 1.2 :=> stream
        outputObject = sun.corba.OutputStreamFactory.newCDROutputObject(
                         (ORB) messageMediator.getBroker(),
                         messageMediator,
                         reply,
                         ORBConstants.STREAM_FORMAT_VERSION_1);
    }
    return outputObject;
}
 
Example #11
Source File: CorbaMessageMediatorImpl.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 4 votes vote down vote up
public LocateReplyMessage getLocateReplyHeader()
{
    return (LocateReplyMessage) replyHeader;
}
 
Example #12
Source File: CorbaMessageMediatorImpl.java    From jdk1.8-source-analysis with Apache License 2.0 4 votes vote down vote up
public LocateReplyMessage getLocateReplyHeader()
{
    return (LocateReplyMessage) replyHeader;
}
 
Example #13
Source File: CorbaMessageMediatorImpl.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 4 votes vote down vote up
protected void handleAddressingDisposition(
    CorbaMessageMediator messageMediator,
    AddressingDispositionException ex)
{

    short addrDisp = -1;

    // from iiop.RequestProcessor.

    // Respond with expected target addressing disposition.

    switch (messageMediator.getRequestHeader().getType()) {
    case Message.GIOPRequest :
        ReplyMessage replyHeader = MessageBase.createReply(
                      (ORB)messageMediator.getBroker(),
                      messageMediator.getGIOPVersion(),
                      messageMediator.getEncodingVersion(),
                      messageMediator.getRequestId(),
                      ReplyMessage.NEEDS_ADDRESSING_MODE,
                      null, null);
        // REVISIT: via acceptor factory.
        CDROutputObject outputObject =
            sun.corba.OutputStreamFactory.newCDROutputObject(
            (ORB)messageMediator.getBroker(),
            this,
            messageMediator.getGIOPVersion(),
            (CorbaConnection)messageMediator.getConnection(),
            replyHeader,
            ORBConstants.STREAM_FORMAT_VERSION_1);
        messageMediator.setOutputObject(outputObject);
        outputObject.setMessageMediator(messageMediator);
        replyHeader.write(outputObject);
        AddressingDispositionHelper.write(outputObject,
                                          ex.expectedAddrDisp());
        return;

    case Message.GIOPLocateRequest :
        LocateReplyMessage locateReplyHeader = MessageBase.createLocateReply(
            (ORB)messageMediator.getBroker(),
            messageMediator.getGIOPVersion(),
            messageMediator.getEncodingVersion(),
            messageMediator.getRequestId(),
            LocateReplyMessage.LOC_NEEDS_ADDRESSING_MODE,
            null);

        addrDisp = ex.expectedAddrDisp();

        // REVISIT: via acceptor factory.
        outputObject =
            createAppropriateOutputObject(messageMediator,
                                          messageMediator.getRequestHeader(),
                                          locateReplyHeader);
        messageMediator.setOutputObject(outputObject);
        outputObject.setMessageMediator(messageMediator);
        locateReplyHeader.write(outputObject);
        IOR ior = null;
        if (ior != null) {
            ior.write(outputObject);
        }
        if (addrDisp != -1) {
            AddressingDispositionHelper.write(outputObject, addrDisp);
        }
        return;
    }
}
 
Example #14
Source File: CorbaMessageMediatorImpl.java    From openjdk-jdk9 with GNU General Public License v2.0 4 votes vote down vote up
public LocateReplyMessage getLocateReplyHeader()
{
    return (LocateReplyMessage) replyHeader;
}
 
Example #15
Source File: CorbaMessageMediatorImpl.java    From openjdk-jdk9 with GNU General Public License v2.0 4 votes vote down vote up
protected void handleAddressingDisposition(
    CorbaMessageMediator messageMediator,
    AddressingDispositionException ex)
{

    short addrDisp = -1;

    // from iiop.RequestProcessor.

    // Respond with expected target addressing disposition.

    switch (messageMediator.getRequestHeader().getType()) {
    case Message.GIOPRequest :
        ReplyMessage replyHeader = MessageBase.createReply(
                      (ORB)messageMediator.getBroker(),
                      messageMediator.getGIOPVersion(),
                      messageMediator.getEncodingVersion(),
                      messageMediator.getRequestId(),
                      ReplyMessage.NEEDS_ADDRESSING_MODE,
                      null, null);
        // REVISIT: via acceptor factory.
        CDROutputObject outputObject =
            sun.corba.OutputStreamFactory.newCDROutputObject(
            (ORB)messageMediator.getBroker(),
            this,
            messageMediator.getGIOPVersion(),
            (CorbaConnection)messageMediator.getConnection(),
            replyHeader,
            ORBConstants.STREAM_FORMAT_VERSION_1);
        messageMediator.setOutputObject(outputObject);
        outputObject.setMessageMediator(messageMediator);
        replyHeader.write(outputObject);
        AddressingDispositionHelper.write(outputObject,
                                          ex.expectedAddrDisp());
        return;

    case Message.GIOPLocateRequest :
        LocateReplyMessage locateReplyHeader = MessageBase.createLocateReply(
            (ORB)messageMediator.getBroker(),
            messageMediator.getGIOPVersion(),
            messageMediator.getEncodingVersion(),
            messageMediator.getRequestId(),
            LocateReplyMessage.LOC_NEEDS_ADDRESSING_MODE,
            null);

        addrDisp = ex.expectedAddrDisp();

        // REVISIT: via acceptor factory.
        outputObject =
            createAppropriateOutputObject(messageMediator,
                                          messageMediator.getRequestHeader(),
                                          locateReplyHeader);
        messageMediator.setOutputObject(outputObject);
        outputObject.setMessageMediator(messageMediator);
        locateReplyHeader.write(outputObject);
        IOR ior = null;
        if (ior != null) {
            ior.write(outputObject);
        }
        if (addrDisp != -1) {
            AddressingDispositionHelper.write(outputObject, addrDisp);
        }
        return;
    }
}
 
Example #16
Source File: CorbaMessageMediatorImpl.java    From hottub with GNU General Public License v2.0 4 votes vote down vote up
public LocateReplyMessage getLocateReplyHeader()
{
    return (LocateReplyMessage) replyHeader;
}
 
Example #17
Source File: CorbaMessageMediatorImpl.java    From hottub with GNU General Public License v2.0 4 votes vote down vote up
protected void handleAddressingDisposition(
    CorbaMessageMediator messageMediator,
    AddressingDispositionException ex)
{

    short addrDisp = -1;

    // from iiop.RequestProcessor.

    // Respond with expected target addressing disposition.

    switch (messageMediator.getRequestHeader().getType()) {
    case Message.GIOPRequest :
        ReplyMessage replyHeader = MessageBase.createReply(
                      (ORB)messageMediator.getBroker(),
                      messageMediator.getGIOPVersion(),
                      messageMediator.getEncodingVersion(),
                      messageMediator.getRequestId(),
                      ReplyMessage.NEEDS_ADDRESSING_MODE,
                      null, null);
        // REVISIT: via acceptor factory.
        CDROutputObject outputObject =
            sun.corba.OutputStreamFactory.newCDROutputObject(
            (ORB)messageMediator.getBroker(),
            this,
            messageMediator.getGIOPVersion(),
            (CorbaConnection)messageMediator.getConnection(),
            replyHeader,
            ORBConstants.STREAM_FORMAT_VERSION_1);
        messageMediator.setOutputObject(outputObject);
        outputObject.setMessageMediator(messageMediator);
        replyHeader.write(outputObject);
        AddressingDispositionHelper.write(outputObject,
                                          ex.expectedAddrDisp());
        return;

    case Message.GIOPLocateRequest :
        LocateReplyMessage locateReplyHeader = MessageBase.createLocateReply(
            (ORB)messageMediator.getBroker(),
            messageMediator.getGIOPVersion(),
            messageMediator.getEncodingVersion(),
            messageMediator.getRequestId(),
            LocateReplyMessage.LOC_NEEDS_ADDRESSING_MODE,
            null);

        addrDisp = ex.expectedAddrDisp();

        // REVISIT: via acceptor factory.
        outputObject =
            createAppropriateOutputObject(messageMediator,
                                          messageMediator.getRequestHeader(),
                                          locateReplyHeader);
        messageMediator.setOutputObject(outputObject);
        outputObject.setMessageMediator(messageMediator);
        locateReplyHeader.write(outputObject);
        IOR ior = null;
        if (ior != null) {
            ior.write(outputObject);
        }
        if (addrDisp != -1) {
            AddressingDispositionHelper.write(outputObject, addrDisp);
        }
        return;
    }
}
 
Example #18
Source File: CorbaMessageMediatorImpl.java    From openjdk-8-source with GNU General Public License v2.0 4 votes vote down vote up
public LocateReplyMessage getLocateReplyHeader()
{
    return (LocateReplyMessage) replyHeader;
}
 
Example #19
Source File: CorbaMessageMediatorImpl.java    From openjdk-8-source with GNU General Public License v2.0 4 votes vote down vote up
protected void handleAddressingDisposition(
    CorbaMessageMediator messageMediator,
    AddressingDispositionException ex)
{

    short addrDisp = -1;

    // from iiop.RequestProcessor.

    // Respond with expected target addressing disposition.

    switch (messageMediator.getRequestHeader().getType()) {
    case Message.GIOPRequest :
        ReplyMessage replyHeader = MessageBase.createReply(
                      (ORB)messageMediator.getBroker(),
                      messageMediator.getGIOPVersion(),
                      messageMediator.getEncodingVersion(),
                      messageMediator.getRequestId(),
                      ReplyMessage.NEEDS_ADDRESSING_MODE,
                      null, null);
        // REVISIT: via acceptor factory.
        CDROutputObject outputObject =
            sun.corba.OutputStreamFactory.newCDROutputObject(
            (ORB)messageMediator.getBroker(),
            this,
            messageMediator.getGIOPVersion(),
            (CorbaConnection)messageMediator.getConnection(),
            replyHeader,
            ORBConstants.STREAM_FORMAT_VERSION_1);
        messageMediator.setOutputObject(outputObject);
        outputObject.setMessageMediator(messageMediator);
        replyHeader.write(outputObject);
        AddressingDispositionHelper.write(outputObject,
                                          ex.expectedAddrDisp());
        return;

    case Message.GIOPLocateRequest :
        LocateReplyMessage locateReplyHeader = MessageBase.createLocateReply(
            (ORB)messageMediator.getBroker(),
            messageMediator.getGIOPVersion(),
            messageMediator.getEncodingVersion(),
            messageMediator.getRequestId(),
            LocateReplyMessage.LOC_NEEDS_ADDRESSING_MODE,
            null);

        addrDisp = ex.expectedAddrDisp();

        // REVISIT: via acceptor factory.
        outputObject =
            createAppropriateOutputObject(messageMediator,
                                          messageMediator.getRequestHeader(),
                                          locateReplyHeader);
        messageMediator.setOutputObject(outputObject);
        outputObject.setMessageMediator(messageMediator);
        locateReplyHeader.write(outputObject);
        IOR ior = null;
        if (ior != null) {
            ior.write(outputObject);
        }
        if (addrDisp != -1) {
            AddressingDispositionHelper.write(outputObject, addrDisp);
        }
        return;
    }
}
 
Example #20
Source File: CorbaMessageMediatorImpl.java    From openjdk-8 with GNU General Public License v2.0 4 votes vote down vote up
public LocateReplyMessage getLocateReplyHeader()
{
    return (LocateReplyMessage) replyHeader;
}
 
Example #21
Source File: CorbaMessageMediatorImpl.java    From openjdk-8 with GNU General Public License v2.0 4 votes vote down vote up
protected void handleAddressingDisposition(
    CorbaMessageMediator messageMediator,
    AddressingDispositionException ex)
{

    short addrDisp = -1;

    // from iiop.RequestProcessor.

    // Respond with expected target addressing disposition.

    switch (messageMediator.getRequestHeader().getType()) {
    case Message.GIOPRequest :
        ReplyMessage replyHeader = MessageBase.createReply(
                      (ORB)messageMediator.getBroker(),
                      messageMediator.getGIOPVersion(),
                      messageMediator.getEncodingVersion(),
                      messageMediator.getRequestId(),
                      ReplyMessage.NEEDS_ADDRESSING_MODE,
                      null, null);
        // REVISIT: via acceptor factory.
        CDROutputObject outputObject =
            sun.corba.OutputStreamFactory.newCDROutputObject(
            (ORB)messageMediator.getBroker(),
            this,
            messageMediator.getGIOPVersion(),
            (CorbaConnection)messageMediator.getConnection(),
            replyHeader,
            ORBConstants.STREAM_FORMAT_VERSION_1);
        messageMediator.setOutputObject(outputObject);
        outputObject.setMessageMediator(messageMediator);
        replyHeader.write(outputObject);
        AddressingDispositionHelper.write(outputObject,
                                          ex.expectedAddrDisp());
        return;

    case Message.GIOPLocateRequest :
        LocateReplyMessage locateReplyHeader = MessageBase.createLocateReply(
            (ORB)messageMediator.getBroker(),
            messageMediator.getGIOPVersion(),
            messageMediator.getEncodingVersion(),
            messageMediator.getRequestId(),
            LocateReplyMessage.LOC_NEEDS_ADDRESSING_MODE,
            null);

        addrDisp = ex.expectedAddrDisp();

        // REVISIT: via acceptor factory.
        outputObject =
            createAppropriateOutputObject(messageMediator,
                                          messageMediator.getRequestHeader(),
                                          locateReplyHeader);
        messageMediator.setOutputObject(outputObject);
        outputObject.setMessageMediator(messageMediator);
        locateReplyHeader.write(outputObject);
        IOR ior = null;
        if (ior != null) {
            ior.write(outputObject);
        }
        if (addrDisp != -1) {
            AddressingDispositionHelper.write(outputObject, addrDisp);
        }
        return;
    }
}
 
Example #22
Source File: CorbaMessageMediatorImpl.java    From openjdk-jdk8u with GNU General Public License v2.0 4 votes vote down vote up
protected void handleAddressingDisposition(
    CorbaMessageMediator messageMediator,
    AddressingDispositionException ex)
{

    short addrDisp = -1;

    // from iiop.RequestProcessor.

    // Respond with expected target addressing disposition.

    switch (messageMediator.getRequestHeader().getType()) {
    case Message.GIOPRequest :
        ReplyMessage replyHeader = MessageBase.createReply(
                      (ORB)messageMediator.getBroker(),
                      messageMediator.getGIOPVersion(),
                      messageMediator.getEncodingVersion(),
                      messageMediator.getRequestId(),
                      ReplyMessage.NEEDS_ADDRESSING_MODE,
                      null, null);
        // REVISIT: via acceptor factory.
        CDROutputObject outputObject =
            sun.corba.OutputStreamFactory.newCDROutputObject(
            (ORB)messageMediator.getBroker(),
            this,
            messageMediator.getGIOPVersion(),
            (CorbaConnection)messageMediator.getConnection(),
            replyHeader,
            ORBConstants.STREAM_FORMAT_VERSION_1);
        messageMediator.setOutputObject(outputObject);
        outputObject.setMessageMediator(messageMediator);
        replyHeader.write(outputObject);
        AddressingDispositionHelper.write(outputObject,
                                          ex.expectedAddrDisp());
        return;

    case Message.GIOPLocateRequest :
        LocateReplyMessage locateReplyHeader = MessageBase.createLocateReply(
            (ORB)messageMediator.getBroker(),
            messageMediator.getGIOPVersion(),
            messageMediator.getEncodingVersion(),
            messageMediator.getRequestId(),
            LocateReplyMessage.LOC_NEEDS_ADDRESSING_MODE,
            null);

        addrDisp = ex.expectedAddrDisp();

        // REVISIT: via acceptor factory.
        outputObject =
            createAppropriateOutputObject(messageMediator,
                                          messageMediator.getRequestHeader(),
                                          locateReplyHeader);
        messageMediator.setOutputObject(outputObject);
        outputObject.setMessageMediator(messageMediator);
        locateReplyHeader.write(outputObject);
        IOR ior = null;
        if (ior != null) {
            ior.write(outputObject);
        }
        if (addrDisp != -1) {
            AddressingDispositionHelper.write(outputObject, addrDisp);
        }
        return;
    }
}
 
Example #23
Source File: CorbaMessageMediatorImpl.java    From jdk1.8-source-analysis with Apache License 2.0 4 votes vote down vote up
protected void handleAddressingDisposition(
    CorbaMessageMediator messageMediator,
    AddressingDispositionException ex)
{

    short addrDisp = -1;

    // from iiop.RequestProcessor.

    // Respond with expected target addressing disposition.

    switch (messageMediator.getRequestHeader().getType()) {
    case Message.GIOPRequest :
        ReplyMessage replyHeader = MessageBase.createReply(
                      (ORB)messageMediator.getBroker(),
                      messageMediator.getGIOPVersion(),
                      messageMediator.getEncodingVersion(),
                      messageMediator.getRequestId(),
                      ReplyMessage.NEEDS_ADDRESSING_MODE,
                      null, null);
        // REVISIT: via acceptor factory.
        CDROutputObject outputObject =
            sun.corba.OutputStreamFactory.newCDROutputObject(
            (ORB)messageMediator.getBroker(),
            this,
            messageMediator.getGIOPVersion(),
            (CorbaConnection)messageMediator.getConnection(),
            replyHeader,
            ORBConstants.STREAM_FORMAT_VERSION_1);
        messageMediator.setOutputObject(outputObject);
        outputObject.setMessageMediator(messageMediator);
        replyHeader.write(outputObject);
        AddressingDispositionHelper.write(outputObject,
                                          ex.expectedAddrDisp());
        return;

    case Message.GIOPLocateRequest :
        LocateReplyMessage locateReplyHeader = MessageBase.createLocateReply(
            (ORB)messageMediator.getBroker(),
            messageMediator.getGIOPVersion(),
            messageMediator.getEncodingVersion(),
            messageMediator.getRequestId(),
            LocateReplyMessage.LOC_NEEDS_ADDRESSING_MODE,
            null);

        addrDisp = ex.expectedAddrDisp();

        // REVISIT: via acceptor factory.
        outputObject =
            createAppropriateOutputObject(messageMediator,
                                          messageMediator.getRequestHeader(),
                                          locateReplyHeader);
        messageMediator.setOutputObject(outputObject);
        outputObject.setMessageMediator(messageMediator);
        locateReplyHeader.write(outputObject);
        IOR ior = null;
        if (ior != null) {
            ior.write(outputObject);
        }
        if (addrDisp != -1) {
            AddressingDispositionHelper.write(outputObject, addrDisp);
        }
        return;
    }
}
 
Example #24
Source File: CorbaMessageMediatorImpl.java    From TencentKona-8 with GNU General Public License v2.0 4 votes vote down vote up
public LocateReplyMessage getLocateReplyHeader()
{
    return (LocateReplyMessage) replyHeader;
}
 
Example #25
Source File: CorbaMessageMediatorImpl.java    From TencentKona-8 with GNU General Public License v2.0 4 votes vote down vote up
protected void handleAddressingDisposition(
    CorbaMessageMediator messageMediator,
    AddressingDispositionException ex)
{

    short addrDisp = -1;

    // from iiop.RequestProcessor.

    // Respond with expected target addressing disposition.

    switch (messageMediator.getRequestHeader().getType()) {
    case Message.GIOPRequest :
        ReplyMessage replyHeader = MessageBase.createReply(
                      (ORB)messageMediator.getBroker(),
                      messageMediator.getGIOPVersion(),
                      messageMediator.getEncodingVersion(),
                      messageMediator.getRequestId(),
                      ReplyMessage.NEEDS_ADDRESSING_MODE,
                      null, null);
        // REVISIT: via acceptor factory.
        CDROutputObject outputObject =
            sun.corba.OutputStreamFactory.newCDROutputObject(
            (ORB)messageMediator.getBroker(),
            this,
            messageMediator.getGIOPVersion(),
            (CorbaConnection)messageMediator.getConnection(),
            replyHeader,
            ORBConstants.STREAM_FORMAT_VERSION_1);
        messageMediator.setOutputObject(outputObject);
        outputObject.setMessageMediator(messageMediator);
        replyHeader.write(outputObject);
        AddressingDispositionHelper.write(outputObject,
                                          ex.expectedAddrDisp());
        return;

    case Message.GIOPLocateRequest :
        LocateReplyMessage locateReplyHeader = MessageBase.createLocateReply(
            (ORB)messageMediator.getBroker(),
            messageMediator.getGIOPVersion(),
            messageMediator.getEncodingVersion(),
            messageMediator.getRequestId(),
            LocateReplyMessage.LOC_NEEDS_ADDRESSING_MODE,
            null);

        addrDisp = ex.expectedAddrDisp();

        // REVISIT: via acceptor factory.
        outputObject =
            createAppropriateOutputObject(messageMediator,
                                          messageMediator.getRequestHeader(),
                                          locateReplyHeader);
        messageMediator.setOutputObject(outputObject);
        outputObject.setMessageMediator(messageMediator);
        locateReplyHeader.write(outputObject);
        IOR ior = null;
        if (ior != null) {
            ior.write(outputObject);
        }
        if (addrDisp != -1) {
            AddressingDispositionHelper.write(outputObject, addrDisp);
        }
        return;
    }
}
 
Example #26
Source File: CorbaMessageMediatorImpl.java    From jdk8u60 with GNU General Public License v2.0 4 votes vote down vote up
public LocateReplyMessage getLocateReplyHeader()
{
    return (LocateReplyMessage) replyHeader;
}
 
Example #27
Source File: CorbaMessageMediatorImpl.java    From jdk8u60 with GNU General Public License v2.0 4 votes vote down vote up
protected void handleAddressingDisposition(
    CorbaMessageMediator messageMediator,
    AddressingDispositionException ex)
{

    short addrDisp = -1;

    // from iiop.RequestProcessor.

    // Respond with expected target addressing disposition.

    switch (messageMediator.getRequestHeader().getType()) {
    case Message.GIOPRequest :
        ReplyMessage replyHeader = MessageBase.createReply(
                      (ORB)messageMediator.getBroker(),
                      messageMediator.getGIOPVersion(),
                      messageMediator.getEncodingVersion(),
                      messageMediator.getRequestId(),
                      ReplyMessage.NEEDS_ADDRESSING_MODE,
                      null, null);
        // REVISIT: via acceptor factory.
        CDROutputObject outputObject =
            sun.corba.OutputStreamFactory.newCDROutputObject(
            (ORB)messageMediator.getBroker(),
            this,
            messageMediator.getGIOPVersion(),
            (CorbaConnection)messageMediator.getConnection(),
            replyHeader,
            ORBConstants.STREAM_FORMAT_VERSION_1);
        messageMediator.setOutputObject(outputObject);
        outputObject.setMessageMediator(messageMediator);
        replyHeader.write(outputObject);
        AddressingDispositionHelper.write(outputObject,
                                          ex.expectedAddrDisp());
        return;

    case Message.GIOPLocateRequest :
        LocateReplyMessage locateReplyHeader = MessageBase.createLocateReply(
            (ORB)messageMediator.getBroker(),
            messageMediator.getGIOPVersion(),
            messageMediator.getEncodingVersion(),
            messageMediator.getRequestId(),
            LocateReplyMessage.LOC_NEEDS_ADDRESSING_MODE,
            null);

        addrDisp = ex.expectedAddrDisp();

        // REVISIT: via acceptor factory.
        outputObject =
            createAppropriateOutputObject(messageMediator,
                                          messageMediator.getRequestHeader(),
                                          locateReplyHeader);
        messageMediator.setOutputObject(outputObject);
        outputObject.setMessageMediator(messageMediator);
        locateReplyHeader.write(outputObject);
        IOR ior = null;
        if (ior != null) {
            ior.write(outputObject);
        }
        if (addrDisp != -1) {
            AddressingDispositionHelper.write(outputObject, addrDisp);
        }
        return;
    }
}
 
Example #28
Source File: CorbaMessageMediatorImpl.java    From JDKSourceCode1.8 with MIT License 4 votes vote down vote up
public LocateReplyMessage getLocateReplyHeader()
{
    return (LocateReplyMessage) replyHeader;
}
 
Example #29
Source File: CorbaMessageMediatorImpl.java    From JDKSourceCode1.8 with MIT License 4 votes vote down vote up
protected void handleAddressingDisposition(
    CorbaMessageMediator messageMediator,
    AddressingDispositionException ex)
{

    short addrDisp = -1;

    // from iiop.RequestProcessor.

    // Respond with expected target addressing disposition.

    switch (messageMediator.getRequestHeader().getType()) {
    case Message.GIOPRequest :
        ReplyMessage replyHeader = MessageBase.createReply(
                      (ORB)messageMediator.getBroker(),
                      messageMediator.getGIOPVersion(),
                      messageMediator.getEncodingVersion(),
                      messageMediator.getRequestId(),
                      ReplyMessage.NEEDS_ADDRESSING_MODE,
                      null, null);
        // REVISIT: via acceptor factory.
        CDROutputObject outputObject =
            sun.corba.OutputStreamFactory.newCDROutputObject(
            (ORB)messageMediator.getBroker(),
            this,
            messageMediator.getGIOPVersion(),
            (CorbaConnection)messageMediator.getConnection(),
            replyHeader,
            ORBConstants.STREAM_FORMAT_VERSION_1);
        messageMediator.setOutputObject(outputObject);
        outputObject.setMessageMediator(messageMediator);
        replyHeader.write(outputObject);
        AddressingDispositionHelper.write(outputObject,
                                          ex.expectedAddrDisp());
        return;

    case Message.GIOPLocateRequest :
        LocateReplyMessage locateReplyHeader = MessageBase.createLocateReply(
            (ORB)messageMediator.getBroker(),
            messageMediator.getGIOPVersion(),
            messageMediator.getEncodingVersion(),
            messageMediator.getRequestId(),
            LocateReplyMessage.LOC_NEEDS_ADDRESSING_MODE,
            null);

        addrDisp = ex.expectedAddrDisp();

        // REVISIT: via acceptor factory.
        outputObject =
            createAppropriateOutputObject(messageMediator,
                                          messageMediator.getRequestHeader(),
                                          locateReplyHeader);
        messageMediator.setOutputObject(outputObject);
        outputObject.setMessageMediator(messageMediator);
        locateReplyHeader.write(outputObject);
        IOR ior = null;
        if (ior != null) {
            ior.write(outputObject);
        }
        if (addrDisp != -1) {
            AddressingDispositionHelper.write(outputObject, addrDisp);
        }
        return;
    }
}
 
Example #30
Source File: CorbaMessageMediatorImpl.java    From openjdk-jdk8u with GNU General Public License v2.0 4 votes vote down vote up
public LocateReplyMessage getLocateReplyHeader()
{
    return (LocateReplyMessage) replyHeader;
}