• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

Java RepositoryId类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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

示例1: readResolve

import com.sun.corba.se.impl.util.RepositoryId; //导入依赖的package包/类
public Object readResolve()
{
    String repositoryId = ior.getRepositoryId() ;
    String cname = RepositoryId.cache.getId( repositoryId ).getClassName() ;

    Class cls = null ;

    try {
        cls = JDKBridge.loadClass( cname, null, null ) ;
    } catch (ClassNotFoundException exc) {
        // XXX log this
    }

    PresentationManager pm =
        com.sun.corba.se.spi.orb.ORB.getPresentationManager() ;
    PresentationManager.ClassData classData = pm.getClassData( cls ) ;
    InvocationHandlerFactoryImpl ihfactory =
        (InvocationHandlerFactoryImpl)classData.getInvocationHandlerFactory() ;
    return ihfactory.getInvocationHandler( this ) ;
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:21,代码来源:DynamicStubImpl.java


示例2: getSignature

import com.sun.corba.se.impl.util.RepositoryId; //导入依赖的package包/类
public static String getSignature(ValueMember member)
    throws ClassNotFoundException {

    // REVISIT.  Can the type be something that is
    // non-primitive yet not a value_box, value, or objref?
    // If so, should use ObjectStreamClass or throw
    // exception.

    if (member.type.kind().value() == TCKind._tk_value_box ||
        member.type.kind().value() == TCKind._tk_value ||
        member.type.kind().value() == TCKind._tk_objref) {
        Class c = RepositoryId.cache.getId(member.id).getClassFromType();
        return ObjectStreamClass.getSignature(c);

    } else {

        return primitiveConstants[member.type.kind().value()];
    }

}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:21,代码来源:ValueUtility.java


示例3: computeRMIIIOPOptionalDataRepId

import com.sun.corba.se.impl.util.RepositoryId; //导入依赖的package包/类
/**
 * Java to IDL ptc-02-01-12 1.5.1
 *
 * "The rep_id string passed to the start_value method must be
 * 'RMI:org.omg.custom.class:hashcode:suid' where class is the
 * fully-qualified name of the class whose writeObject method
 * is being invoked and hashcode and suid are the class's hashcode
 * and SUID."
 */
private String computeRMIIIOPOptionalDataRepId() {

    StringBuffer sbuf = new StringBuffer("RMI:org.omg.custom.");
    sbuf.append(RepositoryId.convertToISOLatin1(this.getName()));
    sbuf.append(':');
    sbuf.append(this.getActualSerialVersionUIDStr());
    sbuf.append(':');
    sbuf.append(this.getSerialVersionUIDStr());

    return sbuf.toString();
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:21,代码来源:ObjectStreamClass.java


示例4: useFullValueDescription

import com.sun.corba.se.impl.util.RepositoryId; //导入依赖的package包/类
/**
*  Returns a boolean of whether or not RepositoryId indicates
*  FullValueDescriptor.
*  used for backward compatability
*/

public boolean useFullValueDescription(Class clazz, String repositoryID)
   throws IOException
{
   return RepositoryId.useFullValueDescription(clazz, repositoryID);
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:12,代码来源:ValueHandlerImpl.java


示例5: getBoxedRepositoryID

import com.sun.corba.se.impl.util.RepositoryId; //导入依赖的package包/类
/**
 * Return the repository ID for this "boxed" type.
 */
public String getBoxedRepositoryID() {
    return RepositoryId.createForJavaType(ourClass);
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:7,代码来源:Type.java


示例6: narrow

import com.sun.corba.se.impl.util.RepositoryId; //导入依赖的package包/类
/**
 * Checks to ensure that an object of a remote or abstract interface type
 * can be cast to a desired type.
 * @param narrowFrom the object to check.
 * @param narrowTo the desired type.
 * @return an object which can be cast to the desired type.
 * @throws ClassCastException if narrowFrom cannot be cast to narrowTo.
 */
public java.lang.Object narrow ( java.lang.Object narrowFrom,
    java.lang.Class narrowTo) throws ClassCastException
{
    java.lang.Object result = null;

    if (narrowFrom == null)
        return null;

    if (narrowTo == null)
        throw new NullPointerException("invalid argument");

    try {
        if (narrowTo.isAssignableFrom(narrowFrom.getClass()))
            return narrowFrom;

        // Is narrowTo an interface that might be
        // implemented by a servant running on iiop?
        if (narrowTo.isInterface() &&
            narrowTo != java.io.Serializable.class &&
            narrowTo != java.io.Externalizable.class) {

            org.omg.CORBA.Object narrowObj
                = (org.omg.CORBA.Object) narrowFrom;

            // Create an id from the narrowTo type...
            String id = RepositoryId.createForAnyType(narrowTo);

            if (narrowObj._is_a(id)) {
                return Utility.loadStub(narrowObj,narrowTo);
            } else {
                throw new ClassCastException( "Object is not of remote type " +
                    narrowTo.getName() ) ;
            }
        } else {
            throw new ClassCastException( "Class " + narrowTo.getName() +
                " is not a valid remote interface" ) ;
        }
    } catch(Exception error) {
        ClassCastException cce = new ClassCastException() ;
        cce.initCause( error ) ;
        throw cce ;
    }
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:52,代码来源:PortableRemoteObject.java


示例7: read_Object

import com.sun.corba.se.impl.util.RepositoryId; //导入依赖的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


示例8: read_Object

import com.sun.corba.se.impl.util.RepositoryId; //导入依赖的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


示例9: createForAnyType

import com.sun.corba.se.impl.util.RepositoryId; //导入依赖的package包/类
public String createForAnyType(Class type) {
    return RepositoryId.createForAnyType(type);
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:4,代码来源:RepIdDelegator.java


示例10: createForJavaType

import com.sun.corba.se.impl.util.RepositoryId; //导入依赖的package包/类
public String createForJavaType(Serializable ser)
    throws TypeMismatchException
{
    return RepositoryId.createForJavaType(ser);
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:6,代码来源:RepIdDelegator.java


示例11: createSequenceRepID

import com.sun.corba.se.impl.util.RepositoryId; //导入依赖的package包/类
public String createSequenceRepID(java.lang.Object ser) {
    return RepositoryId.createSequenceRepID(ser);
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:4,代码来源:RepIdDelegator.java


示例12: getFromString

import com.sun.corba.se.impl.util.RepositoryId; //导入依赖的package包/类
public RepositoryIdInterface getFromString(String repIdString) {
    return new RepIdDelegator(RepositoryId.cache.getId(repIdString));
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:4,代码来源:RepIdDelegator.java


示例13: isChunkedEncoding

import com.sun.corba.se.impl.util.RepositoryId; //导入依赖的package包/类
public boolean isChunkedEncoding(int valueTag) {
    return RepositoryId.isChunkedEncoding(valueTag);
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:4,代码来源:RepIdDelegator.java


示例14: isCodeBasePresent

import com.sun.corba.se.impl.util.RepositoryId; //导入依赖的package包/类
public boolean isCodeBasePresent(int valueTag) {
    return RepositoryId.isCodeBasePresent(valueTag);
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:4,代码来源:RepIdDelegator.java


示例15: getClassDescValueRepId

import com.sun.corba.se.impl.util.RepositoryId; //导入依赖的package包/类
public String getClassDescValueRepId() {
    return RepositoryId.kClassDescValueRepID;
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:4,代码来源:RepIdDelegator.java


示例16: getWStringValueRepId

import com.sun.corba.se.impl.util.RepositoryId; //导入依赖的package包/类
public String getWStringValueRepId() {
    return RepositoryId.kWStringValueRepID;
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:4,代码来源:RepIdDelegator.java


示例17: getTypeInfo

import com.sun.corba.se.impl.util.RepositoryId; //导入依赖的package包/类
public int getTypeInfo(int valueTag) {
    return RepositoryId.getTypeInfo(valueTag);
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:4,代码来源:RepIdDelegator.java


示例18: getStandardRMIChunkedNoRepStrId

import com.sun.corba.se.impl.util.RepositoryId; //导入依赖的package包/类
public int getStandardRMIChunkedNoRepStrId() {
    return RepositoryId.kPreComputed_StandardRMIChunked_NoRep;
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:4,代码来源:RepIdDelegator.java


示例19: getCodeBaseRMIChunkedNoRepStrId

import com.sun.corba.se.impl.util.RepositoryId; //导入依赖的package包/类
public int getCodeBaseRMIChunkedNoRepStrId() {
    return RepositoryId.kPreComputed_CodeBaseRMIChunked_NoRep;
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:4,代码来源:RepIdDelegator.java


示例20: getStandardRMIChunkedId

import com.sun.corba.se.impl.util.RepositoryId; //导入依赖的package包/类
public int getStandardRMIChunkedId() {
    return RepositoryId.kPreComputed_StandardRMIChunked;
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:4,代码来源:RepIdDelegator.java



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Java IncludeRelationships类代码示例发布时间:2022-05-22
下一篇:
Java AbbreviatedObjectId类代码示例发布时间:2022-05-22
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap