com.sun.corba.se.impl.encoding.BufferManagerRead Java Examples

The following examples show how to use com.sun.corba.se.impl.encoding.BufferManagerRead. 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: BufferManagerFactory.java    From jdk1.8-source-analysis with Apache License 2.0 6 votes vote down vote up
public static BufferManagerRead newBufferManagerRead(
        int strategy, byte encodingVersion, ORB orb) {

    if (encodingVersion != Message.CDR_ENC_VERSION) {
        if (strategy != BufferManagerFactory.GROW) {
            ORBUtilSystemException wrapper =
                ORBUtilSystemException.get((ORB)orb,
                                           CORBALogDomains.RPC_ENCODING);
            throw wrapper.invalidBuffMgrStrategy("newBufferManagerRead");
        }
        return new BufferManagerReadGrow(orb);
    }
    switch (strategy) {
        case BufferManagerFactory.GROW:
            return new BufferManagerReadGrow(orb);
        case BufferManagerFactory.COLLECT:
            throw new INTERNAL("Collect strategy invalid for reading");
        case BufferManagerFactory.STREAM:
            return new BufferManagerReadStream(orb);
        default:
            throw new INTERNAL("Unknown buffer manager read strategy: "
                               + strategy);
    }
}
 
Example #2
Source File: BufferManagerFactory.java    From openjdk-8 with GNU General Public License v2.0 6 votes vote down vote up
public static BufferManagerRead newBufferManagerRead(
        int strategy, byte encodingVersion, ORB orb) {

    if (encodingVersion != Message.CDR_ENC_VERSION) {
        if (strategy != BufferManagerFactory.GROW) {
            ORBUtilSystemException wrapper =
                ORBUtilSystemException.get((ORB)orb,
                                           CORBALogDomains.RPC_ENCODING);
            throw wrapper.invalidBuffMgrStrategy("newBufferManagerRead");
        }
        return new BufferManagerReadGrow(orb);
    }
    switch (strategy) {
        case BufferManagerFactory.GROW:
            return new BufferManagerReadGrow(orb);
        case BufferManagerFactory.COLLECT:
            throw new INTERNAL("Collect strategy invalid for reading");
        case BufferManagerFactory.STREAM:
            return new BufferManagerReadStream(orb);
        default:
            throw new INTERNAL("Unknown buffer manager read strategy: "
                               + strategy);
    }
}
 
Example #3
Source File: BufferManagerFactory.java    From openjdk-8 with GNU General Public License v2.0 6 votes vote down vote up
public static BufferManagerRead newBufferManagerRead(
        GIOPVersion version, byte encodingVersion, ORB orb) {

    // REVISIT - On the reading side, shouldn't we monitor the incoming
    // fragments on a given connection to determine what fragment size
    // they're using, then use that ourselves?

    if (encodingVersion != Message.CDR_ENC_VERSION) {
        return new BufferManagerReadGrow(orb);
    }

    switch (version.intValue())
    {
        case GIOPVersion.VERSION_1_0:
            return new BufferManagerReadGrow(orb);
        case GIOPVersion.VERSION_1_1:
        case GIOPVersion.VERSION_1_2:
            // The stream reader can handle fragmented and
            // non fragmented messages
            return new BufferManagerReadStream(orb);
        default:
            // REVISIT - what is appropriate?
            throw new INTERNAL("Unknown GIOP version: "
                               + version);
    }
}
 
Example #4
Source File: BufferManagerFactory.java    From openjdk-8-source with GNU General Public License v2.0 6 votes vote down vote up
public static BufferManagerRead newBufferManagerRead(
        int strategy, byte encodingVersion, ORB orb) {

    if (encodingVersion != Message.CDR_ENC_VERSION) {
        if (strategy != BufferManagerFactory.GROW) {
            ORBUtilSystemException wrapper =
                ORBUtilSystemException.get((ORB)orb,
                                           CORBALogDomains.RPC_ENCODING);
            throw wrapper.invalidBuffMgrStrategy("newBufferManagerRead");
        }
        return new BufferManagerReadGrow(orb);
    }
    switch (strategy) {
        case BufferManagerFactory.GROW:
            return new BufferManagerReadGrow(orb);
        case BufferManagerFactory.COLLECT:
            throw new INTERNAL("Collect strategy invalid for reading");
        case BufferManagerFactory.STREAM:
            return new BufferManagerReadStream(orb);
        default:
            throw new INTERNAL("Unknown buffer manager read strategy: "
                               + strategy);
    }
}
 
