Java Code Examples for com.sun.corba.se.impl.protocol.giopmsgheaders.MessageBase#createReply()

The following examples show how to use com.sun.corba.se.impl.protocol.giopmsgheaders.MessageBase#createReply() . 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 openjdk-jdk8u-backup with GNU General Public License v2.0 5 votes vote down vote up
public CorbaMessageMediator createLocationForward(
    CorbaMessageMediator messageMediator, IOR ior, ServiceContexts svc)
{
    ReplyMessage reply
        = MessageBase.createReply(
              (ORB)messageMediator.getBroker(),
              messageMediator.getGIOPVersion(),
              messageMediator.getEncodingVersion(),
              messageMediator.getRequestId(),
              ReplyMessage.LOCATION_FORWARD,
              getServiceContextsForReply(messageMediator, svc),
              ior);

    return createResponseHelper(messageMediator, reply, ior);
}
 
Example 2
Source File: CorbaMessageMediatorImpl.java    From openjdk-8-source with GNU General Public License v2.0 5 votes vote down vote up
protected CorbaMessageMediator createResponseHelper(
    CorbaMessageMediator messageMediator, ServiceContexts svc,boolean user)
{
    ReplyMessage message =
        MessageBase.createReply(
            (ORB)messageMediator.getBroker(),
            messageMediator.getGIOPVersion(),
            messageMediator.getEncodingVersion(),
            messageMediator.getRequestId(),
            user ? ReplyMessage.USER_EXCEPTION :
                   ReplyMessage.SYSTEM_EXCEPTION,
            svc,
            null);
    return createResponseHelper(messageMediator, message, null);
}
 
Example 3
Source File: CorbaMessageMediatorImpl.java    From JDKSourceCode1.8 with MIT License 5 votes vote down vote up
protected CorbaMessageMediator createResponseHelper(
    CorbaMessageMediator messageMediator, ServiceContexts svc,boolean user)
{
    ReplyMessage message =
        MessageBase.createReply(
            (ORB)messageMediator.getBroker(),
            messageMediator.getGIOPVersion(),
            messageMediator.getEncodingVersion(),
            messageMediator.getRequestId(),
            user ? ReplyMessage.USER_EXCEPTION :
                   ReplyMessage.SYSTEM_EXCEPTION,
            svc,
            null);
    return createResponseHelper(messageMediator, message, null);
}
 
Example 4
Source File: CorbaMessageMediatorImpl.java    From JDKSourceCode1.8 with MIT License 5 votes vote down vote up
protected CorbaMessageMediator createResponseHelper(
    CorbaMessageMediator messageMediator, ServiceContexts svc)
{
    ReplyMessage message =
        MessageBase.createReply(
            (ORB)messageMediator.getBroker(),
            messageMediator.getGIOPVersion(),
            messageMediator.getEncodingVersion(),
            messageMediator.getRequestId(),
            ReplyMessage.NO_EXCEPTION,
            svc,
            null);
    return createResponseHelper(messageMediator, message, null);
}
 
Example 5
Source File: CorbaMessageMediatorImpl.java    From hottub with GNU General Public License v2.0 5 votes vote down vote up
public CorbaMessageMediator createLocationForward(
    CorbaMessageMediator messageMediator, IOR ior, ServiceContexts svc)
{
    ReplyMessage reply
        = MessageBase.createReply(
              (ORB)messageMediator.getBroker(),
              messageMediator.getGIOPVersion(),
              messageMediator.getEncodingVersion(),
              messageMediator.getRequestId(),
              ReplyMessage.LOCATION_FORWARD,
              getServiceContextsForReply(messageMediator, svc),
              ior);

    return createResponseHelper(messageMediator, reply, ior);
}
 
Example 6
Source File: CorbaMessageMediatorImpl.java    From jdk8u60 with GNU General Public License v2.0 5 votes vote down vote up
protected CorbaMessageMediator createResponseHelper(
    CorbaMessageMediator messageMediator, ServiceContexts svc,boolean user)
{
    ReplyMessage message =
        MessageBase.createReply(
            (ORB)messageMediator.getBroker(),
            messageMediator.getGIOPVersion(),
            messageMediator.getEncodingVersion(),
            messageMediator.getRequestId(),
            user ? ReplyMessage.USER_EXCEPTION :
                   ReplyMessage.SYSTEM_EXCEPTION,
            svc,
            null);
    return createResponseHelper(messageMediator, message, null);
}
 
Example 7
Source File: CorbaMessageMediatorImpl.java    From jdk8u60 with GNU General Public License v2.0 5 votes vote down vote up
protected CorbaMessageMediator createResponseHelper(
    CorbaMessageMediator messageMediator, ServiceContexts svc)
{
    ReplyMessage message =
        MessageBase.createReply(
            (ORB)messageMediator.getBroker(),
            messageMediator.getGIOPVersion(),
            messageMediator.getEncodingVersion(),
            messageMediator.getRequestId(),
            ReplyMessage.NO_EXCEPTION,
            svc,
            null);
    return createResponseHelper(messageMediator, message, null);
}
 
