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


Java DuplicateName类代码示例

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


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

示例1: register_interceptor

import org.omg.PortableInterceptor.ORBInitInfoPackage.DuplicateName; //导入依赖的package包/类
/**
 * Called by ORBInitInfo when an interceptor needs to be registered.
 * The type is one of:
 * <ul>
 *   <li>INTERCEPTOR_TYPE_CLIENT - ClientRequestInterceptor
 *   <li>INTERCEPTOR_TYPE_SERVER - ServerRequestInterceptor
 *   <li>INTERCEPTOR_TYPE_IOR - IORInterceptor
 * </ul>
 *
 * @exception DuplicateName Thrown if an interceptor of the given
 *     name already exists for the given type.
 */
public void register_interceptor( Interceptor interceptor, int type )
    throws DuplicateName
{
    // We will assume interceptor is not null, since it is called
    // internally.
    if( (type >= InterceptorList.NUM_INTERCEPTOR_TYPES) || (type < 0) ) {
        throw wrapper.typeOutOfRange( new Integer( type ) ) ;
    }

    String interceptorName = interceptor.name();

    if( interceptorName == null ) {
        throw wrapper.nameNull() ;
    }

    // Register with interceptor list:
    interceptorList.register_interceptor( interceptor, type );
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:31,代码来源:PIHandlerImpl.java

示例2: add_client_request_interceptor_with_policy

import org.omg.PortableInterceptor.ORBInitInfoPackage.DuplicateName; //导入依赖的package包/类
public void add_client_request_interceptor_with_policy (
    ClientRequestInterceptor interceptor, Policy[] policies )
    throws DuplicateName
{
    // XXX ignore policies for now
    add_client_request_interceptor( interceptor ) ;
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:8,代码来源:ORBInitInfoImpl.java

示例3: add_client_request_interceptor

import org.omg.PortableInterceptor.ORBInitInfoPackage.DuplicateName; //导入依赖的package包/类
/**
 * This operation is used to add a client-side request Interceptor to
 * the list of client-side request Interceptors.
 * <p>
 * If a client-side request Interceptor has already been registered
 * with this Interceptor's name, DuplicateName is raised.
 */
public void add_client_request_interceptor (
    ClientRequestInterceptor interceptor)
    throws DuplicateName
{
    checkStage();
    if( interceptor == null ) nullParam();

    orb.getPIHandler().register_interceptor( interceptor,
        InterceptorList.INTERCEPTOR_TYPE_CLIENT );
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:18,代码来源:ORBInitInfoImpl.java

示例4: add_server_request_interceptor_with_policy

import org.omg.PortableInterceptor.ORBInitInfoPackage.DuplicateName; //导入依赖的package包/类
public void add_server_request_interceptor_with_policy (
    ServerRequestInterceptor interceptor, Policy[] policies )
    throws DuplicateName, PolicyError
{
    // XXX ignore policies for now
    add_server_request_interceptor( interceptor ) ;
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:8,代码来源:ORBInitInfoImpl.java

示例5: add_server_request_interceptor

import org.omg.PortableInterceptor.ORBInitInfoPackage.DuplicateName; //导入依赖的package包/类
/**
 * This operation is used to add a server-side request Interceptor to
 * the list of server-side request Interceptors.
 * <p>
 * If a server-side request Interceptor has already been registered
 * with this Interceptor's name, DuplicateName is raised.
 */
public void add_server_request_interceptor (
    ServerRequestInterceptor interceptor)
    throws DuplicateName
{
    checkStage();
    if( interceptor == null ) nullParam();

    orb.getPIHandler().register_interceptor( interceptor,
        InterceptorList.INTERCEPTOR_TYPE_SERVER );
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:18,代码来源:ORBInitInfoImpl.java

示例6: add_ior_interceptor_with_policy

import org.omg.PortableInterceptor.ORBInitInfoPackage.DuplicateName; //导入依赖的package包/类
public void add_ior_interceptor_with_policy (
    IORInterceptor interceptor, Policy[] policies )
    throws DuplicateName, PolicyError
{
    // XXX ignore policies for now
    add_ior_interceptor( interceptor ) ;
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:8,代码来源:ORBInitInfoImpl.java

示例7: add_ior_interceptor

import org.omg.PortableInterceptor.ORBInitInfoPackage.DuplicateName; //导入依赖的package包/类
/**
 * This operation is used to add an IOR Interceptor to
 * the list of IOR Interceptors.
 * <p>
 * If an IOR Interceptor has already been registered
 * with this Interceptor's name, DuplicateName is raised.
 */
public void add_ior_interceptor (
    IORInterceptor interceptor )
    throws DuplicateName
{
    checkStage();
    if( interceptor == null ) nullParam();

    orb.getPIHandler().register_interceptor( interceptor,
        InterceptorList.INTERCEPTOR_TYPE_IOR );
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:18,代码来源:ORBInitInfoImpl.java

示例8: register_interceptor

import org.omg.PortableInterceptor.ORBInitInfoPackage.DuplicateName; //导入依赖的package包/类
/**
 * Registers an interceptor of the given type into the interceptor list.
 * The type is one of:
 * <ul>
 *   <li>INTERCEPTOR_TYPE_CLIENT - ClientRequestInterceptor
 *   <li>INTERCEPTOR_TYPE_SERVER - ServerRequestInterceptor
 *   <li>INTERCEPTOR_TYPE_IOR - IORInterceptor
 * </ul>
 *
 * @exception DuplicateName Thrown if an interceptor of the given
 *     name already exists for the given type.
 */
void register_interceptor( Interceptor interceptor, int type )
    throws DuplicateName
{
    // If locked, deny any further addition of interceptors.
    if( locked ) {
        throw wrapper.interceptorListLocked() ;
    }

    // Cache interceptor name:
    String interceptorName = interceptor.name();
    boolean anonymous = interceptorName.equals( "" );
    boolean foundDuplicate = false;
    Interceptor[] interceptorList = interceptors[type];

    // If this is not an anonymous interceptor,
    // search for an interceptor of the same name in this category:
    if( !anonymous ) {
        int size = interceptorList.length;

        // An O(n) search will suffice because register_interceptor is not
        // likely to be called often.
        for( int i = 0; i < size; i++ ) {
            Interceptor in = (Interceptor)interceptorList[i];
            if( in.name().equals( interceptorName ) ) {
                foundDuplicate = true;
                break;
            }
        }
    }

    if( !foundDuplicate ) {
        growInterceptorArray( type );
        interceptors[type][interceptors[type].length-1] = interceptor;
    }
    else {
        throw new DuplicateName( interceptorName );
    }
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:51,代码来源:InterceptorList.java


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