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

The following examples show how to use com.sun.corba.se.impl.protocol.giopmsgheaders.MessageBase. 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 Project: openjdk-8   Author: bpupadhyaya   File: SocketOrChannelConnectionImpl.java    License: GNU General Public License v2.0 5 votes vote down vote up
/*************************************************************************
* The following methods are for dealing with Connection cleaning for
* better scalability of servers in high network load conditions.
**************************************************************************/

public void sendCloseConnection(GIOPVersion giopVersion)
    throws IOException
{
    Message msg = MessageBase.createCloseConnection(giopVersion);
    sendHelper(giopVersion, msg);
}
 
Example #2
Source Project: openjdk-8-source   Author: keerath   File: CorbaMessageMediatorImpl.java    License: 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 #3
Source Project: jdk1.8-source-analysis   Author: raysonfang   File: CorbaMessageMediatorImpl.java    License: 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 #4
Source Project: jdk1.8-source-analysis   Author: raysonfang   File: CorbaMessageMediatorImpl.java    License: 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 #5
Source Project: jdk1.8-source-analysis   Author: raysonfang   File: CorbaContactInfoBase.java    License: Apache License 2.0 5 votes vote down vote up
public MessageMediator createMessageMediator(Broker broker,Connection conn)
{
    ORB orb = (ORB) broker;
    CorbaConnection connection = (CorbaConnection) conn;

    if (orb.transportDebugFlag) {
        if (connection.shouldReadGiopHeaderOnly()) {
            dprint(
            ".createMessageMediator: waiting for message header on connection: "
            + connection);
        } else {
            dprint(
            ".createMessageMediator: waiting for message on connection: "
            + connection);
        }
    }

    Message msg = null;

    if (connection.shouldReadGiopHeaderOnly()) {
        // read giop header only
        msg = MessageBase.readGIOPHeader(orb, connection);
    } else {
        // read entire giop message
        msg = MessageBase.readGIOPMessage(orb, connection);
    }

    ByteBuffer byteBuffer = msg.getByteBuffer();
    msg.setByteBuffer(null);
    CorbaMessageMediator messageMediator =
        new CorbaMessageMediatorImpl(orb, connection, msg, byteBuffer);

    return messageMediator;
}
 
Example #6
Source Project: openjdk-8-source   Author: keerath   File: SocketOrChannelConnectionImpl.java    License: GNU General Public License v2.0 5 votes vote down vote up
/**
 * Send a CancelRequest message. This does not lock the connection, so the
 * caller needs to ensure this method is called appropriately.
 * @exception IOException - could be due to abortive connection closure.
 */
public void sendCancelRequest(GIOPVersion giopVersion, int requestId)
    throws IOException
{

    Message msg = MessageBase.createCancelRequest(giopVersion, requestId);
    sendHelper(giopVersion, msg);
}
 
Example #7
Source Project: hottub   Author: dsrg-uoft   File: SocketOrChannelConnectionImpl.java    License: GNU General Public License v2.0 5 votes vote down vote up
/*************************************************************************
* The following methods are for dealing with Connection cleaning for
* better scalability of servers in high network load conditions.
**************************************************************************/

public void sendCloseConnection(GIOPVersion giopVersion)
    throws IOException
{
    Message msg = MessageBase.createCloseConnection(giopVersion);
    sendHelper(giopVersion, msg);
}
 
Example #8
Source Project: openjdk-8   Author: bpupadhyaya   File: CorbaContactInfoBase.java    License: GNU General Public License v2.0 5 votes vote down vote up
public MessageMediator finishCreatingMessageMediator(Broker broker,
                           Connection conn, MessageMediator messageMediator)
{
    ORB orb = (ORB) broker;
    CorbaConnection connection = (CorbaConnection) conn;
    CorbaMessageMediator corbaMessageMediator =
                  (CorbaMessageMediator)messageMediator;

    if (orb.transportDebugFlag) {
        dprint(
        ".finishCreatingMessageMediator: waiting for message body on connection: "
            + connection);
    }

    Message msg = corbaMessageMediator.getDispatchHeader();
    msg.setByteBuffer(corbaMessageMediator.getDispatchBuffer());

    // read giop body only
    msg = MessageBase.readGIOPBody(orb, connection, msg);

    ByteBuffer byteBuffer = msg.getByteBuffer();
    msg.setByteBuffer(null);
    corbaMessageMediator.setDispatchHeader(msg);
    corbaMessageMediator.setDispatchBuffer(byteBuffer);

    return corbaMessageMediator;
}
 
