类org.omg.CORBA.Policy源码实例Demo

下面列出了怎么用org.omg.CORBA.Policy的API类实例代码及写法,或者点击链接到github查看源代码。

源代码1 项目: openjdk-jdk8u   文件: NamingContextImpl.java
private synchronized void createbiPOA( ) {
    if( biPOA != null ) {
        return;
    }
    try {
        POA rootPOA = (POA) orb.resolve_initial_references(
            ORBConstants.ROOT_POA_NAME );
        rootPOA.the_POAManager().activate( );

        int i = 0;
        Policy[] poaPolicy = new Policy[3];
        poaPolicy[i++] = rootPOA.create_lifespan_policy(
            LifespanPolicyValue.TRANSIENT);
        poaPolicy[i++] = rootPOA.create_id_assignment_policy(
            IdAssignmentPolicyValue.SYSTEM_ID);
        poaPolicy[i++] = rootPOA.create_servant_retention_policy(
            ServantRetentionPolicyValue.RETAIN);
        biPOA = rootPOA.create_POA("BindingIteratorPOA", null, poaPolicy );
        biPOA.the_POAManager().activate( );
    } catch( Exception e ) {
        throw readWrapper.namingCtxBindingIteratorCreate( e ) ;
    }
}
 
private synchronized void createbiPOA( ) {
    if( biPOA != null ) {
        return;
    }
    try {
        POA rootPOA = (POA) orb.resolve_initial_references(
            ORBConstants.ROOT_POA_NAME );
        rootPOA.the_POAManager().activate( );

        int i = 0;
        Policy[] poaPolicy = new Policy[3];
        poaPolicy[i++] = rootPOA.create_lifespan_policy(
            LifespanPolicyValue.TRANSIENT);
        poaPolicy[i++] = rootPOA.create_id_assignment_policy(
            IdAssignmentPolicyValue.SYSTEM_ID);
        poaPolicy[i++] = rootPOA.create_servant_retention_policy(
            ServantRetentionPolicyValue.RETAIN);
        biPOA = rootPOA.create_POA("BindingIteratorPOA", null, poaPolicy );
        biPOA.the_POAManager().activate( );
    } catch( Exception e ) {
        throw readWrapper.namingCtxBindingIteratorCreate( e ) ;
    }
}
 
/**
 * Returns the policy in effect for this operation for the given policy
 * type.
 */
public Policy get_server_policy (int type) {
    // access is currently valid for all states:
    //checkAccess( MID_GET_SERVER_POLICY );

    Policy result = null;

    if( objectAdapter != null ) {
        result = objectAdapter.getEffectivePolicy( type );
    }

    // _REVISIT_ RTF Issue: get_server_policy spec not in sync with
    // get_effective_policy spec.

    return result;
}
 
源代码4 项目: TencentKona-8   文件: NamingContextImpl.java
private synchronized void createbiPOA( ) {
    if( biPOA != null ) {
        return;
    }
    try {
        POA rootPOA = (POA) orb.resolve_initial_references(
            ORBConstants.ROOT_POA_NAME );
        rootPOA.the_POAManager().activate( );

        int i = 0;
        Policy[] poaPolicy = new Policy[3];
        poaPolicy[i++] = rootPOA.create_lifespan_policy(
            LifespanPolicyValue.TRANSIENT);
        poaPolicy[i++] = rootPOA.create_id_assignment_policy(
            IdAssignmentPolicyValue.SYSTEM_ID);
        poaPolicy[i++] = rootPOA.create_servant_retention_policy(
            ServantRetentionPolicyValue.RETAIN);
        biPOA = rootPOA.create_POA("BindingIteratorPOA", null, poaPolicy );
        biPOA.the_POAManager().activate( );
    } catch( Exception e ) {
        throw readWrapper.namingCtxBindingIteratorCreate( e ) ;
    }
}
 
源代码5 项目: TencentKona-8   文件: ServerRequestInfoImpl.java
/**
 * Returns the policy in effect for this operation for the given policy
 * type.
 */
public Policy get_server_policy (int type) {
    // access is currently valid for all states:
    //checkAccess( MID_GET_SERVER_POLICY );

    Policy result = null;

    if( objectAdapter != null ) {
        result = objectAdapter.getEffectivePolicy( type );
    }

    // _REVISIT_ RTF Issue: get_server_policy spec not in sync with
    // get_effective_policy spec.

    return result;
}
 
源代码6 项目: openjdk-jdk8u   文件: ServerRequestInfoImpl.java
/**
 * Returns the policy in effect for this operation for the given policy
 * type.
 */
public Policy get_server_policy (int type) {
    // access is currently valid for all states:
    //checkAccess( MID_GET_SERVER_POLICY );

    Policy result = null;

    if( objectAdapter != null ) {
        result = objectAdapter.getEffectivePolicy( type );
    }

    // _REVISIT_ RTF Issue: get_server_policy spec not in sync with
    // get_effective_policy spec.

    return result;
}
 
