当前位置: 首页>>代码示例>>Java>>正文


Java GIOPVersion.VERSION_1_1属性代码示例

本文整理汇总了Java中com.sun.corba.se.spi.ior.iiop.GIOPVersion.VERSION_1_1属性的典型用法代码示例。如果您正苦于以下问题:Java GIOPVersion.VERSION_1_1属性的具体用法?Java GIOPVersion.VERSION_1_1怎么用?Java GIOPVersion.VERSION_1_1使用的例子?那么恭喜您, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在com.sun.corba.se.spi.ior.iiop.GIOPVersion的用法示例。


在下文中一共展示了GIOPVersion.VERSION_1_1属性的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: newOutputStream

public static CDROutputStreamBase newOutputStream(
        ORB orb, GIOPVersion version, byte encodingVersion) {
    switch(version.intValue()) {
        case GIOPVersion.VERSION_1_0:
            return new CDROutputStream_1_0();
        case GIOPVersion.VERSION_1_1:
            return new CDROutputStream_1_1();
    case GIOPVersion.VERSION_1_2:
        if (encodingVersion != Message.CDR_ENC_VERSION) {
            return
                new IDLJavaSerializationOutputStream(encodingVersion);
        }
        return new CDROutputStream_1_2();
    default:
            ORBUtilSystemException wrapper = ORBUtilSystemException.get( orb,
                CORBALogDomains.RPC_ENCODING ) ;
            // REVISIT - what is appropriate?  INTERNAL exceptions
            // are really hard to track later.
            throw wrapper.unsupportedGiopVersion( version ) ;
    }
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:21,代码来源:CDROutputStream.java

示例2: newInputStream

public static CDRInputStreamBase newInputStream(
        ORB orb, GIOPVersion version, byte encodingVersion) {
    switch(version.intValue()) {
        case GIOPVersion.VERSION_1_0:
            return new CDRInputStream_1_0();
        case GIOPVersion.VERSION_1_1:
            return new CDRInputStream_1_1();
        case GIOPVersion.VERSION_1_2:
            if (encodingVersion != Message.CDR_ENC_VERSION) {
                return
                  new IDLJavaSerializationInputStream(encodingVersion);
            }
            return new CDRInputStream_1_2();
            // else fall through and report exception.
        default:
            ORBUtilSystemException wrapper = ORBUtilSystemException.get( orb,
                CORBALogDomains.RPC_ENCODING ) ;
            throw wrapper.unsupportedGiopVersion( version ) ;
    }
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:20,代码来源:CDRInputStream.java

示例3: newBufferManagerRead

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);
    }
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:26,代码来源:BufferManagerFactory.java


注:本文中的com.sun.corba.se.spi.ior.iiop.GIOPVersion.VERSION_1_1属性示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。