Example #9
Source Project: openjdk-8-source   Author: keerath   File: CorbaContactInfoBase.java    License: GNU General Public License v2.0 5 votes vote down vote up
public MessageMediator finishCreatingMessageMediator(Broker broker,
                           Connection conn, MessageMediator messageMediator)
{
    ORB orb = (ORB) broker;
    CorbaConnection connection = (CorbaConnection) conn;
    CorbaMessageMediator corbaMessageMediator =
                  (CorbaMessageMediator)messageMediator;

    if (orb.transportDebugFlag) {
        dprint(
        ".finishCreatingMessageMediator: waiting for message body on connection: "
            + connection);
    }

    Message msg = corbaMessageMediator.getDispatchHeader();
    msg.setByteBuffer(corbaMessageMediator.getDispatchBuffer());

    // read giop body only
    msg = MessageBase.readGIOPBody(orb, connection, msg);

    ByteBuffer byteBuffer = msg.getByteBuffer();
    msg.setByteBuffer(null);
    corbaMessageMediator.setDispatchHeader(msg);
    corbaMessageMediator.setDispatchBuffer(byteBuffer);

    return corbaMessageMediator;
}
 
Example #10
Source Project: jdk1.8-source-analysis   Author: raysonfang   File: BufferManagerWriteCollect.java    License: Apache License 2.0 5 votes vote down vote up
public void overflow (ByteBufferWithInfo bbwi)
{
    // Set the fragment's moreFragments field to true
    MessageBase.setFlag(bbwi.byteBuffer, Message.MORE_FRAGMENTS_BIT);

    // Enqueue the previous fragment
    queue.enqueue(bbwi);

    // Create a new bbwi
    ByteBufferWithInfo newBbwi = new ByteBufferWithInfo(orb, this);
    newBbwi.fragmented = true;

    // XREVISIT - Downcast
    ((CDROutputObject)outputObject).setByteBufferWithInfo(newBbwi);

    // Now we must marshal in the fragment header/GIOP header

    // REVISIT - we can optimize this by not creating the fragment message
    // each time.

    // XREVISIT - Downcast
    FragmentMessage header =
          ((CDROutputObject)outputObject).getMessageHeader()
                                         .createFragmentMessage();

    header.write((CDROutputObject)outputObject);
}
 
Example #11
Source Project: openjdk-jdk9   Author: AdoptOpenJDK   File: SocketOrChannelConnectionImpl.java    License: GNU General Public License v2.0 5 votes vote down vote up
/*************************************************************************
* The following methods are for dealing with Connection cleaning for
* better scalability of servers in high network load conditions.
**************************************************************************/

public void sendCloseConnection(GIOPVersion giopVersion)
    throws IOException
{
    Message msg = MessageBase.createCloseConnection(giopVersion);
    sendHelper(giopVersion, msg);
}
 
Example #12
Source Project: TencentKona-8   Author: Tencent   File: CorbaMessageMediatorImpl.java    License: GNU General Public License v2.0 5 votes vote down vote up
public void handleInput(Message header) throws IOException
{
    try {
        messageHeader = header;

        if (transportDebug())
            dprint(".handleInput->: "
                   + MessageBase.typeToString(header.getType()));

        setWorkThenReadOrResumeSelect(header);

        switch(header.getType())
        {
        case Message.GIOPCloseConnection:
            if (transportDebug()) {
                dprint(".handleInput: CloseConnection: purging");
            }
            connection.purgeCalls(wrapper.connectionRebind(), true, false);
            break;
        case Message.GIOPMessageError:
            if (transportDebug()) {
                dprint(".handleInput: MessageError: purging");
            }
            connection.purgeCalls(wrapper.recvMsgError(), true, false);
            break;
        default:
            if (transportDebug()) {
                dprint(".handleInput: ERROR: "
                       + MessageBase.typeToString(header.getType()));
            }
            throw wrapper.badGiopRequestType() ;
        }
        releaseByteBufferToPool();
    } finally {
        if (transportDebug()) {
            dprint(".handleInput<-: "
                   + MessageBase.typeToString(header.getType()));
        }
    }
}
 
