org.omg.PortableInterceptor.PolicyFactory Java Examples

The following examples show how to use org.omg.PortableInterceptor.PolicyFactory. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: PIHandlerImpl.java    From openjdk-jdk9 with GNU General Public License v2.0 6 votes vote down vote up
/** This is the implementation of standard API defined in org.omg.CORBA.ORB
 *  class. This method finds the Policy Factory for the given Policy Type
 *  and instantiates the Policy object from the Factory. It will throw
 *  PolicyError exception, If the PolicyFactory for the given type is
 *  not registered.
 *  _REVISIT_, Once Policy Framework work is completed, Reorganize
 *  this method to com.sun.corba.se.spi.orb.ORB.
 */
public org.omg.CORBA.Policy create_policy(int type, org.omg.CORBA.Any val)
    throws org.omg.CORBA.PolicyError
{
    if( val == null ) {
        nullParam( );
    }
    if( policyFactoryTable == null ) {
        throw new org.omg.CORBA.PolicyError(
            "There is no PolicyFactory Registered for type " + type,
            BAD_POLICY.value );
    }
    PolicyFactory factory = (PolicyFactory)policyFactoryTable.get(
        new Integer(type) );
    if( factory == null ) {
        throw new org.omg.CORBA.PolicyError(
            " Could Not Find PolicyFactory for the Type " + type,
            BAD_POLICY.value);
    }
    org.omg.CORBA.Policy policy = factory.create_policy( type, val );
    return policy;
}
 
Example #2
Source File: PIHandlerImpl.java    From jdk1.8-source-analysis with Apache License 2.0 6 votes vote down vote up
/** This is the implementation of standard API defined in org.omg.CORBA.ORB
 *  class. This method finds the Policy Factory for the given Policy Type
 *  and instantiates the Policy object from the Factory. It will throw
 *  PolicyError exception, If the PolicyFactory for the given type is
 *  not registered.
 *  _REVISIT_, Once Policy Framework work is completed, Reorganize
 *  this method to com.sun.corba.se.spi.orb.ORB.
 */
public org.omg.CORBA.Policy create_policy(int type, org.omg.CORBA.Any val)
    throws org.omg.CORBA.PolicyError
{
    if( val == null ) {
        nullParam( );
    }
    if( policyFactoryTable == null ) {
        throw new org.omg.CORBA.PolicyError(
            "There is no PolicyFactory Registered for type " + type,
            BAD_POLICY.value );
    }
    PolicyFactory factory = (PolicyFactory)policyFactoryTable.get(
        new Integer(type) );
    if( factory == null ) {
        throw new org.omg.CORBA.PolicyError(
            " Could Not Find PolicyFactory for the Type " + type,
            BAD_POLICY.value);
    }
    org.omg.CORBA.Policy policy = factory.create_policy( type, val );
    return policy;
}
 
Example #3
Source File: PIHandlerImpl.java    From JDKSourceCode1.8 with MIT License 6 votes vote down vote up
/** This is the implementation of standard API defined in org.omg.CORBA.ORB
 *  class. This method finds the Policy Factory for the given Policy Type
 *  and instantiates the Policy object from the Factory. It will throw
 *  PolicyError exception, If the PolicyFactory for the given type is
 *  not registered.
 *  _REVISIT_, Once Policy Framework work is completed, Reorganize
 *  this method to com.sun.corba.se.spi.orb.ORB.
 */
public org.omg.CORBA.Policy create_policy(int type, org.omg.CORBA.Any val)
    throws org.omg.CORBA.PolicyError
{
    if( val == null ) {
        nullParam( );
    }
    if( policyFactoryTable == null ) {
        throw new org.omg.CORBA.PolicyError(
            "There is no PolicyFactory Registered for type " + type,
            BAD_POLICY.value );
    }
    PolicyFactory factory = (PolicyFactory)policyFactoryTable.get(
        new Integer(type) );
    if( factory == null ) {
        throw new org.omg.CORBA.PolicyError(
            " Could Not Find PolicyFactory for the Type " + type,
            BAD_POLICY.value);
    }
    org.omg.CORBA.Policy policy = factory.create_policy( type, val );
    return policy;
}
 