Example #5
Source File: BufferManagerFactory.java    From openjdk-8-source with GNU General Public License v2.0 6 votes vote down vote up
public static BufferManagerRead newBufferManagerRead(
        GIOPVersion version, byte encodingVersion, ORB orb) {

    // REVISIT - On the reading side, shouldn't we monitor the incoming
    // fragments on a given connection to determine what fragment size
    // they're using, then use that ourselves?

    if (encodingVersion != Message.CDR_ENC_VERSION) {
        return new BufferManagerReadGrow(orb);
    }

    switch (version.intValue())
    {
        case GIOPVersion.VERSION_1_0:
            return new BufferManagerReadGrow(orb);
        case GIOPVersion.VERSION_1_1:
        case GIOPVersion.VERSION_1_2:
            // The stream reader can handle fragmented and
            // non fragmented messages
            return new BufferManagerReadStream(orb);
        default:
            // REVISIT - what is appropriate?
            throw new INTERNAL("Unknown GIOP version: "
                               + version);
    }
}
 
Example #6
Source File: BufferManagerFactory.java    From hottub with GNU General Public License v2.0 6 votes vote down vote up
public static BufferManagerRead newBufferManagerRead(
        int strategy, byte encodingVersion, ORB orb) {

    if (encodingVersion != Message.CDR_ENC_VERSION) {
        if (strategy != BufferManagerFactory.GROW) {
            ORBUtilSystemException wrapper =
                ORBUtilSystemException.get((ORB)orb,
                                           CORBALogDomains.RPC_ENCODING);
            throw wrapper.invalidBuffMgrStrategy("newBufferManagerRead");
        }
        return new BufferManagerReadGrow(orb);
    }
    switch (strategy) {
        case BufferManagerFactory.GROW:
            return new BufferManagerReadGrow(orb);
        case BufferManagerFactory.COLLECT:
            throw new INTERNAL("Collect strategy invalid for reading");
        case BufferManagerFactory.STREAM:
            return new BufferManagerReadStream(orb);
        default:
            throw new INTERNAL("Unknown buffer manager read strategy: "
                               + strategy);
    }
}
 
Example #7
Source File: BufferManagerFactory.java    From hottub with GNU General Public License v2.0 6 votes vote down vote up
public static BufferManagerRead newBufferManagerRead(
        GIOPVersion version, byte encodingVersion, ORB orb) {

    // REVISIT - On the reading side, shouldn't we monitor the incoming
    // fragments on a given connection to determine what fragment size
    // they're using, then use that ourselves?

    if (encodingVersion != Message.CDR_ENC_VERSION) {
        return new BufferManagerReadGrow(orb);
    }

    switch (version.intValue())
    {
        case GIOPVersion.VERSION_1_0:
            return new BufferManagerReadGrow(orb);
        case GIOPVersion.VERSION_1_1:
        case GIOPVersion.VERSION_1_2:
            // The stream reader can handle fragmented and
            // non fragmented messages
            return new BufferManagerReadStream(orb);
        default:
            // REVISIT - what is appropriate?
            throw new INTERNAL("Unknown GIOP version: "
                               + version);
    }
}
 