Example 8
Source File: CorbaMessageMediatorImpl.java    From hottub with GNU General Public License v2.0 5 votes vote down vote up
protected CorbaMessageMediator createResponseHelper(
    CorbaMessageMediator messageMediator, ServiceContexts svc,boolean user)
{
    ReplyMessage message =
        MessageBase.createReply(
            (ORB)messageMediator.getBroker(),
            messageMediator.getGIOPVersion(),
            messageMediator.getEncodingVersion(),
            messageMediator.getRequestId(),
            user ? ReplyMessage.USER_EXCEPTION :
                   ReplyMessage.SYSTEM_EXCEPTION,
            svc,
            null);
    return createResponseHelper(messageMediator, message, null);
}
 
Example 9
Source File: CorbaMessageMediatorImpl.java    From TencentKona-8 with GNU General Public License v2.0 5 votes vote down vote up
protected CorbaMessageMediator createResponseHelper(
    CorbaMessageMediator messageMediator, ServiceContexts svc,boolean user)
{
    ReplyMessage message =
        MessageBase.createReply(
            (ORB)messageMediator.getBroker(),
            messageMediator.getGIOPVersion(),
            messageMediator.getEncodingVersion(),
            messageMediator.getRequestId(),
            user ? ReplyMessage.USER_EXCEPTION :
                   ReplyMessage.SYSTEM_EXCEPTION,
            svc,
            null);
    return createResponseHelper(messageMediator, message, null);
}
 
Example 10
Source File: CorbaMessageMediatorImpl.java    From hottub with GNU General Public License v2.0 5 votes vote down vote up
protected CorbaMessageMediator createResponseHelper(
    CorbaMessageMediator messageMediator, ServiceContexts svc)
{
    ReplyMessage message =
        MessageBase.createReply(
            (ORB)messageMediator.getBroker(),
            messageMediator.getGIOPVersion(),
            messageMediator.getEncodingVersion(),
            messageMediator.getRequestId(),
            ReplyMessage.NO_EXCEPTION,
            svc,
            null);
    return createResponseHelper(messageMediator, message, null);
}
 
Example 11
Source File: CorbaMessageMediatorImpl.java    From TencentKona-8 with GNU General Public License v2.0 5 votes vote down vote up
public CorbaMessageMediator createLocationForward(
    CorbaMessageMediator messageMediator, IOR ior, ServiceContexts svc)
{
    ReplyMessage reply
        = MessageBase.createReply(
              (ORB)messageMediator.getBroker(),
              messageMediator.getGIOPVersion(),
              messageMediator.getEncodingVersion(),
              messageMediator.getRequestId(),
              ReplyMessage.LOCATION_FORWARD,
              getServiceContextsForReply(messageMediator, svc),
              ior);

    return createResponseHelper(messageMediator, reply, ior);
}
 
Example 12
Source File: CorbaMessageMediatorImpl.java    From jdk1.8-source-analysis with Apache License 2.0 5 votes vote down vote up
protected CorbaMessageMediator createResponseHelper(
    CorbaMessageMediator messageMediator, ServiceContexts svc,boolean user)
{
    ReplyMessage message =
        MessageBase.createReply(
            (ORB)messageMediator.getBroker(),
            messageMediator.getGIOPVersion(),
            messageMediator.getEncodingVersion(),
            messageMediator.getRequestId(),
            user ? ReplyMessage.USER_EXCEPTION :
                   ReplyMessage.SYSTEM_EXCEPTION,
            svc,
            null);
    return createResponseHelper(messageMediator, message, null);
}
 
Example 13
Source File: CorbaMessageMediatorImpl.java    From jdk1.8-source-analysis with Apache License 2.0 5 votes vote down vote up
protected CorbaMessageMediator createResponseHelper(
    CorbaMessageMediator messageMediator, ServiceContexts svc)
{
    ReplyMessage message =
        MessageBase.createReply(
            (ORB)messageMediator.getBroker(),
            messageMediator.getGIOPVersion(),
            messageMediator.getEncodingVersion(),
            messageMediator.getRequestId(),
            ReplyMessage.NO_EXCEPTION,
            svc,
            null);
    return createResponseHelper(messageMediator, message, null);
}
 
Example 14
Source File: CorbaMessageMediatorImpl.java    From openjdk-8-source with GNU General Public License v2.0 5 votes vote down vote up
protected CorbaMessageMediator createResponseHelper(
    CorbaMessageMediator messageMediator, ServiceContexts svc)
{
    ReplyMessage message =
        MessageBase.createReply(
            (ORB)messageMediator.getBroker(),
            messageMediator.getGIOPVersion(),
            messageMediator.getEncodingVersion(),
            messageMediator.getRequestId(),
            ReplyMessage.NO_EXCEPTION,
            svc,
            null);
    return createResponseHelper(messageMediator, message, null);
}
 
Example 15
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 16
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 17
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 18
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 19
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 20
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;
    }
}