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

The following examples show how to use com.sun.corba.se.impl.protocol.giopmsgheaders.FragmentMessage. 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: BufferManagerReadStream.java    From openjdk-8 with GNU General Public License v2.0 6 votes vote down vote up
public void processFragment(ByteBuffer byteBuffer, FragmentMessage msg)
{
    ByteBufferWithInfo bbwi =
        new ByteBufferWithInfo(orb, byteBuffer, msg.getHeaderLength());

    synchronized (fragmentQueue) {
        if (debug)
        {
            // print address of ByteBuffer being queued
            int bbAddress = System.identityHashCode(byteBuffer);
            StringBuffer sb = new StringBuffer(80);
            sb.append("processFragment() - queueing ByteBuffer id (");
            sb.append(bbAddress).append(") to fragment queue.");
            String strMsg = sb.toString();
            dprint(strMsg);
        }
        fragmentQueue.enqueue(bbwi);
        endOfStream = !msg.moreFragmentsToFollow();
        fragmentQueue.notify();
    }
}
 
Example #2
Source File: BufferManagerReadStream.java    From openjdk-jdk8u with GNU General Public License v2.0 6 votes vote down vote up
public void processFragment(ByteBuffer byteBuffer, FragmentMessage msg)
{
    ByteBufferWithInfo bbwi =
        new ByteBufferWithInfo(orb, byteBuffer, msg.getHeaderLength());

    synchronized (fragmentQueue) {
        if (debug)
        {
            // print address of ByteBuffer being queued
            int bbAddress = System.identityHashCode(byteBuffer);
            StringBuffer sb = new StringBuffer(80);
            sb.append("processFragment() - queueing ByteBuffer id (");
            sb.append(bbAddress).append(") to fragment queue.");
            String strMsg = sb.toString();
            dprint(strMsg);
        }
        fragmentQueue.enqueue(bbwi);
        endOfStream = !msg.moreFragmentsToFollow();
        fragmentQueue.notify();
    }
}
 
Example #3
Source File: BufferManagerReadStream.java    From jdk1.8-source-analysis with Apache License 2.0 6 votes vote down vote up
public void processFragment(ByteBuffer byteBuffer, FragmentMessage msg)
{
    ByteBufferWithInfo bbwi =
        new ByteBufferWithInfo(orb, byteBuffer, msg.getHeaderLength());

    synchronized (fragmentQueue) {
        if (debug)
        {
            // print address of ByteBuffer being queued
            int bbAddress = System.identityHashCode(byteBuffer);
            StringBuffer sb = new StringBuffer(80);
            sb.append("processFragment() - queueing ByteBuffer id (");
            sb.append(bbAddress).append(") to fragment queue.");
            String strMsg = sb.toString();
            dprint(strMsg);
        }
        fragmentQueue.enqueue(bbwi);
        endOfStream = !msg.moreFragmentsToFollow();
        fragmentQueue.notify();
    }
}
 
Example #4
Source File: BufferManagerReadStream.java    From openjdk-8-source with GNU General Public License v2.0 6 votes vote down vote up
public void processFragment(ByteBuffer byteBuffer, FragmentMessage msg)
{
    ByteBufferWithInfo bbwi =
        new ByteBufferWithInfo(orb, byteBuffer, msg.getHeaderLength());

    synchronized (fragmentQueue) {
        if (debug)
        {
            // print address of ByteBuffer being queued
            int bbAddress = System.identityHashCode(byteBuffer);
            StringBuffer sb = new StringBuffer(80);
            sb.append("processFragment() - queueing ByteBuffer id (");
            sb.append(bbAddress).append(") to fragment queue.");
            String strMsg = sb.toString();
            dprint(strMsg);
        }
        fragmentQueue.enqueue(bbwi);
        endOfStream = !msg.moreFragmentsToFollow();
        fragmentQueue.notify();
    }
}
 
Example #5
Source File: BufferManagerReadStream.java    From JDKSourceCode1.8 with MIT License 6 votes vote down vote up
public void processFragment(ByteBuffer byteBuffer, FragmentMessage msg)
{
    ByteBufferWithInfo bbwi =
        new ByteBufferWithInfo(orb, byteBuffer, msg.getHeaderLength());

    synchronized (fragmentQueue) {
        if (debug)
        {
            // print address of ByteBuffer being queued
            int bbAddress = System.identityHashCode(byteBuffer);
            StringBuffer sb = new StringBuffer(80);
            sb.append("processFragment() - queueing ByteBuffer id (");
            sb.append(bbAddress).append(") to fragment queue.");
            String strMsg = sb.toString();
            dprint(strMsg);
        }
        fragmentQueue.enqueue(bbwi);
        endOfStream = !msg.moreFragmentsToFollow();
        fragmentQueue.notify();
    }
}
 