Example #8
Source File: BufferManagerFactory.java    From openjdk-jdk9 with GNU General Public License v2.0 6 votes vote down vote up
public static BufferManagerRead newBufferManagerRead(
        int strategy, byte encodingVersion, ORB orb) {

    if (encodingVersion != Message.CDR_ENC_VERSION) {
        if (strategy != BufferManagerFactory.GROW) {
            ORBUtilSystemException wrapper =
                ORBUtilSystemException.get((ORB)orb,
                                           CORBALogDomains.RPC_ENCODING);
            throw wrapper.invalidBuffMgrStrategy("newBufferManagerRead");
        }
        return new BufferManagerReadGrow(orb);
    }
    switch (strategy) {
        case BufferManagerFactory.GROW:
            return new BufferManagerReadGrow(orb);
        case BufferManagerFactory.COLLECT:
            throw new INTERNAL("Collect strategy invalid for reading");
        case BufferManagerFactory.STREAM:
            return new BufferManagerReadStream(orb);
        default:
            throw new INTERNAL("Unknown buffer manager read strategy: "
                               + strategy);
    }
}
 
Example #9
Source File: BufferManagerFactory.java    From openjdk-jdk9 with GNU General Public License v2.0 6 votes vote down vote up
public static BufferManagerRead newBufferManagerRead(
        GIOPVersion version, byte encodingVersion, ORB orb) {

    // REVISIT - On the reading side, shouldn't we monitor the incoming
    // fragments on a given connection to determine what fragment size
    // they're using, then use that ourselves?

    if (encodingVersion != Message.CDR_ENC_VERSION) {
        return new BufferManagerReadGrow(orb);
    }

    switch (version.intValue())
    {
        case GIOPVersion.VERSION_1_0:
            return new BufferManagerReadGrow(orb);
        case GIOPVersion.VERSION_1_1:
        case GIOPVersion.VERSION_1_2:
            // The stream reader can handle fragmented and
            // non fragmented messages
            return new BufferManagerReadStream(orb);
        default:
            // REVISIT - what is appropriate?
            throw new INTERNAL("Unknown GIOP version: "
                               + version);
    }
}
 
Example #10
Source File: BufferManagerFactory.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 6 votes vote down vote up
public static BufferManagerRead newBufferManagerRead(
        int strategy, byte encodingVersion, ORB orb) {

    if (encodingVersion != Message.CDR_ENC_VERSION) {
        if (strategy != BufferManagerFactory.GROW) {
            ORBUtilSystemException wrapper =
                ORBUtilSystemException.get((ORB)orb,
                                           CORBALogDomains.RPC_ENCODING);
            throw wrapper.invalidBuffMgrStrategy("newBufferManagerRead");
        }
        return new BufferManagerReadGrow(orb);
    }
    switch (strategy) {
        case BufferManagerFactory.GROW:
            return new BufferManagerReadGrow(orb);
        case BufferManagerFactory.COLLECT:
            throw new INTERNAL("Collect strategy invalid for reading");
        case BufferManagerFactory.STREAM:
            return new BufferManagerReadStream(orb);
        default:
            throw new INTERNAL("Unknown buffer manager read strategy: "
                               + strategy);
    }
}
 
Example #11
Source File: BufferManagerFactory.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 6 votes vote down vote up
public static BufferManagerRead newBufferManagerRead(
        GIOPVersion version, byte encodingVersion, ORB orb) {

    // REVISIT - On the reading side, shouldn't we monitor the incoming
    // fragments on a given connection to determine what fragment size
    // they're using, then use that ourselves?

    if (encodingVersion != Message.CDR_ENC_VERSION) {
        return new BufferManagerReadGrow(orb);
    }

    switch (version.intValue())
    {
        case GIOPVersion.VERSION_1_0:
            return new BufferManagerReadGrow(orb);
        case GIOPVersion.VERSION_1_1:
        case GIOPVersion.VERSION_1_2:
            // The stream reader can handle fragmented and
            // non fragmented messages
            return new BufferManagerReadStream(orb);
        default:
            // REVISIT - what is appropriate?
            throw new INTERNAL("Unknown GIOP version: "
                               + version);
    }
}
 