Example #4
Source File: PIHandlerImpl.java    From openjdk-8 with GNU General Public License v2.0 6 votes vote down vote up
/** This is the implementation of standard API defined in org.omg.CORBA.ORB
 *  class. This method finds the Policy Factory for the given Policy Type
 *  and instantiates the Policy object from the Factory. It will throw
 *  PolicyError exception, If the PolicyFactory for the given type is
 *  not registered.
 *  _REVISIT_, Once Policy Framework work is completed, Reorganize
 *  this method to com.sun.corba.se.spi.orb.ORB.
 */
public org.omg.CORBA.Policy create_policy(int type, org.omg.CORBA.Any val)
    throws org.omg.CORBA.PolicyError
{
    if( val == null ) {
        nullParam( );
    }
    if( policyFactoryTable == null ) {
        throw new org.omg.CORBA.PolicyError(
            "There is no PolicyFactory Registered for type " + type,
            BAD_POLICY.value );
    }
    PolicyFactory factory = (PolicyFactory)policyFactoryTable.get(
        new Integer(type) );
    if( factory == null ) {
        throw new org.omg.CORBA.PolicyError(
            " Could Not Find PolicyFactory for the Type " + type,
            BAD_POLICY.value);
    }
    org.omg.CORBA.Policy policy = factory.create_policy( type, val );
    return policy;
}
 
Example #5
Source File: PIHandlerImpl.java    From TencentKona-8 with GNU General Public License v2.0 6 votes vote down vote up
/** This is the implementation of standard API defined in org.omg.CORBA.ORB
 *  class. This method finds the Policy Factory for the given Policy Type
 *  and instantiates the Policy object from the Factory. It will throw
 *  PolicyError exception, If the PolicyFactory for the given type is
 *  not registered.
 *  _REVISIT_, Once Policy Framework work is completed, Reorganize
 *  this method to com.sun.corba.se.spi.orb.ORB.
 */
public org.omg.CORBA.Policy create_policy(int type, org.omg.CORBA.Any val)
    throws org.omg.CORBA.PolicyError
{
    if( val == null ) {
        nullParam( );
    }
    if( policyFactoryTable == null ) {
        throw new org.omg.CORBA.PolicyError(
            "There is no PolicyFactory Registered for type " + type,
            BAD_POLICY.value );
    }
    PolicyFactory factory = (PolicyFactory)policyFactoryTable.get(
        new Integer(type) );
    if( factory == null ) {
        throw new org.omg.CORBA.PolicyError(
            " Could Not Find PolicyFactory for the Type " + type,
            BAD_POLICY.value);
    }
    org.omg.CORBA.Policy policy = factory.create_policy( type, val );
    return policy;
}
 
Example #6
Source File: PIHandlerImpl.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 6 votes vote down vote up
/** This is the implementation of standard API defined in org.omg.CORBA.ORB
 *  class. This method finds the Policy Factory for the given Policy Type
 *  and instantiates the Policy object from the Factory. It will throw
 *  PolicyError exception, If the PolicyFactory for the given type is
 *  not registered.
 *  _REVISIT_, Once Policy Framework work is completed, Reorganize
 *  this method to com.sun.corba.se.spi.orb.ORB.
 */
public org.omg.CORBA.Policy create_policy(int type, org.omg.CORBA.Any val)
    throws org.omg.CORBA.PolicyError
{
    if( val == null ) {
        nullParam( );
    }
    if( policyFactoryTable == null ) {
        throw new org.omg.CORBA.PolicyError(
            "There is no PolicyFactory Registered for type " + type,
            BAD_POLICY.value );
    }
    PolicyFactory factory = (PolicyFactory)policyFactoryTable.get(
        new Integer(type) );
    if( factory == null ) {
        throw new org.omg.CORBA.PolicyError(
            " Could Not Find PolicyFactory for the Type " + type,
            BAD_POLICY.value);
    }
    org.omg.CORBA.Policy policy = factory.create_policy( type, val );
    return policy;
}
 
Example #7
Source File: PIHandlerImpl.java    From openjdk-8-source with GNU General Public License v2.0 6 votes vote down vote up
/** This is the implementation of standard API defined in org.omg.CORBA.ORB
 *  class. This method finds the Policy Factory for the given Policy Type
 *  and instantiates the Policy object from the Factory. It will throw
 *  PolicyError exception, If the PolicyFactory for the given type is
 *  not registered.
 *  _REVISIT_, Once Policy Framework work is completed, Reorganize
 *  this method to com.sun.corba.se.spi.orb.ORB.
 */
