本文整理汇总了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 );
}
示例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 ) ;
}
示例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 );
}
示例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 ) ;
}
示例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 );
}
示例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 ) ;
}
示例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 );
}
示例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 );
}
}