源代码7 项目: jdk8u60   文件: NamingContextImpl.java
private synchronized void createbiPOA( ) {
    if( biPOA != null ) {
        return;
    }
    try {
        POA rootPOA = (POA) orb.resolve_initial_references(
            ORBConstants.ROOT_POA_NAME );
        rootPOA.the_POAManager().activate( );

        int i = 0;
        Policy[] poaPolicy = new Policy[3];
        poaPolicy[i++] = rootPOA.create_lifespan_policy(
            LifespanPolicyValue.TRANSIENT);
        poaPolicy[i++] = rootPOA.create_id_assignment_policy(
            IdAssignmentPolicyValue.SYSTEM_ID);
        poaPolicy[i++] = rootPOA.create_servant_retention_policy(
            ServantRetentionPolicyValue.RETAIN);
        biPOA = rootPOA.create_POA("BindingIteratorPOA", null, poaPolicy );
        biPOA.the_POAManager().activate( );
    } catch( Exception e ) {
        throw readWrapper.namingCtxBindingIteratorCreate( e ) ;
    }
}
 
源代码8 项目: jdk8u60   文件: ServerRequestInfoImpl.java
/**
 * Returns the policy in effect for this operation for the given policy
 * type.
 */
public Policy get_server_policy (int type) {
    // access is currently valid for all states:
    //checkAccess( MID_GET_SERVER_POLICY );

    Policy result = null;

    if( objectAdapter != null ) {
        result = objectAdapter.getEffectivePolicy( type );
    }

    // _REVISIT_ RTF Issue: get_server_policy spec not in sync with
    // get_effective_policy spec.

    return result;
}
 
源代码9 项目: JDKSourceCode1.8   文件: NamingContextImpl.java
private synchronized void createbiPOA( ) {
    if( biPOA != null ) {
        return;
    }
    try {
        POA rootPOA = (POA) orb.resolve_initial_references(
            ORBConstants.ROOT_POA_NAME );
        rootPOA.the_POAManager().activate( );

        int i = 0;
        Policy[] poaPolicy = new Policy[3];
        poaPolicy[i++] = rootPOA.create_lifespan_policy(
            LifespanPolicyValue.TRANSIENT);
        poaPolicy[i++] = rootPOA.create_id_assignment_policy(
            IdAssignmentPolicyValue.SYSTEM_ID);
        poaPolicy[i++] = rootPOA.create_servant_retention_policy(
            ServantRetentionPolicyValue.RETAIN);
        biPOA = rootPOA.create_POA("BindingIteratorPOA", null, poaPolicy );
        biPOA.the_POAManager().activate( );
    } catch( Exception e ) {
        throw readWrapper.namingCtxBindingIteratorCreate( e ) ;
    }
}
 
源代码10 项目: JDKSourceCode1.8   文件: ServerRequestInfoImpl.java
/**
 * Returns the policy in effect for this operation for the given policy
 * type.
 */
public Policy get_server_policy (int type) {
    // access is currently valid for all states:
    //checkAccess( MID_GET_SERVER_POLICY );

    Policy result = null;

    if( objectAdapter != null ) {
        result = objectAdapter.getEffectivePolicy( type );
    }

    // _REVISIT_ RTF Issue: get_server_policy spec not in sync with
    // get_effective_policy spec.

    return result;
}
 
源代码11 项目: JDKSourceCode1.8   文件: ORBInitInfoImpl.java
public void add_ior_interceptor_with_policy (
    IORInterceptor interceptor, Policy[] policies )
    throws DuplicateName, PolicyError
{
    // XXX ignore policies for now
    add_ior_interceptor( interceptor ) ;
}
 
源代码12 项目: jdk1.8-source-analysis   文件: ORBInitInfoImpl.java
public void add_client_request_interceptor_with_policy (
    ClientRequestInterceptor interceptor, Policy[] policies )
    throws DuplicateName
{
    // XXX ignore policies for now
    add_client_request_interceptor( interceptor ) ;
}
 
源代码13 项目: jdk1.8-source-analysis   文件: ORBInitInfoImpl.java
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 ) ;
}
 
源代码14 项目: jdk1.8-source-analysis   文件: ORBInitInfoImpl.java
public void add_ior_interceptor_with_policy (
    IORInterceptor interceptor, Policy[] policies )
    throws DuplicateName, PolicyError
{
    // XXX ignore policies for now
    add_ior_interceptor( interceptor ) ;
}
 
源代码15 项目: TencentKona-8   文件: ORBInitInfoImpl.java
public void add_client_request_interceptor_with_policy (
    ClientRequestInterceptor interceptor, Policy[] policies )
    throws DuplicateName
{
    // XXX ignore policies for now
    add_client_request_interceptor( interceptor ) ;
}
 
源代码16 项目: TencentKona-8   文件: ORBInitInfoImpl.java
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 ) ;
}
 