public org.omg.CORBA.Policy create_policy(int type, org.omg.CORBA.Any val)
    throws org.omg.CORBA.PolicyError
{
    if( val == null ) {
        nullParam( );
    }
    if( policyFactoryTable == null ) {
        throw new org.omg.CORBA.PolicyError(
            "There is no PolicyFactory Registered for type " + type,
            BAD_POLICY.value );
    }
    PolicyFactory factory = (PolicyFactory)policyFactoryTable.get(
        new Integer(type) );
    if( factory == null ) {
        throw new org.omg.CORBA.PolicyError(
            " Could Not Find PolicyFactory for the Type " + type,
            BAD_POLICY.value);
    }
    org.omg.CORBA.Policy policy = factory.create_policy( type, val );
    return policy;
}
 
Example #8
Source File: PIHandlerImpl.java    From hottub with GNU General Public License v2.0 6 votes vote down vote up
/** This is the implementation of standard API defined in org.omg.CORBA.ORB
 *  class. This method finds the Policy Factory for the given Policy Type
 *  and instantiates the Policy object from the Factory. It will throw
 *  PolicyError exception, If the PolicyFactory for the given type is
 *  not registered.
 *  _REVISIT_, Once Policy Framework work is completed, Reorganize
 *  this method to com.sun.corba.se.spi.orb.ORB.
 */
public org.omg.CORBA.Policy create_policy(int type, org.omg.CORBA.Any val)
    throws org.omg.CORBA.PolicyError
{
    if( val == null ) {
        nullParam( );
    }
    if( policyFactoryTable == null ) {
        throw new org.omg.CORBA.PolicyError(
            "There is no PolicyFactory Registered for type " + type,
            BAD_POLICY.value );
    }
    PolicyFactory factory = (PolicyFactory)policyFactoryTable.get(
        new Integer(type) );
    if( factory == null ) {
        throw new org.omg.CORBA.PolicyError(
            " Could Not Find PolicyFactory for the Type " + type,
            BAD_POLICY.value);
    }
    org.omg.CORBA.Policy policy = factory.create_policy( type, val );
    return policy;
}
 
Example #9
Source File: PIHandlerImpl.java    From openjdk-jdk8u with GNU General Public License v2.0 6 votes vote down vote up
/** This is the implementation of standard API defined in org.omg.CORBA.ORB
 *  class. This method finds the Policy Factory for the given Policy Type
 *  and instantiates the Policy object from the Factory. It will throw
 *  PolicyError exception, If the PolicyFactory for the given type is
 *  not registered.
 *  _REVISIT_, Once Policy Framework work is completed, Reorganize
 *  this method to com.sun.corba.se.spi.orb.ORB.
 */
public org.omg.CORBA.Policy create_policy(int type, org.omg.CORBA.Any val)
    throws org.omg.CORBA.PolicyError
{
    if( val == null ) {
        nullParam( );
    }
    if( policyFactoryTable == null ) {
        throw new org.omg.CORBA.PolicyError(
            "There is no PolicyFactory Registered for type " + type,
            BAD_POLICY.value );
    }
    PolicyFactory factory = (PolicyFactory)policyFactoryTable.get(
        new Integer(type) );
    if( factory == null ) {
        throw new org.omg.CORBA.PolicyError(
            " Could Not Find PolicyFactory for the Type " + type,
            BAD_POLICY.value);
    }
    org.omg.CORBA.Policy policy = factory.create_policy( type, val );
    return policy;
}
 
Example #10
Source File: PIHandlerImpl.java    From jdk8u60 with GNU General Public License v2.0 6 votes vote down vote up
/** This is the implementation of standard API defined in org.omg.CORBA.ORB
 *  class. This method finds the Policy Factory for the given Policy Type
 *  and instantiates the Policy object from the Factory. It will throw
 *  PolicyError exception, If the PolicyFactory for the given type is
 *  not registered.
 *  _REVISIT_, Once Policy Framework work is completed, Reorganize
 *  this method to com.sun.corba.se.spi.orb.ORB.
 */
public org.omg.CORBA.Policy create_policy(int type, org.omg.CORBA.Any val)
    throws org.omg.CORBA.PolicyError
{
    if( val == null ) {
        nullParam( );
    }
    if( policyFactoryTable == null ) {
        throw new org.omg.CORBA.PolicyError(
            "There is no PolicyFactory Registered for type " + type,
            BAD_POLICY.value );
    }
    PolicyFactory factory = (PolicyFactory)policyFactoryTable.get(
        new Integer(type) );
    if( factory == null ) {
        throw new org.omg.CORBA.PolicyError(
            " Could Not Find PolicyFactory for the Type " + type,
            BAD_POLICY.value);
    }
    org.omg.CORBA.Policy policy = factory.create_policy( type, val );
    return policy;
}
 
Example #11
Source File: ORBInitInfoImpl.java    From openjdk-8-source with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Register a PolicyFactory for the given PolicyType.
 * <p>
 * If a PolicyFactory already exists for the given PolicyType,
 * BAD_INV_ORDER is raised with a minor code of TBD_BIO+2.
 */
public void register_policy_factory( int type,
                                     PolicyFactory policy_factory )
{
    checkStage();
    if( policy_factory == null ) nullParam();
    orb.getPIHandler().registerPolicyFactory( type, policy_factory );
}
 
Example #12
Source File: PIHandlerImpl.java    From openjdk-jdk9 with GNU General Public License v2.0 5 votes vote down vote up
/** This method registers the Policy Factory in the policyFactoryTable,
 *  which is a HashMap. This method is made package private, because
 *  it is used internally by the  Interceptors.
 */
public void registerPolicyFactory( int type, PolicyFactory factory ) {
    if( policyFactoryTable == null ) {
        policyFactoryTable = new HashMap();
    }
    Integer key = new Integer( type );
    java.lang.Object val = policyFactoryTable.get( key );
    if( val == null ) {
        policyFactoryTable.put( key, factory );
    }
    else {
        throw omgWrapper.policyFactoryRegFailed( new Integer( type ) ) ;
    }
}
 
Example #13
Source File: ORBInitInfoImpl.java    From openjdk-jdk8u with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Register a PolicyFactory for the given PolicyType.
 * <p>
 * If a PolicyFactory already exists for the given PolicyType,
 * BAD_INV_ORDER is raised with a minor code of TBD_BIO+2.
 */
public void register_policy_factory( int type,
                                     PolicyFactory policy_factory )
{
    checkStage();
    if( policy_factory == null ) nullParam();
    orb.getPIHandler().registerPolicyFactory( type, policy_factory );
}
 
Example #14
Source File: PIHandlerImpl.java    From openjdk-jdk8u with GNU General Public License v2.0 5 votes vote down vote up
/** This method registers the Policy Factory in the policyFactoryTable,
 *  which is a HashMap. This method is made package private, because
 *  it is used internally by the  Interceptors.
 */
public void registerPolicyFactory( int type, PolicyFactory factory ) {
    if( policyFactoryTable == null ) {
        policyFactoryTable = new HashMap();
    }
    Integer key = new Integer( type );
    java.lang.Object val = policyFactoryTable.get( key );
    if( val == null ) {
        policyFactoryTable.put( key, factory );
    }
    else {
        throw omgWrapper.policyFactoryRegFailed( new Integer( type ) ) ;
    }
}
 
Example #15
Source File: PIHandlerImpl.java    From hottub with GNU General Public License v2.0 5 votes vote down vote up
/** This method registers the Policy Factory in the policyFactoryTable,
 *  which is a HashMap. This method is made package private, because
 *  it is used internally by the  Interceptors.
 */
public void registerPolicyFactory( int type, PolicyFactory factory ) {
    if( policyFactoryTable == null ) {
        policyFactoryTable = new HashMap();
    }
    Integer key = new Integer( type );
    java.lang.Object val = policyFactoryTable.get( key );
    if( val == null ) {
        policyFactoryTable.put( key, factory );
    }
    else {
        throw omgWrapper.policyFactoryRegFailed( new Integer( type ) ) ;
    }
}
 
Example #16
Source File: ORBInitInfoImpl.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Register a PolicyFactory for the given PolicyType.
 * <p>
 * If a PolicyFactory already exists for the given PolicyType,
 * BAD_INV_ORDER is raised with a minor code of TBD_BIO+2.
 */
public void register_policy_factory( int type,
                                     PolicyFactory policy_factory )
{
    checkStage();
    if( policy_factory == null ) nullParam();
    orb.getPIHandler().registerPolicyFactory( type, policy_factory );
}
 
Example #17
Source File: PIHandlerImpl.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 5 votes vote down vote up
/** This method registers the Policy Factory in the policyFactoryTable,
 *  which is a HashMap. This method is made package private, because
 *  it is used internally by the  Interceptors.
 */