Example #12
Source File: BufferManagerFactory.java    From openjdk-jdk8u with GNU General Public License v2.0 6 votes vote down vote up
public static BufferManagerRead newBufferManagerRead(
        int strategy, byte encodingVersion, ORB orb) {

    if (encodingVersion != Message.CDR_ENC_VERSION) {
        if (strategy != BufferManagerFactory.GROW) {
            ORBUtilSystemException wrapper =
                ORBUtilSystemException.get((ORB)orb,
                                           CORBALogDomains.RPC_ENCODING);
            throw wrapper.invalidBuffMgrStrategy("newBufferManagerRead");
        }
        return new BufferManagerReadGrow(orb);
    }
    switch (strategy) {
        case BufferManagerFactory.GROW:
            return new BufferManagerReadGrow(orb);
        case BufferManagerFactory.COLLECT:
            throw new INTERNAL("Collect strategy invalid for reading");
        case BufferManagerFactory.STREAM:
            return new BufferManagerReadStream(orb);
        default:
            throw new INTERNAL("Unknown buffer manager read strategy: "
                               + strategy);
    }
}
 
Example #13
Source File: BufferManagerFactory.java    From openjdk-jdk8u with GNU General Public License v2.0 6 votes vote down vote up
public static BufferManagerRead newBufferManagerRead(
        GIOPVersion version, byte encodingVersion, ORB orb) {

    // REVISIT - On the reading side, shouldn't we monitor the incoming
    // fragments on a given connection to determine what fragment size
    // they're using, then use that ourselves?

    if (encodingVersion != Message.CDR_ENC_VERSION) {
        return new BufferManagerReadGrow(orb);
    }

    switch (version.intValue())
    {
        case GIOPVersion.VERSION_1_0:
            return new BufferManagerReadGrow(orb);
        case GIOPVersion.VERSION_1_1:
        case GIOPVersion.VERSION_1_2:
            // The stream reader can handle fragmented and
            // non fragmented messages
            return new BufferManagerReadStream(orb);
        default:
            // REVISIT - what is appropriate?
            throw new INTERNAL("Unknown GIOP version: "
                               + version);
    }
}
 
Example #14
Source File: BufferManagerFactory.java    From jdk1.8-source-analysis with Apache License 2.0 6 votes vote down vote up
public static BufferManagerRead newBufferManagerRead(
        GIOPVersion version, byte encodingVersion, ORB orb) {

    // REVISIT - On the reading side, shouldn't we monitor the incoming
    // fragments on a given connection to determine what fragment size
    // they're using, then use that ourselves?

    if (encodingVersion != Message.CDR_ENC_VERSION) {
        return new BufferManagerReadGrow(orb);
    }

    switch (version.intValue())
    {
        case GIOPVersion.VERSION_1_0:
            return new BufferManagerReadGrow(orb);
        case GIOPVersion.VERSION_1_1:
        case GIOPVersion.VERSION_1_2:
            // The stream reader can handle fragmented and
            // non fragmented messages
            return new BufferManagerReadStream(orb);
        default:
            // REVISIT - what is appropriate?
            throw new INTERNAL("Unknown GIOP version: "
                               + version);
    }
}
 
Example #15
Source File: BufferManagerFactory.java    From JDKSourceCode1.8 with MIT License 6 votes vote down vote up
public static BufferManagerRead newBufferManagerRead(
        int strategy, byte encodingVersion, ORB orb) {

    if (encodingVersion != Message.CDR_ENC_VERSION) {
        if (strategy != BufferManagerFactory.GROW) {
            ORBUtilSystemException wrapper =
                ORBUtilSystemException.get((ORB)orb,
                                           CORBALogDomains.RPC_ENCODING);
            throw wrapper.invalidBuffMgrStrategy("newBufferManagerRead");
        }
        return new BufferManagerReadGrow(orb);
    }
    switch (strategy) {
        case BufferManagerFactory.GROW:
            return new BufferManagerReadGrow(orb);
        case BufferManagerFactory.COLLECT:
            throw new INTERNAL("Collect strategy invalid for reading");
        case BufferManagerFactory.STREAM:
            return new BufferManagerReadStream(orb);
        default:
            throw new INTERNAL("Unknown buffer manager read strategy: "
                               + strategy);
    }
}
 
