本文整理汇总了Java中org.omg.PortableInterceptor.ORBInitInfoPackage.InvalidName.initCause方法的典型用法代码示例。如果您正苦于以下问题:Java InvalidName.initCause方法的具体用法?Java InvalidName.initCause怎么用?Java InvalidName.initCause使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.omg.PortableInterceptor.ORBInitInfoPackage.InvalidName
的用法示例。
在下文中一共展示了InvalidName.initCause方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: register_initial_reference
import org.omg.PortableInterceptor.ORBInitInfoPackage.InvalidName; //导入方法依赖的package包/类
/**
* See orbos/99-12-02, Chapter 11, Dynamic Initial References on page
* 11-81. This operation is identical to ORB::register_initial_reference
* described there. This same functionality exists here because the ORB,
* not yet fully initialized, is not yet available but initial references
* may need to be registered as part of Interceptor registration.
* <p>
* This method may not be called during post_init.
*/
public void register_initial_reference( String id,
org.omg.CORBA.Object obj )
throws InvalidName
{
checkStage();
if( id == null ) nullParam();
// As per CORBA 3.0 section 21.8.1,
// if null is passed as the obj parameter,
// throw BAD_PARAM with minor code OMGSystemException.RIR_WITH_NULL_OBJECT.
// Though the spec is talking about IDL null, we will address both
// Java null and IDL null:
// Note: Local Objects can never be nil!
if( obj == null ) {
throw omgWrapper.rirWithNullObject() ;
}
// This check was made to determine that the objref is a
// non-local objref that is fully
// initialized: this was called only for its side-effects of
// possibly throwing exceptions. However, registering
// local objects should be permitted!
// XXX/Revisit?
// IOR ior = ORBUtility.getIOR( obj ) ;
// Delegate to ORB. If ORB version throws InvalidName, convert to
// equivalent Portable Interceptors InvalidName.
try {
orb.register_initial_reference( id, obj );
} catch( org.omg.CORBA.ORBPackage.InvalidName e ) {
InvalidName exc = new InvalidName( e.getMessage() );
exc.initCause( e ) ;
throw exc ;
}
}
示例2: resolve_initial_references
import org.omg.PortableInterceptor.ORBInitInfoPackage.InvalidName; //导入方法依赖的package包/类
/**
* Delegates to ORB.
*/
public org.omg.CORBA.Object resolve_initial_references(String object_name)
throws InvalidName
{
try
{
return orb.resolve_initial_references(object_name);
}
catch (org.omg.CORBA.ORBPackage.InvalidName e)
{
InvalidName in = new InvalidName(e.getMessage());
in.initCause(e);
throw in;
}
}