public void registerPolicyFactory( int type, PolicyFactory factory ) {
    if( policyFactoryTable == null ) {
        policyFactoryTable = new HashMap();
    }
    Integer key = new Integer( type );
    java.lang.Object val = policyFactoryTable.get( key );
    if( val == null ) {
        policyFactoryTable.put( key, factory );
    }
    else {
        throw omgWrapper.policyFactoryRegFailed( new Integer( type ) ) ;
    }
}
 
Example #18
Source File: ORBInitInfoImpl.java    From hottub with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Register a PolicyFactory for the given PolicyType.
 * <p>
 * If a PolicyFactory already exists for the given PolicyType,
 * BAD_INV_ORDER is raised with a minor code of TBD_BIO+2.
 */
public void register_policy_factory( int type,
                                     PolicyFactory policy_factory )
{
    checkStage();
    if( policy_factory == null ) nullParam();
    orb.getPIHandler().registerPolicyFactory( type, policy_factory );
}
 
Example #19
Source File: ORBInitInfoImpl.java    From openjdk-jdk9 with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Register a PolicyFactory for the given PolicyType.
 * <p>
 * If a PolicyFactory already exists for the given PolicyType,
 * BAD_INV_ORDER is raised with a minor code of TBD_BIO+2.
 */
public void register_policy_factory( int type,
                                     PolicyFactory policy_factory )
{
    checkStage();
    if( policy_factory == null ) nullParam();
    orb.getPIHandler().registerPolicyFactory( type, policy_factory );
}
 
Example #20
Source File: PIHandlerImpl.java    From JDKSourceCode1.8 with MIT License 5 votes vote down vote up
/** This method registers the Policy Factory in the policyFactoryTable,
 *  which is a HashMap. This method is made package private, because
 *  it is used internally by the  Interceptors.
 */
public void registerPolicyFactory( int type, PolicyFactory factory ) {
    if( policyFactoryTable == null ) {
        policyFactoryTable = new HashMap();
    }
    Integer key = new Integer( type );
    java.lang.Object val = policyFactoryTable.get( key );
    if( val == null ) {
        policyFactoryTable.put( key, factory );
    }
    else {
        throw omgWrapper.policyFactoryRegFailed( new Integer( type ) ) ;
    }
}
 
Example #21
Source File: ORBInitInfoImpl.java    From JDKSourceCode1.8 with MIT License 5 votes vote down vote up
/**
 * Register a PolicyFactory for the given PolicyType.
 * <p>
 * If a PolicyFactory already exists for the given PolicyType,
 * BAD_INV_ORDER is raised with a minor code of TBD_BIO+2.
 */
public void register_policy_factory( int type,
                                     PolicyFactory policy_factory )
{
    checkStage();
    if( policy_factory == null ) nullParam();
    orb.getPIHandler().registerPolicyFactory( type, policy_factory );
}
 
Example #22
Source File: PIHandlerImpl.java    From openjdk-8-source with GNU General Public License v2.0 5 votes vote down vote up
/** This method registers the Policy Factory in the policyFactoryTable,
 *  which is a HashMap. This method is made package private, because
 *  it is used internally by the  Interceptors.
 */
public void registerPolicyFactory( int type, PolicyFactory factory ) {
    if( policyFactoryTable == null ) {
        policyFactoryTable = new HashMap();
    }
    Integer key = new Integer( type );
    java.lang.Object val = policyFactoryTable.get( key );
    if( val == null ) {
        policyFactoryTable.put( key, factory );
    }
    else {
        throw omgWrapper.policyFactoryRegFailed( new Integer( type ) ) ;
    }
}
 
Example #23
Source File: PIHandlerImpl.java    From jdk8u60 with GNU General Public License v2.0 5 votes vote down vote up
/** This method registers the Policy Factory in the policyFactoryTable,
 *  which is a HashMap. This method is made package private, because
 *  it is used internally by the  Interceptors.
 */
public void registerPolicyFactory( int type, PolicyFactory factory ) {
    if( policyFactoryTable == null ) {
        policyFactoryTable = new HashMap();
    }
    Integer key = new Integer( type );
    java.lang.Object val = policyFactoryTable.get( key );
    if( val == null ) {
        policyFactoryTable.put( key, factory );
    }
    else {
        throw omgWrapper.policyFactoryRegFailed( new Integer( type ) ) ;
    }
}
 