Example #6
Source File: BufferManagerReadStream.java    From hottub with GNU General Public License v2.0 6 votes vote down vote up
public void processFragment(ByteBuffer byteBuffer, FragmentMessage msg)
{
    ByteBufferWithInfo bbwi =
        new ByteBufferWithInfo(orb, byteBuffer, msg.getHeaderLength());

    synchronized (fragmentQueue) {
        if (debug)
        {
            // print address of ByteBuffer being queued
            int bbAddress = System.identityHashCode(byteBuffer);
            StringBuffer sb = new StringBuffer(80);
            sb.append("processFragment() - queueing ByteBuffer id (");
            sb.append(bbAddress).append(") to fragment queue.");
            String strMsg = sb.toString();
            dprint(strMsg);
        }
        fragmentQueue.enqueue(bbwi);
        endOfStream = !msg.moreFragmentsToFollow();
        fragmentQueue.notify();
    }
}
 
Example #7
Source File: BufferManagerReadStream.java    From TencentKona-8 with GNU General Public License v2.0 6 votes vote down vote up
public void processFragment(ByteBuffer byteBuffer, FragmentMessage msg)
{
    ByteBufferWithInfo bbwi =
        new ByteBufferWithInfo(orb, byteBuffer, msg.getHeaderLength());

    synchronized (fragmentQueue) {
        if (debug)
        {
            // print address of ByteBuffer being queued
            int bbAddress = System.identityHashCode(byteBuffer);
            StringBuffer sb = new StringBuffer(80);
            sb.append("processFragment() - queueing ByteBuffer id (");
            sb.append(bbAddress).append(") to fragment queue.");
            String strMsg = sb.toString();
            dprint(strMsg);
        }
        fragmentQueue.enqueue(bbwi);
        endOfStream = !msg.moreFragmentsToFollow();
        fragmentQueue.notify();
    }
}
 
Example #8
Source File: BufferManagerReadStream.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 6 votes vote down vote up
public void processFragment(ByteBuffer byteBuffer, FragmentMessage msg)
{
    ByteBufferWithInfo bbwi =
        new ByteBufferWithInfo(orb, byteBuffer, msg.getHeaderLength());

    synchronized (fragmentQueue) {
        if (debug)
        {
            // print address of ByteBuffer being queued
            int bbAddress = System.identityHashCode(byteBuffer);
            StringBuffer sb = new StringBuffer(80);
            sb.append("processFragment() - queueing ByteBuffer id (");
            sb.append(bbAddress).append(") to fragment queue.");
            String strMsg = sb.toString();
            dprint(strMsg);
        }
        fragmentQueue.enqueue(bbwi);
        endOfStream = !msg.moreFragmentsToFollow();
        fragmentQueue.notify();
    }
}
 
Example #9
Source File: BufferManagerReadStream.java    From openjdk-jdk9 with GNU General Public License v2.0 6 votes vote down vote up
public void processFragment(ByteBuffer byteBuffer, FragmentMessage msg)
{
    ByteBufferWithInfo bbwi =
        new ByteBufferWithInfo(orb, byteBuffer, msg.getHeaderLength());

    synchronized (fragmentQueue) {
        if (debug)
        {
            // print address of ByteBuffer being queued
            int bbAddress = System.identityHashCode(byteBuffer);
            StringBuffer sb = new StringBuffer(80);
            sb.append("processFragment() - queueing ByteBuffer id (");
            sb.append(bbAddress).append(") to fragment queue.");
            String strMsg = sb.toString();
            dprint(strMsg);
        }
        fragmentQueue.enqueue(bbwi);
        endOfStream = !msg.moreFragmentsToFollow();
        fragmentQueue.notify();
    }
}
 
Example #10
Source File: BufferManagerReadStream.java    From jdk8u60 with GNU General Public License v2.0 6 votes vote down vote up
public void processFragment(ByteBuffer byteBuffer, FragmentMessage msg)
{
    ByteBufferWithInfo bbwi =
        new ByteBufferWithInfo(orb, byteBuffer, msg.getHeaderLength());

    synchronized (fragmentQueue) {
        if (debug)
        {
            // print address of ByteBuffer being queued
            int bbAddress = System.identityHashCode(byteBuffer);
            StringBuffer sb = new StringBuffer(80);
            sb.append("processFragment() - queueing ByteBuffer id (");
            sb.append(bbAddress).append(") to fragment queue.");
            String strMsg = sb.toString();
            dprint(strMsg);
        }
        fragmentQueue.enqueue(bbwi);
        endOfStream = !msg.moreFragmentsToFollow();
        fragmentQueue.notify();
    }
}
 
