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


Java IORFactories.makeIOR方法代码示例

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


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

示例1: write_Object

import com.sun.corba.se.spi.ior.IORFactories; //导入方法依赖的package包/类
public void write_Object(org.omg.CORBA.Object ref)
{
    if (ref == null) {
        IOR nullIOR = IORFactories.makeIOR( orb ) ;
        nullIOR.write(parent);
        return;
    }

    // IDL to Java formal 01-06-06 1.21.4.2
    if (ref instanceof org.omg.CORBA.LocalObject)
        throw wrapper.writeLocalObject(CompletionStatus.COMPLETED_MAYBE);

    IOR ior = ORBUtility.connectAndGetIOR( orb, ref ) ;
    ior.write(parent);
    return;
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:17,代码来源:CDROutputStream_1_0.java

示例2: read

import com.sun.corba.se.spi.ior.IORFactories; //导入方法依赖的package包/类
public void read(org.omg.CORBA.portable.InputStream istream) {
    super.read(istream);
    this.service_contexts
        = new ServiceContexts((org.omg.CORBA_2_3.portable.InputStream) istream);
    this.request_id = istream.read_ulong();
    this.reply_status = istream.read_long();
    isValidReplyStatus(this.reply_status); // raises exception on error

    // The code below reads the reply body in some cases
    // SYSTEM_EXCEPTION & LOCATION_FORWARD
    if (this.reply_status == SYSTEM_EXCEPTION) {

        String reposId = istream.read_string();
        this.exClassName = ORBUtility.classNameOf(reposId);
        this.minorCode = istream.read_long();
        int status = istream.read_long();

        switch (status) {
        case CompletionStatus._COMPLETED_YES:
            this.completionStatus = CompletionStatus.COMPLETED_YES;
            break;
        case CompletionStatus._COMPLETED_NO:
            this.completionStatus = CompletionStatus.COMPLETED_NO;
            break;
        case CompletionStatus._COMPLETED_MAYBE:
            this.completionStatus = CompletionStatus.COMPLETED_MAYBE;
            break;
        default:
            throw wrapper.badCompletionStatusInReply(
                CompletionStatus.COMPLETED_MAYBE, new Integer(status) );
        }

    } else if (this.reply_status == USER_EXCEPTION) {
        // do nothing. The client stub will read the exception from body.
    } else if (this.reply_status == LOCATION_FORWARD) {
        CDRInputStream cdr = (CDRInputStream) istream;
        this.ior = IORFactories.makeIOR( cdr ) ;
    }
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:40,代码来源:ReplyMessage_1_0.java

示例3: read

import com.sun.corba.se.spi.ior.IORFactories; //导入方法依赖的package包/类
public void read(org.omg.CORBA.portable.InputStream istream) {
    super.read(istream);
    this.request_id = istream.read_ulong();
    this.locate_status = istream.read_long();
    isValidReplyStatus(this.locate_status); // raises exception on error

    // The code below reads the reply body if status is OBJECT_FORWARD
    if (this.locate_status == OBJECT_FORWARD) {
        CDRInputStream cdr = (CDRInputStream) istream;
        this.ior = IORFactories.makeIOR( cdr ) ;
    }
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:13,代码来源:LocateReplyMessage_1_0.java

示例4: read

import com.sun.corba.se.spi.ior.IORFactories; //导入方法依赖的package包/类
public void read(org.omg.CORBA.portable.InputStream istream) {
    super.read(istream);
    this.request_id = istream.read_ulong();
    this.reply_status = istream.read_long();
    isValidReplyStatus(this.reply_status); // raises exception on error

    // The code below reads the reply body if status is OBJECT_FORWARD
    if (this.reply_status == OBJECT_FORWARD) {
        CDRInputStream cdr = (CDRInputStream) istream;
        this.ior = IORFactories.makeIOR( cdr ) ;
    }
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:13,代码来源:LocateReplyMessage_1_1.java

示例5: read

import com.sun.corba.se.spi.ior.IORFactories; //导入方法依赖的package包/类
public void read(org.omg.CORBA.portable.InputStream istream) {
    super.read(istream);
    this.service_contexts
        = new ServiceContexts((org.omg.CORBA_2_3.portable.InputStream) istream);
    this.request_id = istream.read_ulong();
    this.reply_status = istream.read_long();
    isValidReplyStatus(this.reply_status); // raises exception on error

    // The code below reads the reply body in some cases
    // SYSTEM_EXCEPTION & LOCATION_FORWARD
    if (this.reply_status == SYSTEM_EXCEPTION) {

        String reposId = istream.read_string();
        this.exClassName = ORBUtility.classNameOf(reposId);
        this.minorCode = istream.read_long();
        int status = istream.read_long();

        switch (status) {
        case CompletionStatus._COMPLETED_YES:
            this.completionStatus = CompletionStatus.COMPLETED_YES;
            break;
        case CompletionStatus._COMPLETED_NO:
            this.completionStatus = CompletionStatus.COMPLETED_NO;
            break;
        case CompletionStatus._COMPLETED_MAYBE:
            this.completionStatus = CompletionStatus.COMPLETED_MAYBE;
            break;
        default:
            throw wrapper.badCompletionStatusInReply(
                CompletionStatus.COMPLETED_MAYBE, new Integer(status) );
        }
    } else if (this.reply_status == USER_EXCEPTION) {
        // do nothing. The client stub will read the exception from body.
    } else if (this.reply_status == LOCATION_FORWARD) {
        CDRInputStream cdr = (CDRInputStream) istream;
        this.ior = IORFactories.makeIOR(cdr) ;
    }
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:39,代码来源:ReplyMessage_1_1.java

示例6: write_Object

import com.sun.corba.se.spi.ior.IORFactories; //导入方法依赖的package包/类
public final void write_Object(org.omg.CORBA.Object value) {
    if (value == null) {
        IOR nullIOR = IORFactories.makeIOR(orb);
        nullIOR.write(parent);
        return;
    }
    // IDL to Java formal 01-06-06 1.21.4.2
    if (value instanceof org.omg.CORBA.LocalObject) {
        throw wrapper.writeLocalObject(CompletionStatus.COMPLETED_MAYBE);
    }
    IOR ior = ORBUtility.connectAndGetIOR(orb, value);
    ior.write(parent);
    return;
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:15,代码来源:IDLJavaSerializationOutputStream.java

示例7: object_to_string

import com.sun.corba.se.spi.ior.IORFactories; //导入方法依赖的package包/类
/**
 * Convert an object ref to a string.
 * @param obj The object to stringify.
 * @return A stringified object reference.
 */
public synchronized String object_to_string(org.omg.CORBA.Object obj)
{
    checkShutdownState();

    // Handle the null objref case
    if (obj == null) {
        IOR nullIOR = IORFactories.makeIOR( this ) ;
        return nullIOR.stringify();
    }

    IOR ior = null ;

    try {
        ior = ORBUtility.connectAndGetIOR( this, obj ) ;
    } catch (BAD_PARAM bp) {
        // Throw MARSHAL instead if this is a LOCAL_OBJECT_NOT_ALLOWED error.
        if (bp.minor == ORBUtilSystemException.LOCAL_OBJECT_NOT_ALLOWED) {
            throw omgWrapper.notAnObjectImpl( bp ) ;
        } else
            // Not a local object problem: just rethrow the exception.
            // Do not wrap and log this, since it was already logged at its
            // point of origin.
            throw bp ;
    }

    return ior.stringify() ;
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:33,代码来源:ORBImpl.java

示例8: read

import com.sun.corba.se.spi.ior.IORFactories; //导入方法依赖的package包/类
public void read(org.omg.CORBA.portable.InputStream istream) {
    super.read(istream);
    this.request_id = istream.read_ulong();
    this.reply_status = istream.read_long();
    isValidReplyStatus(this.reply_status); // raises exception on error

    // GIOP 1.2 LocateReply message bodies are not aligned on
    // 8 byte boundaries.

    // The code below reads the reply body in some cases
    // LOC_SYSTEM_EXCEPTION & OBJECT_FORWARD & OBJECT_FORWARD_PERM &
    // LOC_NEEDS_ADDRESSING_MODE
    if (this.reply_status == LOC_SYSTEM_EXCEPTION) {

        String reposId = istream.read_string();
        this.exClassName = ORBUtility.classNameOf(reposId);
        this.minorCode = istream.read_long();
        int status = istream.read_long();

        switch (status) {
        case CompletionStatus._COMPLETED_YES:
            this.completionStatus = CompletionStatus.COMPLETED_YES;
            break;
        case CompletionStatus._COMPLETED_NO:
            this.completionStatus = CompletionStatus.COMPLETED_NO;
            break;
        case CompletionStatus._COMPLETED_MAYBE:
            this.completionStatus = CompletionStatus.COMPLETED_MAYBE;
            break;
        default:
            throw wrapper.badCompletionStatusInLocateReply(
                CompletionStatus.COMPLETED_MAYBE, new Integer(status) );
        }
    } else if ( (this.reply_status == OBJECT_FORWARD) ||
            (this.reply_status == OBJECT_FORWARD_PERM) ){
        CDRInputStream cdr = (CDRInputStream) istream;
        this.ior = IORFactories.makeIOR( cdr ) ;
    }  else if (this.reply_status == LOC_NEEDS_ADDRESSING_MODE) {
        // read GIOP::AddressingDisposition from body and resend the
        // original request using the requested addressing mode. The
        // resending is transparent to the caller.
        this.addrDisposition = AddressingDispositionHelper.read(istream);
    }
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:45,代码来源:LocateReplyMessage_1_2.java

示例9: read

import com.sun.corba.se.spi.ior.IORFactories; //导入方法依赖的package包/类
public void read(org.omg.CORBA.portable.InputStream istream) {
    super.read(istream);
    this.request_id = istream.read_ulong();
    this.reply_status = istream.read_long();
    isValidReplyStatus(this.reply_status); // raises exception on error
    this.service_contexts
        = new ServiceContexts((org.omg.CORBA_2_3.portable.InputStream) istream);

    // CORBA formal 00-11-0 15.4.2.2 GIOP 1.2 body must be
    // aligned on an 8 octet boundary.
    // Ensures that the first read operation called from the stub code,
    // during body deconstruction, would skip the header padding, that was
    // inserted to ensure that the body was aligned on an 8-octet boundary.
    ((CDRInputStream)istream).setHeaderPadding(true);

    // The code below reads the reply body in some cases
    // SYSTEM_EXCEPTION & LOCATION_FORWARD & LOCATION_FORWARD_PERM &
    // NEEDS_ADDRESSING_MODE
    if (this.reply_status == SYSTEM_EXCEPTION) {

        String reposId = istream.read_string();
        this.exClassName = ORBUtility.classNameOf(reposId);
        this.minorCode = istream.read_long();
        int status = istream.read_long();

        switch (status) {
        case CompletionStatus._COMPLETED_YES:
            this.completionStatus = CompletionStatus.COMPLETED_YES;
            break;
        case CompletionStatus._COMPLETED_NO:
            this.completionStatus = CompletionStatus.COMPLETED_NO;
            break;
        case CompletionStatus._COMPLETED_MAYBE:
            this.completionStatus = CompletionStatus.COMPLETED_MAYBE;
            break;
        default:
            throw wrapper.badCompletionStatusInReply(
                CompletionStatus.COMPLETED_MAYBE, new Integer(status) );
        }

    } else if (this.reply_status == USER_EXCEPTION) {
        // do nothing. The client stub will read the exception from body.
    } else if ( (this.reply_status == LOCATION_FORWARD) ||
            (this.reply_status == LOCATION_FORWARD_PERM) ){
        CDRInputStream cdr = (CDRInputStream) istream;
        this.ior = IORFactories.makeIOR( cdr ) ;
    }  else if (this.reply_status == NEEDS_ADDRESSING_MODE) {
        // read GIOP::AddressingDisposition from body and resend the
        // original request using the requested addressing mode. The
        // resending is transparent to the client program.
        this.addrDisposition = AddressingDispositionHelper.read(istream);
    }
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:54,代码来源:ReplyMessage_1_2.java

示例10: read_Object

import com.sun.corba.se.spi.ior.IORFactories; //导入方法依赖的package包/类
public org.omg.CORBA.Object read_Object(java.lang.Class clz) {

        // In any case, we must first read the IOR.
        IOR ior = IORFactories.makeIOR(parent) ;
        if (ior.isNil()) {
            return null;
        }

        PresentationManager.StubFactoryFactory sff =
            ORB.getStubFactoryFactory();
        String codeBase = ior.getProfile().getCodebase();
        PresentationManager.StubFactory stubFactory = null;

        if (clz == null) {
            RepositoryId rid = RepositoryId.cache.getId(ior.getTypeId() );
            String className = rid.getClassName();
            boolean isIDLInterface = rid.isIDLType();

            if (className == null || className.equals( "" )) {
                stubFactory = null;
            } else {
                try {
                    stubFactory = sff.createStubFactory(className,
                        isIDLInterface, codeBase, (Class) null,
                        (ClassLoader) null);
                } catch (Exception exc) {
                    // Could not create stubFactory, so use null.
                    // XXX stubFactory handling is still too complex:
                    // Can we resolve the stubFactory question once in
                    // a single place?
                    stubFactory = null ;
                }
            }
        } else if (StubAdapter.isStubClass(clz)) {
            stubFactory = PresentationDefaults.makeStaticStubFactory(clz);
        } else {
            // clz is an interface class
            boolean isIDL = IDLEntity.class.isAssignableFrom(clz);

            stubFactory = sff.createStubFactory(
                 clz.getName(), isIDL, codeBase, clz, clz.getClassLoader());
        }

        return CDRInputStream_1_0.internalIORToObject(ior, stubFactory, orb);
    }
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:46,代码来源:IDLJavaSerializationInputStream.java

示例11: read_Object

import com.sun.corba.se.spi.ior.IORFactories; //导入方法依赖的package包/类
public org.omg.CORBA.Object read_Object(Class clz)
{
    // In any case, we must first read the IOR.
    IOR ior = IORFactories.makeIOR(parent) ;
    if (ior.isNil())
        return null ;

    PresentationManager.StubFactoryFactory sff = ORB.getStubFactoryFactory() ;
    String codeBase = ior.getProfile().getCodebase() ;
    PresentationManager.StubFactory stubFactory = null ;

    if (clz == null) {
        RepositoryId rid = RepositoryId.cache.getId( ior.getTypeId() ) ;
        String className = rid.getClassName() ;
        boolean isIDLInterface = rid.isIDLType() ;

        if (className == null || className.equals( "" ))
            stubFactory = null ;
        else
            try {
                stubFactory = sff.createStubFactory( className,
                    isIDLInterface, codeBase, (Class)null,
                    (ClassLoader)null );
            } catch (Exception exc) {
                // Could not create stubFactory, so use null.
                // XXX stubFactory handling is still too complex:
                // Can we resolve the stubFactory question once in
                // a single place?
                stubFactory = null ;
            }
    } else if (StubAdapter.isStubClass( clz )) {
        stubFactory = PresentationDefaults.makeStaticStubFactory(
            clz ) ;
    } else {
        // clz is an interface class
        boolean isIDL = IDLEntity.class.isAssignableFrom( clz ) ;

        stubFactory = sff.createStubFactory( clz.getName(),
            isIDL, codeBase, clz, clz.getClassLoader() ) ;
    }

    return internalIORToObject( ior, stubFactory, orb ) ;
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:44,代码来源:CDRInputStream_1_0.java


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