Example #13
Source Project: TencentKona-8   Author: Tencent   File: CorbaMessageMediatorImpl.java    License: 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 #14
Source Project: openjdk-8-source   Author: keerath   File: CorbaContactInfoBase.java    License: GNU General Public License v2.0 5 votes vote down vote up
public MessageMediator createMessageMediator(Broker broker,Connection conn)
{
    ORB orb = (ORB) broker;
    CorbaConnection connection = (CorbaConnection) conn;

    if (orb.transportDebugFlag) {
        if (connection.shouldReadGiopHeaderOnly()) {
            dprint(
            ".createMessageMediator: waiting for message header on connection: "
            + connection);
        } else {
            dprint(
            ".createMessageMediator: waiting for message on connection: "
            + connection);
        }
    }

    Message msg = null;

    if (connection.shouldReadGiopHeaderOnly()) {
        // read giop header only
        msg = MessageBase.readGIOPHeader(orb, connection);
    } else {
        // read entire giop message
        msg = MessageBase.readGIOPMessage(orb, connection);
    }

    ByteBuffer byteBuffer = msg.getByteBuffer();
    msg.setByteBuffer(null);
    CorbaMessageMediator messageMediator =
        new CorbaMessageMediatorImpl(orb, connection, msg, byteBuffer);

    return messageMediator;
}
 
Example #15
Source Project: TencentKona-8   Author: Tencent   File: CorbaMessageMediatorImpl.java    License: 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 #16
Source Project: TencentKona-8   Author: Tencent   File: CorbaContactInfoBase.java    License: GNU General Public License v2.0 5 votes vote down vote up
public MessageMediator createMessageMediator(Broker broker,Connection conn)
{
    ORB orb = (ORB) broker;
    CorbaConnection connection = (CorbaConnection) conn;

    if (orb.transportDebugFlag) {
        if (connection.shouldReadGiopHeaderOnly()) {
            dprint(
            ".createMessageMediator: waiting for message header on connection: "
            + connection);
        } else {
            dprint(
            ".createMessageMediator: waiting for message on connection: "
            + connection);
        }
    }

    Message msg = null;

    if (connection.shouldReadGiopHeaderOnly()) {
        // read giop header only
        msg = MessageBase.readGIOPHeader(orb, connection);
    } else {
        // read entire giop message
        msg = MessageBase.readGIOPMessage(orb, connection);
    }

    ByteBuffer byteBuffer = msg.getByteBuffer();
    msg.setByteBuffer(null);
    CorbaMessageMediator messageMediator =
        new CorbaMessageMediatorImpl(orb, connection, msg, byteBuffer);

    return messageMediator;
}
 
Example #17
Source Project: TencentKona-8   Author: Tencent   File: CorbaContactInfoBase.java    License: GNU General Public License v2.0 5 votes vote down vote up
public MessageMediator finishCreatingMessageMediator(Broker broker,
                           Connection conn, MessageMediator messageMediator)
{
    ORB orb = (ORB) broker;
    CorbaConnection connection = (CorbaConnection) conn;
    CorbaMessageMediator corbaMessageMediator =
                  (CorbaMessageMediator)messageMediator;

    if (orb.transportDebugFlag) {
        dprint(
        ".finishCreatingMessageMediator: waiting for message body on connection: "
            + connection);
    }

    Message msg = corbaMessageMediator.getDispatchHeader();
    msg.setByteBuffer(corbaMessageMediator.getDispatchBuffer());

    // read giop body only
    msg = MessageBase.readGIOPBody(orb, connection, msg);

    ByteBuffer byteBuffer = msg.getByteBuffer();
    msg.setByteBuffer(null);
    corbaMessageMediator.setDispatchHeader(msg);
    corbaMessageMediator.setDispatchBuffer(byteBuffer);

    return corbaMessageMediator;
}
 