Example #24
Source File: ORBInitInfoImpl.java    From jdk8u60 with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Register a PolicyFactory for the given PolicyType.
 * <p>
 * If a PolicyFactory already exists for the given PolicyType,
 * BAD_INV_ORDER is raised with a minor code of TBD_BIO+2.
 */
public void register_policy_factory( int type,
                                     PolicyFactory policy_factory )
{
    checkStage();
    if( policy_factory == null ) nullParam();
    orb.getPIHandler().registerPolicyFactory( type, policy_factory );
}
 
Example #25
Source File: ORBInitInfoImpl.java    From openjdk-8 with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Register a PolicyFactory for the given PolicyType.
 * <p>
 * If a PolicyFactory already exists for the given PolicyType,
 * BAD_INV_ORDER is raised with a minor code of TBD_BIO+2.
 */
public void register_policy_factory( int type,
                                     PolicyFactory policy_factory )
{
    checkStage();
    if( policy_factory == null ) nullParam();
    orb.getPIHandler().registerPolicyFactory( type, policy_factory );
}
 
Example #26
Source File: PIHandlerImpl.java    From TencentKona-8 with GNU General Public License v2.0 5 votes vote down vote up
/** This method registers the Policy Factory in the policyFactoryTable,
 *  which is a HashMap. This method is made package private, because
 *  it is used internally by the  Interceptors.
 */
public void registerPolicyFactory( int type, PolicyFactory factory ) {
    if( policyFactoryTable == null ) {
        policyFactoryTable = new HashMap();
    }
    Integer key = new Integer( type );
    java.lang.Object val = policyFactoryTable.get( key );
    if( val == null ) {
        policyFactoryTable.put( key, factory );
    }
    else {
        throw omgWrapper.policyFactoryRegFailed( new Integer( type ) ) ;
    }
}
 
Example #27
Source File: ORBInitInfoImpl.java    From TencentKona-8 with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Register a PolicyFactory for the given PolicyType.
 * <p>
 * If a PolicyFactory already exists for the given PolicyType,
 * BAD_INV_ORDER is raised with a minor code of TBD_BIO+2.
 */
public void register_policy_factory( int type,
                                     PolicyFactory policy_factory )
{
    checkStage();
    if( policy_factory == null ) nullParam();
    orb.getPIHandler().registerPolicyFactory( type, policy_factory );
}
 
Example #28
Source File: PIHandlerImpl.java    From openjdk-8 with GNU General Public License v2.0 5 votes vote down vote up
/** This method registers the Policy Factory in the policyFactoryTable,
 *  which is a HashMap. This method is made package private, because
 *  it is used internally by the  Interceptors.
 */
public void registerPolicyFactory( int type, PolicyFactory factory ) {
    if( policyFactoryTable == null ) {
        policyFactoryTable = new HashMap();
    }
    Integer key = new Integer( type );
    java.lang.Object val = policyFactoryTable.get( key );
    if( val == null ) {
        policyFactoryTable.put( key, factory );
    }
    else {
        throw omgWrapper.policyFactoryRegFailed( new Integer( type ) ) ;
    }
}
 
Example #29
Source File: PIHandlerImpl.java    From jdk1.8-source-analysis with Apache License 2.0 5 votes vote down vote up
/** This method registers the Policy Factory in the policyFactoryTable,
 *  which is a HashMap. This method is made package private, because
 *  it is used internally by the  Interceptors.
 */
public void registerPolicyFactory( int type, PolicyFactory factory ) {
    if( policyFactoryTable == null ) {
        policyFactoryTable = new HashMap();
    }
    Integer key = new Integer( type );
    java.lang.Object val = policyFactoryTable.get( key );
    if( val == null ) {
        policyFactoryTable.put( key, factory );
    }
    else {
        throw omgWrapper.policyFactoryRegFailed( new Integer( type ) ) ;
    }
}
 
Example #30
Source File: ORBInitInfoImpl.java    From jdk1.8-source-analysis with Apache License 2.0 5 votes vote down vote up
/**
 * Register a PolicyFactory for the given PolicyType.
 * <p>
 * If a PolicyFactory already exists for the given PolicyType,
 * BAD_INV_ORDER is raised with a minor code of TBD_BIO+2.
 */
public void register_policy_factory( int type,
                                     PolicyFactory policy_factory )
{
    checkStage();
    if( policy_factory == null ) nullParam();
    orb.getPIHandler().registerPolicyFactory( type, policy_factory );
}