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


Java Message类代码示例

本文整理汇总了Java中com.sun.corba.se.impl.protocol.giopmsgheaders.Message的典型用法代码示例。如果您正苦于以下问题:Java Message类的具体用法?Java Message怎么用?Java Message使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


Message类属于com.sun.corba.se.impl.protocol.giopmsgheaders包,在下文中一共展示了Message类的11个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: setWorkThenPoolOrResumeSelect

import com.sun.corba.se.impl.protocol.giopmsgheaders.Message; //导入依赖的package包/类
private void setWorkThenPoolOrResumeSelect(Message header)
{
    if (getConnection().getEventHandler().shouldUseSelectThreadToWait()) {
        resumeSelect(header);
    } else {
        // Leader/Follower when using reader thread.
        // When this thread is done working it will go back in pool.

        isThreadDone = true;

        // First unregister current registration.
        orb.getTransportManager().getSelector(0)
            .unregisterForEvent(getConnection().getEventHandler());
        // Have another thread become the reader.
        orb.getTransportManager().getSelector(0)
            .registerForEvent(getConnection().getEventHandler());
    }
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:19,代码来源:CorbaMessageMediatorImpl.java

示例2: createAppropriateOutputObject

import com.sun.corba.se.impl.protocol.giopmsgheaders.Message; //导入依赖的package包/类
private CDROutputObject createAppropriateOutputObject(
    CorbaMessageMediator messageMediator,
    Message msg, LocateReplyMessage reply)
{
    CDROutputObject outputObject;

    if (msg.getGIOPVersion().lessThan(GIOPVersion.V1_2)) {
        // locate msgs 1.0 & 1.1 :=> grow,
        outputObject = sun.corba.OutputStreamFactory.newCDROutputObject(
                         (ORB) messageMediator.getBroker(),
                         this,
                         GIOPVersion.V1_0,
                         (CorbaConnection) messageMediator.getConnection(),
                         reply,
                         ORBConstants.STREAM_FORMAT_VERSION_1);
    } else {
        // 1.2 :=> stream
        outputObject = sun.corba.OutputStreamFactory.newCDROutputObject(
                         (ORB) messageMediator.getBroker(),
                         messageMediator,
                         reply,
                         ORBConstants.STREAM_FORMAT_VERSION_1);
    }
    return outputObject;
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:26,代码来源:CorbaMessageMediatorImpl.java

示例3: newOutputStream

import com.sun.corba.se.impl.protocol.giopmsgheaders.Message; //导入依赖的package包/类
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,代码行数:22,代码来源:CDROutputStream.java

示例4: EncapsInputStream

import com.sun.corba.se.impl.protocol.giopmsgheaders.Message; //导入依赖的package包/类
/**
 * Full constructor with a CodeBase parameter useful for
 * unmarshaling RMI-IIOP valuetypes (technically against the
 * intention of an encapsulation, but necessary due to OMG
 * issue 4795.  Used by ServiceContexts.
 */
public EncapsInputStream(org.omg.CORBA.ORB orb,
                         byte[] data,
                         int size,
                         GIOPVersion version,
                         CodeBase codeBase) {
    super(orb,
          ByteBuffer.wrap(data),
          size,
          false,
          version, Message.CDR_ENC_VERSION,
          BufferManagerFactory.newBufferManagerRead(
                                  BufferManagerFactory.GROW,
                                  Message.CDR_ENC_VERSION,
                                  (ORB)orb));

    this.codeBase = codeBase;

    performORBVersionSpecificInit();
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:26,代码来源:EncapsInputStream.java

示例5: newInputStream

import com.sun.corba.se.impl.protocol.giopmsgheaders.Message; //导入依赖的package包/类
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,代码行数:21,代码来源:CDRInputStream.java

示例6: CDROutputObject

import com.sun.corba.se.impl.protocol.giopmsgheaders.Message; //导入依赖的package包/类
private CDROutputObject(
    ORB orb, GIOPVersion giopVersion, Message header,
    BufferManagerWrite manager, byte streamFormatVersion,
    CorbaMessageMediator mediator)
{
    super(orb, giopVersion, header.getEncodingVersion(),
          false, manager, streamFormatVersion,
          ((mediator != null && mediator.getConnection() != null) ?
           ((CorbaConnection)mediator.getConnection()).
                 shouldUseDirectByteBuffers() : false));

    this.header = header;
    this.orb = orb;
    this.wrapper = ORBUtilSystemException.get( orb, CORBALogDomains.RPC_ENCODING ) ;
    this.omgWrapper = OMGSystemException.get( orb, CORBALogDomains.RPC_ENCODING ) ;

    getBufferManager().setOutputObject(this);
    this.corbaMessageMediator = mediator;
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:20,代码来源:CDROutputObject.java

示例7: newBufferManagerRead

import com.sun.corba.se.impl.protocol.giopmsgheaders.Message; //导入依赖的package包/类
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,代码行数:27,代码来源:BufferManagerFactory.java

示例8: newBufferManagerWrite

import com.sun.corba.se.impl.protocol.giopmsgheaders.Message; //导入依赖的package包/类
public static BufferManagerWrite newBufferManagerWrite(
        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("newBufferManagerWrite");
        }
        return new BufferManagerWriteGrow(orb);
    }
    switch (strategy) {
        case BufferManagerFactory.GROW:
            return new BufferManagerWriteGrow(orb);
        case BufferManagerFactory.COLLECT:
            return new BufferManagerWriteCollect(orb);
        case BufferManagerFactory.STREAM:
            return new BufferManagerWriteStream(orb);
        default:
            throw new INTERNAL("Unknown buffer manager write strategy: "
                               + strategy);
    }
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:24,代码来源:BufferManagerFactory.java

示例9: CDROutputObject

import com.sun.corba.se.impl.protocol.giopmsgheaders.Message; //导入依赖的package包/类
public CDROutputObject(ORB orb, CorbaMessageMediator mediator,
                       GIOPVersion giopVersion,
                       CorbaConnection connection, Message header,
                       byte streamFormatVersion)
{
    this(
        orb,
        giopVersion,
        header,
        BufferManagerFactory.
        newBufferManagerWrite(giopVersion,
                              header.getEncodingVersion(),
                              orb),
        streamFormatVersion,
        mediator);
    this.connection = connection ;
}
 
开发者ID:JetBrains,项目名称:jdk8u_corba,代码行数:18,代码来源:CDROutputObject.java

示例10: CDROutputObject

import com.sun.corba.se.impl.protocol.giopmsgheaders.Message; //导入依赖的package包/类
public CDROutputObject(ORB orb,
                       MessageMediator messageMediator,
                       Message header,
                       byte streamFormatVersion)
{
    this(
        orb,
        ((CorbaMessageMediator)messageMediator).getGIOPVersion(),
        header,
        BufferManagerFactory.newBufferManagerWrite(
            ((CorbaMessageMediator)messageMediator).getGIOPVersion(),
            header.getEncodingVersion(),
            orb),
        streamFormatVersion,
        (CorbaMessageMediator)messageMediator);
}
 
开发者ID:campolake,项目名称:openjdk9,代码行数:17,代码来源:CDROutputObject.java

示例11: newBufferManagerRead

import com.sun.corba.se.impl.protocol.giopmsgheaders.Message; //导入依赖的package包/类
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);
    }
}
 
开发者ID:campolake,项目名称:openjdk9,代码行数:25,代码来源:BufferManagerFactory.java


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