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


Java InvalidName类代码示例

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


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

示例1: register_initial_reference

import org.omg.PortableInterceptor.ORBInitInfoPackage.InvalidName; //导入依赖的package包/类
/**
 * Register reference.
 */
public void register_initial_reference(String object_name, Object object)
  throws InvalidName
{
  if (object_name == null)
    {
      throw new InvalidName("null");
    }
  else if (object_name.length() == 0)
    {
      throw new InvalidName("Empty string");
    }
  else if (m_references.containsKey(object_name))
    {
      throw new InvalidName(object_name);
    }
  else
    {
      m_references.put(object_name, object);
    }
}
 
开发者ID:vilie,项目名称:javify,代码行数:24,代码来源:Registrator.java

示例2: 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 ;
    }
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:45,代码来源:ORBInitInfoImpl.java

示例3: resolve_initial_references

import org.omg.PortableInterceptor.ORBInitInfoPackage.InvalidName; //导入依赖的package包/类
/**
 * This operation is only valid during post_init.  It is identical to
 * ORB::resolve_initial_references.  This same functionality exists here
 * because the ORB, not yet fully initialized, is not yet available,
 * but initial references may be required from the ORB as part
 * of Interceptor registration.
 * <p>
 * (incorporates changes from errata in orbos/00-01-01)
 * <p>
 * This method may not be called during pre_init.
 */
public org.omg.CORBA.Object resolve_initial_references (String id)
    throws InvalidName
{
    checkStage();
    if( id == null ) nullParam();

    if( stage == STAGE_PRE_INIT ) {
        // Initializer is not allowed to invoke this method during
        // this stage.

        // _REVISIT_ Spec issue: What exception should really be
        // thrown here?
        throw wrapper.rirInvalidPreInit() ;
    }

    org.omg.CORBA.Object objRef = null;

    try {
        objRef = orb.resolve_initial_references( id );
    }
    catch( org.omg.CORBA.ORBPackage.InvalidName e ) {
        // Convert PIDL to IDL exception:
        throw new InvalidName();
    }

    return objRef;
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:39,代码来源:ORBInitInfoImpl.java

示例4: 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;
    }
}
 
开发者ID:vilie,项目名称:javify,代码行数:18,代码来源:Registrator.java


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