Example #18
Source Project: TencentKona-8   Author: Tencent   File: SocketOrChannelConnectionImpl.java    License: GNU General Public License v2.0 5 votes vote down vote up
/*************************************************************************
* The following methods are for dealing with Connection cleaning for
* better scalability of servers in high network load conditions.
**************************************************************************/

public void sendCloseConnection(GIOPVersion giopVersion)
    throws IOException
{
    Message msg = MessageBase.createCloseConnection(giopVersion);
    sendHelper(giopVersion, msg);
}
 
Example #19
Source Project: openjdk-8-source   Author: keerath   File: SocketOrChannelConnectionImpl.java    License: GNU General Public License v2.0 5 votes vote down vote up
/*************************************************************************
* The following methods are for dealing with Connection cleaning for
* better scalability of servers in high network load conditions.
**************************************************************************/

public void sendCloseConnection(GIOPVersion giopVersion)
    throws IOException
{
    Message msg = MessageBase.createCloseConnection(giopVersion);
    sendHelper(giopVersion, msg);
}
 
Example #20
Source Project: TencentKona-8   Author: Tencent   File: BufferManagerWriteCollect.java    License: GNU General Public License v2.0 5 votes vote down vote up
public void overflow (ByteBufferWithInfo bbwi)
{
    // Set the fragment's moreFragments field to true
    MessageBase.setFlag(bbwi.byteBuffer, Message.MORE_FRAGMENTS_BIT);

    // Enqueue the previous fragment
    queue.enqueue(bbwi);

    // Create a new bbwi
    ByteBufferWithInfo newBbwi = new ByteBufferWithInfo(orb, this);
    newBbwi.fragmented = true;

    // XREVISIT - Downcast
    ((CDROutputObject)outputObject).setByteBufferWithInfo(newBbwi);

    // Now we must marshal in the fragment header/GIOP header

    // REVISIT - we can optimize this by not creating the fragment message
    // each time.

    // XREVISIT - Downcast
    FragmentMessage header =
          ((CDROutputObject)outputObject).getMessageHeader()
                                         .createFragmentMessage();

    header.write((CDROutputObject)outputObject);
}
 
Example #21
Source Project: jdk8u60   Author: chenghanpeng   File: CorbaMessageMediatorImpl.java    License: 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 #22
Source Project: jdk8u60   Author: chenghanpeng   File: CorbaMessageMediatorImpl.java    License: GNU General Public License v2.0 5 votes vote down vote up
public void handleInput(Message header) throws IOException
{
    try {
        messageHeader = header;

        if (transportDebug())
            dprint(".handleInput->: "
                   + MessageBase.typeToString(header.getType()));

        setWorkThenReadOrResumeSelect(header);

        switch(header.getType())
        {
        case Message.GIOPCloseConnection:
            if (transportDebug()) {
                dprint(".handleInput: CloseConnection: purging");
            }
            connection.purgeCalls(wrapper.connectionRebind(), true, false);
            break;
        case Message.GIOPMessageError:
            if (transportDebug()) {
                dprint(".handleInput: MessageError: purging");
            }
            connection.purgeCalls(wrapper.recvMsgError(), true, false);
            break;
        default:
            if (transportDebug()) {
                dprint(".handleInput: ERROR: "
                       + MessageBase.typeToString(header.getType()));
            }
            throw wrapper.badGiopRequestType() ;
        }
        releaseByteBufferToPool();
    } finally {
        if (transportDebug()) {
            dprint(".handleInput<-: "
                   + MessageBase.typeToString(header.getType()));
        }
    }
}
 