源代码17 项目: TencentKona-8   文件: ORBInitInfoImpl.java
public void add_ior_interceptor_with_policy (
    IORInterceptor interceptor, Policy[] policies )
    throws DuplicateName, PolicyError
{
    // XXX ignore policies for now
    add_ior_interceptor( interceptor ) ;
}
 
源代码18 项目: openjdk-jdk8u   文件: ORBInitInfoImpl.java
public void add_ior_interceptor_with_policy (
    IORInterceptor interceptor, Policy[] policies )
    throws DuplicateName, PolicyError
{
    // XXX ignore policies for now
    add_ior_interceptor( interceptor ) ;
}
 
源代码19 项目: openjdk-jdk8u   文件: ORBInitInfoImpl.java
public void add_client_request_interceptor_with_policy (
    ClientRequestInterceptor interceptor, Policy[] policies )
    throws DuplicateName
{
    // XXX ignore policies for now
    add_client_request_interceptor( interceptor ) ;
}
 
源代码20 项目: jdk8u60   文件: ORBInitInfoImpl.java
public void add_ior_interceptor_with_policy (
    IORInterceptor interceptor, Policy[] policies )
    throws DuplicateName, PolicyError
{
    // XXX ignore policies for now
    add_ior_interceptor( interceptor ) ;
}
 
源代码21 项目: JDKSourceCode1.8   文件: ORBInitInfoImpl.java
public void add_client_request_interceptor_with_policy (
    ClientRequestInterceptor interceptor, Policy[] policies )
    throws DuplicateName
{
    // XXX ignore policies for now
    add_client_request_interceptor( interceptor ) ;
}
 
源代码22 项目: JDKSourceCode1.8   文件: ORBInitInfoImpl.java
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 ) ;
}
 
源代码23 项目: openjdk-jdk8u   文件: ZeroPortPolicy.java
public org.omg.CORBA.Policy copy ()
{
    return this ;
}
 
源代码24 项目: openjdk-jdk8u   文件: ServantCachingPolicy.java
public org.omg.CORBA.Policy copy ()
{
    return this ;
}
 
public org.omg.CORBA.Policy copy ()
{
    return this ;
}
 
源代码26 项目: JDKSourceCode1.8   文件: ClientRequestInfoImpl.java
/**
 * Returns the given policy in effect for this operation.
 */
public Policy get_request_policy (int type){
    checkAccess( MID_GET_REQUEST_POLICY );
    // _REVISIT_ Our ORB is not policy-based at this time.
    throw wrapper.piOrbNotPolicyBased() ;
}
 
源代码27 项目: jdk1.8-source-analysis   文件: StubWrapper.java
public Policy _get_policy(int policy_type)
{
    return object._get_policy( policy_type ) ;
}
 
源代码28 项目: jdk1.8-source-analysis   文件: POAImpl.java
/**
 * <code>create_POA</code>
 * <b>Section 3.3.8.2</b>
 */
public POA create_POA(String name, POAManager
    theManager, Policy[] policies) throws AdapterAlreadyExists,
    InvalidPolicy
{
    try {
        lock() ;

        if (debug) {
            ORBUtility.dprint( this, "Calling create_POA(name=" + name +
                " theManager=" + theManager + " policies=" + policies +
                ") on poa " + this ) ;
        }

        // We cannot create children of a POA that is (being) destroyed.
        // This has been added to the CORBA 3.0 spec.
        if (state > STATE_RUN)
            throw omgLifecycleWrapper().createPoaDestroy() ;

        POAImpl poa = (POAImpl)(children.get(name)) ;

        if (poa == null) {
            poa = new POAImpl( name, this, getORB(), STATE_START ) ;
        }

        try {
            poa.lock() ;

            if (debug) {
                ORBUtility.dprint( this,
                    "Calling create_POA: new poa is " + poa ) ;
            }

            if ((poa.state != STATE_START) && (poa.state != STATE_INIT))
                throw new AdapterAlreadyExists();

            POAManagerImpl newManager = (POAManagerImpl)theManager ;
            if (newManager == null)
                newManager = new POAManagerImpl( manager.getFactory(),
                    manager.getPIHandler() );

            int defaultCopierId =
                getORB().getCopierManager().getDefaultId() ;
            Policies POAPolicies =
                new Policies( policies, defaultCopierId ) ;

            poa.initialize( newManager, POAPolicies ) ;

            return poa;
        } finally {
            poa.unlock() ;
        }
    } finally {
        unlock() ;
    }
}
 
源代码29 项目: jdk1.8-source-analysis   文件: POAImpl.java
public Policy getEffectivePolicy( int type )
{
    return mediator.getPolicies().get_effective_policy( type ) ;
}
 
/**
 * Returns the given policy in effect for this operation.
 */
public Policy get_request_policy (int type){
    checkAccess( MID_GET_REQUEST_POLICY );
    // _REVISIT_ Our ORB is not policy-based at this time.
    throw wrapper.piOrbNotPolicyBased() ;
}
 
 类所在包
 类方法
 同包方法