org.omg.CORBA.Policy Java Examples

The following examples show how to use org.omg.CORBA.Policy. 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: NamingContextImpl.java    From openjdk-jdk8u with GNU General Public License v2.0 6 votes vote down vote up
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 ) ;
    }
}
 
Example #2
Source File: NamingContextImpl.java    From jdk1.8-source-analysis with Apache License 2.0 6 votes vote down vote up
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 ) ;
    }
}
 
Example #3
Source File: ServerRequestInfoImpl.java    From jdk1.8-source-analysis with Apache License 2.0 6 votes vote down vote up
/**
 * 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;
}
 
Example #4
Source File: NamingContextImpl.java    From TencentKona-8 with GNU General Public License v2.0 6 votes vote down vote up
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 ) ;
    }
}
 
Example #5
Source File: ServerRequestInfoImpl.java    From TencentKona-8 with GNU General Public License v2.0 6 votes vote down vote up
/**
 * 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;
}
 
Example #6
Source File: ServerRequestInfoImpl.java    From openjdk-jdk8u with GNU General Public License v2.0 6 votes vote down vote up
/**
 * 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;
}
 
Example #7
Source File: NamingContextImpl.java    From jdk8u60 with GNU General Public License v2.0 6 votes vote down vote up
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 ) ;
    }
}
 
Example #8
Source File: ServerRequestInfoImpl.java    From jdk8u60 with GNU General Public License v2.0 6 votes vote down vote up
/**
 * 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;
}
 
Example #9
Source File: NamingContextImpl.java    From JDKSourceCode1.8 with MIT License 6 votes vote down vote up
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 ) ;
    }
}
 
Example #10
Source File: ServerRequestInfoImpl.java    From JDKSourceCode1.8 with MIT License 6 votes vote down vote up
/**
 * 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;
}
 
Example #11
Source File: ORBInitInfoImpl.java    From JDKSourceCode1.8 with MIT License 5 votes vote down vote up
public void add_ior_interceptor_with_policy (
    IORInterceptor interceptor, Policy[] policies )
    throws DuplicateName, PolicyError
{
    // XXX ignore policies for now
    add_ior_interceptor( interceptor ) ;
}
 
Example #12
Source File: ORBInitInfoImpl.java    From jdk1.8-source-analysis with Apache License 2.0 5 votes vote down vote up
public void add_client_request_interceptor_with_policy (
    ClientRequestInterceptor interceptor, Policy[] policies )
    throws DuplicateName
{
    // XXX ignore policies for now
    add_client_request_interceptor( interceptor ) ;
}
 
Example #13
Source File: ORBInitInfoImpl.java    From jdk1.8-source-analysis with Apache License 2.0 5 votes vote down vote up
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 ) ;
}
 
Example #14
Source File: ORBInitInfoImpl.java    From jdk1.8-source-analysis with Apache License 2.0 5 votes vote down vote up
public void add_ior_interceptor_with_policy (
    IORInterceptor interceptor, Policy[] policies )
    throws DuplicateName, PolicyError
{
    // XXX ignore policies for now
    add_ior_interceptor( interceptor ) ;
}
 
Example #15
Source File: ORBInitInfoImpl.java    From TencentKona-8 with GNU General Public License v2.0 5 votes vote down vote up
public void add_client_request_interceptor_with_policy (
    ClientRequestInterceptor interceptor, Policy[] policies )
    throws DuplicateName
{
    // XXX ignore policies for now
    add_client_request_interceptor( interceptor ) ;
}
 
Example #16
Source File: ORBInitInfoImpl.java    From TencentKona-8 with GNU General Public License v2.0 5 votes vote down vote up
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 ) ;
}
 
Example #17
Source File: ORBInitInfoImpl.java    From TencentKona-8 with GNU General Public License v2.0 5 votes vote down vote up
public void add_ior_interceptor_with_policy (
    IORInterceptor interceptor, Policy[] policies )
    throws DuplicateName, PolicyError
{
    // XXX ignore policies for now
    add_ior_interceptor( interceptor ) ;
}
 
Example #18
Source File: ORBInitInfoImpl.java    From openjdk-jdk8u with GNU General Public License v2.0 5 votes vote down vote up
public void add_ior_interceptor_with_policy (
    IORInterceptor interceptor, Policy[] policies )
    throws DuplicateName, PolicyError
{
    // XXX ignore policies for now
    add_ior_interceptor( interceptor ) ;
}
 
Example #19
Source File: ORBInitInfoImpl.java    From openjdk-jdk8u with GNU General Public License v2.0 5 votes vote down vote up
public void add_client_request_interceptor_with_policy (
    ClientRequestInterceptor interceptor, Policy[] policies )
    throws DuplicateName
{
    // XXX ignore policies for now
    add_client_request_interceptor( interceptor ) ;
}
 
Example #20
Source File: ORBInitInfoImpl.java    From jdk8u60 with GNU General Public License v2.0 5 votes vote down vote up
public void add_ior_interceptor_with_policy (
    IORInterceptor interceptor, Policy[] policies )
    throws DuplicateName, PolicyError
{
    // XXX ignore policies for now
    add_ior_interceptor( interceptor ) ;
}
 
Example #21
Source File: ORBInitInfoImpl.java    From JDKSourceCode1.8 with MIT License 5 votes vote down vote up
public void add_client_request_interceptor_with_policy (
    ClientRequestInterceptor interceptor, Policy[] policies )
    throws DuplicateName
{
    // XXX ignore policies for now
    add_client_request_interceptor( interceptor ) ;
}
 
Example #22
Source File: ORBInitInfoImpl.java    From JDKSourceCode1.8 with MIT License 5 votes vote down vote up
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 ) ;
}
 
Example #23
Source File: ZeroPortPolicy.java    From openjdk-jdk8u with GNU General Public License v2.0 4 votes vote down vote up
public org.omg.CORBA.Policy copy ()
{
    return this ;
}
 
Example #24
Source File: ServantCachingPolicy.java    From openjdk-jdk8u with GNU General Public License v2.0 4 votes vote down vote up
public org.omg.CORBA.Policy copy ()
{
    return this ;
}
 
Example #25
Source File: ServantCachingPolicy.java    From jdk1.8-source-analysis with Apache License 2.0 4 votes vote down vote up
public org.omg.CORBA.Policy copy ()
{
    return this ;
}
 
Example #26
Source File: ClientRequestInfoImpl.java    From JDKSourceCode1.8 with MIT License 4 votes vote down vote up
/**
 * 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() ;
}
 
Example #27
Source File: StubWrapper.java    From jdk1.8-source-analysis with Apache License 2.0 4 votes vote down vote up
public Policy _get_policy(int policy_type)
{
    return object._get_policy( policy_type ) ;
}
 
Example #28
Source File: POAImpl.java    From jdk1.8-source-analysis with Apache License 2.0 4 votes vote down vote up
/**
 * <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() ;
    }
}
 
Example #29
Source File: POAImpl.java    From jdk1.8-source-analysis with Apache License 2.0 4 votes vote down vote up
public Policy getEffectivePolicy( int type )
{
    return mediator.getPolicies().get_effective_policy( type ) ;
}
 
Example #30
Source File: ClientRequestInfoImpl.java    From jdk1.8-source-analysis with Apache License 2.0 4 votes vote down vote up
/**
 * 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() ;
}