Example #23
Source Project: jdk8u60   Author: chenghanpeng   File: CorbaMessageMediatorImpl.java    License: 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 #24
Source Project: jdk8u60   Author: chenghanpeng   File: CorbaMessageMediatorImpl.java    License: 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 #25
Source Project: jdk8u60   Author: chenghanpeng   File: CorbaMessageMediatorImpl.java    License: 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 #26
Source Project: jdk8u60   Author: chenghanpeng   File: CorbaContactInfoBase.java    License: GNU General Public License v2.0 5 votes vote down vote up
public MessageMediator createMessageMediator(Broker broker,Connection conn)
{
    ORB orb = (ORB) broker;
    CorbaConnection connection = (CorbaConnection) conn;

    if (orb.transportDebugFlag) {
        if (connection.shouldReadGiopHeaderOnly()) {
            dprint(
            ".createMessageMediator: waiting for message header on connection: "
            + connection);
        } else {
            dprint(
            ".createMessageMediator: waiting for message on connection: "
            + connection);
        }
    }

    Message msg = null;

    if (connection.shouldReadGiopHeaderOnly()) {
        // read giop header only
        msg = MessageBase.readGIOPHeader(orb, connection);
    } else {
        // read entire giop message
        msg = MessageBase.readGIOPMessage(orb, connection);
    }

    ByteBuffer byteBuffer = msg.getByteBuffer();
    msg.setByteBuffer(null);
    CorbaMessageMediator messageMediator =
        new CorbaMessageMediatorImpl(orb, connection, msg, byteBuffer);

    return messageMediator;
}
 
Example #27
Source Project: jdk8u60   Author: chenghanpeng   File: CorbaContactInfoBase.java    License: GNU General Public License v2.0 5 votes vote down vote up
public MessageMediator finishCreatingMessageMediator(Broker broker,
                           Connection conn, MessageMediator messageMediator)
{
    ORB orb = (ORB) broker;
    CorbaConnection connection = (CorbaConnection) conn;
    CorbaMessageMediator corbaMessageMediator =
                  (CorbaMessageMediator)messageMediator;

    if (orb.transportDebugFlag) {
        dprint(
        ".finishCreatingMessageMediator: waiting for message body on connection: "
            + connection);
    }

    Message msg = corbaMessageMediator.getDispatchHeader();
    msg.setByteBuffer(corbaMessageMediator.getDispatchBuffer());

    // read giop body only
    msg = MessageBase.readGIOPBody(orb, connection, msg);

    ByteBuffer byteBuffer = msg.getByteBuffer();
    msg.setByteBuffer(null);
    corbaMessageMediator.setDispatchHeader(msg);
    corbaMessageMediator.setDispatchBuffer(byteBuffer);

    return corbaMessageMediator;
}
 
Example #28
Source Project: jdk8u60   Author: chenghanpeng   File: SocketOrChannelConnectionImpl.java    License: GNU General Public License v2.0 5 votes vote down vote up
/*************************************************************************
* The following methods are for dealing with Connection cleaning for
* better scalability of servers in high network load conditions.
**************************************************************************/

public void sendCloseConnection(GIOPVersion giopVersion)
    throws IOException
{
    Message msg = MessageBase.createCloseConnection(giopVersion);
    sendHelper(giopVersion, msg);
}
 
Example #29
Source Project: openjdk-jdk9   Author: AdoptOpenJDK   File: CorbaMessageMediatorImpl.java    License: 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 #30
Source Project: openjdk-8   Author: bpupadhyaya   File: CorbaMessageMediatorImpl.java    License: GNU General Public License v2.0 5 votes vote down vote up
public void handleInput(Message header) throws IOException
{
    try {
        messageHeader = header;

        if (transportDebug())
            dprint(".handleInput->: "
                   + MessageBase.typeToString(header.getType()));

        setWorkThenReadOrResumeSelect(header);

        switch(header.getType())
        {
        case Message.GIOPCloseConnection:
            if (transportDebug()) {
                dprint(".handleInput: CloseConnection: purging");
            }
            connection.purgeCalls(wrapper.connectionRebind(), true, false);
            break;
        case Message.GIOPMessageError:
            if (transportDebug()) {
                dprint(".handleInput: MessageError: purging");
            }
            connection.purgeCalls(wrapper.recvMsgError(), true, false);
            break;
        default:
            if (transportDebug()) {
                dprint(".handleInput: ERROR: "
                       + MessageBase.typeToString(header.getType()));
            }
            throw wrapper.badGiopRequestType() ;
        }
        releaseByteBufferToPool();
    } finally {
        if (transportDebug()) {
            dprint(".handleInput<-: "
                   + MessageBase.typeToString(header.getType()));
        }
    }
}