Example #11
Source File: BufferManagerWriteCollect.java    From openjdk-jdk8u with 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 #12
Source File: BufferManagerWriteStream.java    From jdk1.8-source-analysis with 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);

    try {
       sendFragment(false);
    } catch(SystemException se){
            orb.getPIHandler().invokeClientPIEndingPoint(
                    ReplyMessage.SYSTEM_EXCEPTION, se);
            throw se;
    }

    // Reuse the old buffer

    // REVISIT - need to account for case when needed > available
    // even after fragmenting.  This is the large array case, so
    // the caller should retry when it runs out of space.
    bbwi.position(0);
    bbwi.buflen = bbwi.byteBuffer.limit();
    bbwi.fragmented = true;

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

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

    FragmentMessage header = ((CDROutputObject)outputObject).getMessageHeader().createFragmentMessage();

    header.write(((CDROutputObject)outputObject));
}
 
Example #13
Source File: BufferManagerWriteStream.java    From openjdk-jdk8u-backup with 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);

    try {
       sendFragment(false);
    } catch(SystemException se){
            orb.getPIHandler().invokeClientPIEndingPoint(
                    ReplyMessage.SYSTEM_EXCEPTION, se);
            throw se;
    }

    // Reuse the old buffer

    // REVISIT - need to account for case when needed > available
    // even after fragmenting.  This is the large array case, so
    // the caller should retry when it runs out of space.
    bbwi.position(0);
    bbwi.buflen = bbwi.byteBuffer.limit();
    bbwi.fragmented = true;

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

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

    FragmentMessage header = ((CDROutputObject)outputObject).getMessageHeader().createFragmentMessage();

    header.write(((CDROutputObject)outputObject));
}
 
Example #14
Source File: BufferManagerWriteCollect.java    From openjdk-jdk8u-backup with 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 #15
Source File: BufferManagerWriteStream.java    From openjdk-jdk9 with 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);

    try {
       sendFragment(false);
    } catch(SystemException se){
            orb.getPIHandler().invokeClientPIEndingPoint(
                    ReplyMessage.SYSTEM_EXCEPTION, se);
            throw se;
    }

    // Reuse the old buffer

    // REVISIT - need to account for case when needed > available
    // even after fragmenting.  This is the large array case, so
    // the caller should retry when it runs out of space.
    bbwi.position(0);
    bbwi.buflen = bbwi.byteBuffer.limit();
    bbwi.fragmented = true;

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

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

    FragmentMessage header = ((CDROutputObject)outputObject).getMessageHeader().createFragmentMessage();

    header.write(((CDROutputObject)outputObject));
}
 
Example #16
Source File: BufferManagerWriteCollect.java    From openjdk-jdk9 with 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 #17
Source File: BufferManagerWriteStream.java    From hottub with 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);

    try {
       sendFragment(false);
    } catch(SystemException se){
            orb.getPIHandler().invokeClientPIEndingPoint(
                    ReplyMessage.SYSTEM_EXCEPTION, se);
            throw se;
    }

    // Reuse the old buffer

    // REVISIT - need to account for case when needed > available
    // even after fragmenting.  This is the large array case, so
    // the caller should retry when it runs out of space.
    bbwi.position(0);
    bbwi.buflen = bbwi.byteBuffer.limit();
    bbwi.fragmented = true;

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

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

    FragmentMessage header = ((CDROutputObject)outputObject).getMessageHeader().createFragmentMessage();

    header.write(((CDROutputObject)outputObject));
}
 
Example #18
Source File: BufferManagerWriteCollect.java    From hottub with 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 #19
Source File: BufferManagerWriteStream.java    From openjdk-8-source with 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);

    try {
       sendFragment(false);
    } catch(SystemException se){
            orb.getPIHandler().invokeClientPIEndingPoint(
                    ReplyMessage.SYSTEM_EXCEPTION, se);
            throw se;
    }

    // Reuse the old buffer

    // REVISIT - need to account for case when needed > available
    // even after fragmenting.  This is the large array case, so
    // the caller should retry when it runs out of space.
    bbwi.position(0);
    bbwi.buflen = bbwi.byteBuffer.limit();
    bbwi.fragmented = true;

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

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

    FragmentMessage header = ((CDROutputObject)outputObject).getMessageHeader().createFragmentMessage();

    header.write(((CDROutputObject)outputObject));
}
 
Example #20
Source File: BufferManagerWriteCollect.java    From openjdk-8-source with 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 File: BufferManagerWriteStream.java    From openjdk-8 with 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);

    try {
       sendFragment(false);
    } catch(SystemException se){
            orb.getPIHandler().invokeClientPIEndingPoint(
                    ReplyMessage.SYSTEM_EXCEPTION, se);
            throw se;
    }

    // Reuse the old buffer

    // REVISIT - need to account for case when needed > available
    // even after fragmenting.  This is the large array case, so
    // the caller should retry when it runs out of space.
    bbwi.position(0);
    bbwi.buflen = bbwi.byteBuffer.limit();
    bbwi.fragmented = true;

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

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

    FragmentMessage header = ((CDROutputObject)outputObject).getMessageHeader().createFragmentMessage();

    header.write(((CDROutputObject)outputObject));
}
 
Example #22
Source File: BufferManagerWriteCollect.java    From openjdk-8 with 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 #23
Source File: BufferManagerWriteStream.java    From openjdk-jdk8u with 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);

    try {
       sendFragment(false);
    } catch(SystemException se){
            orb.getPIHandler().invokeClientPIEndingPoint(
                    ReplyMessage.SYSTEM_EXCEPTION, se);
            throw se;
    }

    // Reuse the old buffer

    // REVISIT - need to account for case when needed > available
    // even after fragmenting.  This is the large array case, so
    // the caller should retry when it runs out of space.
    bbwi.position(0);
    bbwi.buflen = bbwi.byteBuffer.limit();
    bbwi.fragmented = true;

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

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

    FragmentMessage header = ((CDROutputObject)outputObject).getMessageHeader().createFragmentMessage();

    header.write(((CDROutputObject)outputObject));
}
 
Example #24
Source File: BufferManagerWriteCollect.java    From jdk1.8-source-analysis with 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 #25
Source File: BufferManagerWriteStream.java    From TencentKona-8 with 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);

    try {
       sendFragment(false);
    } catch(SystemException se){
            orb.getPIHandler().invokeClientPIEndingPoint(
                    ReplyMessage.SYSTEM_EXCEPTION, se);
            throw se;
    }

    // Reuse the old buffer

    // REVISIT - need to account for case when needed > available
    // even after fragmenting.  This is the large array case, so
    // the caller should retry when it runs out of space.
    bbwi.position(0);
    bbwi.buflen = bbwi.byteBuffer.limit();
    bbwi.fragmented = true;

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

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

    FragmentMessage header = ((CDROutputObject)outputObject).getMessageHeader().createFragmentMessage();

    header.write(((CDROutputObject)outputObject));
}
 
Example #26
Source File: BufferManagerWriteCollect.java    From TencentKona-8 with 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 #27
Source File: BufferManagerWriteStream.java    From jdk8u60 with 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);

    try {
       sendFragment(false);
    } catch(SystemException se){
            orb.getPIHandler().invokeClientPIEndingPoint(
                    ReplyMessage.SYSTEM_EXCEPTION, se);
            throw se;
    }

    // Reuse the old buffer

    // REVISIT - need to account for case when needed > available
    // even after fragmenting.  This is the large array case, so
    // the caller should retry when it runs out of space.
    bbwi.position(0);
    bbwi.buflen = bbwi.byteBuffer.limit();
    bbwi.fragmented = true;

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

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

    FragmentMessage header = ((CDROutputObject)outputObject).getMessageHeader().createFragmentMessage();

    header.write(((CDROutputObject)outputObject));
}
 
Example #28
Source File: BufferManagerWriteCollect.java    From jdk8u60 with 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 #29
Source File: BufferManagerWriteStream.java    From JDKSourceCode1.8 with MIT License 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);

    try {
       sendFragment(false);
    } catch(SystemException se){
            orb.getPIHandler().invokeClientPIEndingPoint(
                    ReplyMessage.SYSTEM_EXCEPTION, se);
            throw se;
    }

    // Reuse the old buffer

    // REVISIT - need to account for case when needed > available
    // even after fragmenting.  This is the large array case, so
    // the caller should retry when it runs out of space.
    bbwi.position(0);
    bbwi.buflen = bbwi.byteBuffer.limit();
    bbwi.fragmented = true;

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

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

    FragmentMessage header = ((CDROutputObject)outputObject).getMessageHeader().createFragmentMessage();

    header.write(((CDROutputObject)outputObject));
}
 
Example #30
Source File: BufferManagerWriteCollect.java    From JDKSourceCode1.8 with MIT License 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);
}