本文整理汇总了Java中com.sun.corba.se.impl.util.RepositoryId类的典型用法代码示例。如果您正苦于以下问题:Java RepositoryId类的具体用法?Java RepositoryId怎么用?Java RepositoryId使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
RepositoryId类属于com.sun.corba.se.impl.util包,在下文中一共展示了RepositoryId类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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 ) ;
}
示例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()];
}
}
示例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();
}
示例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);
}
示例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);
}
示例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 ;
}
}
示例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);
}
示例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 ) ;
}
示例9: createForAnyType
import com.sun.corba.se.impl.util.RepositoryId; //导入依赖的package包/类
public String createForAnyType(Class type) {
return RepositoryId.createForAnyType(type);
}
示例10: createForJavaType
import com.sun.corba.se.impl.util.RepositoryId; //导入依赖的package包/类
public String createForJavaType(Serializable ser)
throws TypeMismatchException
{
return RepositoryId.createForJavaType(ser);
}
示例11: createSequenceRepID
import com.sun.corba.se.impl.util.RepositoryId; //导入依赖的package包/类
public String createSequenceRepID(java.lang.Object ser) {
return RepositoryId.createSequenceRepID(ser);
}
示例12: getFromString
import com.sun.corba.se.impl.util.RepositoryId; //导入依赖的package包/类
public RepositoryIdInterface getFromString(String repIdString) {
return new RepIdDelegator(RepositoryId.cache.getId(repIdString));
}
示例13: isChunkedEncoding
import com.sun.corba.se.impl.util.RepositoryId; //导入依赖的package包/类
public boolean isChunkedEncoding(int valueTag) {
return RepositoryId.isChunkedEncoding(valueTag);
}
示例14: isCodeBasePresent
import com.sun.corba.se.impl.util.RepositoryId; //导入依赖的package包/类
public boolean isCodeBasePresent(int valueTag) {
return RepositoryId.isCodeBasePresent(valueTag);
}
示例15: getClassDescValueRepId
import com.sun.corba.se.impl.util.RepositoryId; //导入依赖的package包/类
public String getClassDescValueRepId() {
return RepositoryId.kClassDescValueRepID;
}