Example #16
Source File: BufferManagerFactory.java    From JDKSourceCode1.8 with MIT License 6 votes vote down vote up
public static BufferManagerRead newBufferManagerRead(
        GIOPVersion version, byte encodingVersion, ORB orb) {

    // REVISIT - On the reading side, shouldn't we monitor the incoming
    // fragments on a given connection to determine what fragment size
    // they're using, then use that ourselves?

    if (encodingVersion != Message.CDR_ENC_VERSION) {
        return new BufferManagerReadGrow(orb);
    }

    switch (version.intValue())
    {
        case GIOPVersion.VERSION_1_0:
            return new BufferManagerReadGrow(orb);
        case GIOPVersion.VERSION_1_1:
        case GIOPVersion.VERSION_1_2:
            // The stream reader can handle fragmented and
            // non fragmented messages
            return new BufferManagerReadStream(orb);
        default:
            // REVISIT - what is appropriate?
            throw new INTERNAL("Unknown GIOP version: "
                               + version);
    }
}
 
Example #17
Source File: BufferManagerFactory.java    From jdk8u60 with GNU General Public License v2.0 6 votes vote down vote up
public static BufferManagerRead newBufferManagerRead(
        int strategy, byte encodingVersion, ORB orb) {

    if (encodingVersion != Message.CDR_ENC_VERSION) {
        if (strategy != BufferManagerFactory.GROW) {
            ORBUtilSystemException wrapper =
                ORBUtilSystemException.get((ORB)orb,
                                           CORBALogDomains.RPC_ENCODING);
            throw wrapper.invalidBuffMgrStrategy("newBufferManagerRead");
        }
        return new BufferManagerReadGrow(orb);
    }
    switch (strategy) {
        case BufferManagerFactory.GROW:
            return new BufferManagerReadGrow(orb);
        case BufferManagerFactory.COLLECT:
            throw new INTERNAL("Collect strategy invalid for reading");
        case BufferManagerFactory.STREAM:
            return new BufferManagerReadStream(orb);
        default:
            throw new INTERNAL("Unknown buffer manager read strategy: "
                               + strategy);
    }
}
 
Example #18
Source File: BufferManagerFactory.java    From TencentKona-8 with GNU General Public License v2.0 6 votes vote down vote up
public static BufferManagerRead newBufferManagerRead(
        GIOPVersion version, byte encodingVersion, ORB orb) {

    // REVISIT - On the reading side, shouldn't we monitor the incoming
    // fragments on a given connection to determine what fragment size
    // they're using, then use that ourselves?

    if (encodingVersion != Message.CDR_ENC_VERSION) {
        return new BufferManagerReadGrow(orb);
    }

    switch (version.intValue())
    {
        case GIOPVersion.VERSION_1_0:
            return new BufferManagerReadGrow(orb);
        case GIOPVersion.VERSION_1_1:
        case GIOPVersion.VERSION_1_2:
            // The stream reader can handle fragmented and
            // non fragmented messages
            return new BufferManagerReadStream(orb);
        default:
            // REVISIT - what is appropriate?
            throw new INTERNAL("Unknown GIOP version: "
                               + version);
    }
}
 
Example #19
Source File: BufferManagerFactory.java    From jdk8u60 with GNU General Public License v2.0 6 votes vote down vote up
public static BufferManagerRead newBufferManagerRead(
        GIOPVersion version, byte encodingVersion, ORB orb) {

    // REVISIT - On the reading side, shouldn't we monitor the incoming
    // fragments on a given connection to determine what fragment size
    // they're using, then use that ourselves?

    if (encodingVersion != Message.CDR_ENC_VERSION) {
        return new BufferManagerReadGrow(orb);
    }

    switch (version.intValue())
    {
        case GIOPVersion.VERSION_1_0:
            return new BufferManagerReadGrow(orb);
        case GIOPVersion.VERSION_1_1:
        case GIOPVersion.VERSION_1_2:
            // The stream reader can handle fragmented and
            // non fragmented messages
            return new BufferManagerReadStream(orb);
        default:
            // REVISIT - what is appropriate?
            throw new INTERNAL("Unknown GIOP version: "
                               + version);
    }
}
 
Example #20
Source File: BufferManagerFactory.java    From TencentKona-8 with GNU General Public License v2.0 6 votes vote down vote up
public static BufferManagerRead newBufferManagerRead(
        int strategy, byte encodingVersion, ORB orb) {

    if (encodingVersion != Message.CDR_ENC_VERSION) {
        if (strategy != BufferManagerFactory.GROW) {
            ORBUtilSystemException wrapper =
                ORBUtilSystemException.get((ORB)orb,
                                           CORBALogDomains.RPC_ENCODING);
            throw wrapper.invalidBuffMgrStrategy("newBufferManagerRead");
        }
        return new BufferManagerReadGrow(orb);
    }
    switch (strategy) {
        case BufferManagerFactory.GROW:
            return new BufferManagerReadGrow(orb);
        case BufferManagerFactory.COLLECT:
            throw new INTERNAL("Collect strategy invalid for reading");
        case BufferManagerFactory.STREAM:
            return new BufferManagerReadStream(orb);
        default:
            throw new INTERNAL("Unknown buffer manager read strategy: "
                               + strategy);
    }
}
 
Example #21
Source File: BufferManagerFactory.java    From openjdk-8 with GNU General Public License v2.0 4 votes vote down vote up
public static BufferManagerRead defaultBufferManagerRead(ORB orb) {
    return new BufferManagerReadGrow(orb);
}
 
Example #22
Source File: BufferManagerFactory.java    From jdk1.8-source-analysis with Apache License 2.0 4 votes vote down vote up
public static BufferManagerRead defaultBufferManagerRead(ORB orb) {
    return new BufferManagerReadGrow(orb);
}
 
Example #23
Source File: BufferManagerFactory.java    From openjdk-8-source with GNU General Public License v2.0 4 votes vote down vote up
public static BufferManagerRead defaultBufferManagerRead(ORB orb) {
    return new BufferManagerReadGrow(orb);
}
 
Example #24
Source File: BufferManagerFactory.java    From hottub with GNU General Public License v2.0 4 votes vote down vote up
public static BufferManagerRead defaultBufferManagerRead(ORB orb) {
    return new BufferManagerReadGrow(orb);
}
 
Example #25
Source File: BufferManagerFactory.java    From TencentKona-8 with GNU General Public License v2.0 4 votes vote down vote up
public static BufferManagerRead defaultBufferManagerRead(ORB orb) {
    return new BufferManagerReadGrow(orb);
}
 
Example #26
Source File: BufferManagerFactory.java    From openjdk-jdk9 with GNU General Public License v2.0 4 votes vote down vote up
public static BufferManagerRead defaultBufferManagerRead(ORB orb) {
    return new BufferManagerReadGrow(orb);
}
 
Example #27
Source File: BufferManagerFactory.java    From jdk8u60 with GNU General Public License v2.0 4 votes vote down vote up
public static BufferManagerRead defaultBufferManagerRead(ORB orb) {
    return new BufferManagerReadGrow(orb);
}
 
Example #28
Source File: BufferManagerFactory.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 4 votes vote down vote up
public static BufferManagerRead defaultBufferManagerRead(ORB orb) {
    return new BufferManagerReadGrow(orb);
}
 
Example #29
Source File: BufferManagerFactory.java    From openjdk-jdk8u with GNU General Public License v2.0 4 votes vote down vote up
public static BufferManagerRead defaultBufferManagerRead(ORB orb) {
    return new BufferManagerReadGrow(orb);
}
 
Example #30
Source File: BufferManagerFactory.java    From JDKSourceCode1.8 with MIT License 4 votes vote down vote up
public static BufferManagerRead defaultBufferManagerRead(ORB orb) {
    return new BufferManagerReadGrow(orb);
}