Package org.omg.CORBA

Examples of org.omg.CORBA.Policy


            if (transportMech instanceof TSSSSLTransportConfig) {
                Any any = orb.create_any();
                any.insert_boolean(true);

                try {
                    Policy portPolicy = orb.create_policy(ZERO_PORT_POLICY_ID.value, any);
                    Policy[] overrides = new Policy [] { portPolicy };
                    server.setPolicyOverrides(overrides);
                } catch (org.omg.CORBA.PolicyError e) {
                    // shouldn't happen, but we'll let things continue with no policy set.
                }
View Full Code Here


            if (transportMech instanceof TSSSSLTransportConfig) {
                Any any = orb.create_any();
                any.insert_boolean(true);

                try {
                    Policy portPolicy = orb.create_policy(ZERO_PORT_POLICY_ID.value, any);
                    Policy[] overrides = new Policy [] { portPolicy };
                    server.setPolicyOverrides(overrides);
                } catch (org.omg.CORBA.PolicyError e) {
                    // shouldn't happen, but we'll let things continue with no policy set.
                }
View Full Code Here

            if (iorSecurityConfigMetaData != null) {

                // Create csiv2Policy for both home and remote containing IorSecurityConfigMetadata.
                final Any secPolicy = orb.create_any();
                secPolicy.insert_Value(iorSecurityConfigMetaData);
                Policy csiv2Policy = orb.create_policy(CSIv2Policy.TYPE, secPolicy);
                policyList.add(csiv2Policy);

                // Create SSLPolicy (SSL_REQUIRED ensures home and remote IORs will have port 0 in the primary address).
                boolean sslRequired = false;
                if (iorSecurityConfigMetaData != null) {
                    IORTransportConfigMetaData tc = iorSecurityConfigMetaData.getTransportConfig();
                    sslRequired = IORTransportConfigMetaData.INTEGRITY_REQUIRED.equals(tc.getIntegrity())
                            || IORTransportConfigMetaData.CONFIDENTIALITY_REQUIRED.equals(tc.getConfidentiality())
                            || IORTransportConfigMetaData.ESTABLISH_TRUST_IN_CLIENT_REQUIRED.equals(tc.getEstablishTrustInClient());
                }
                final Any sslPolicyValue = orb.create_any();
                SSLPolicyValueHelper.insert(sslPolicyValue, (sslRequired) ? SSLPolicyValue.SSL_REQUIRED : SSLPolicyValue.SSL_NOT_REQUIRED);
                Policy sslPolicy = orb.create_policy(SSL_POLICY_TYPE.value, sslPolicyValue);
                policyList.add(sslPolicy);

                EjbLogger.ROOT_LOGGER.debug("container's SSL policy: " + sslPolicy);
            }
View Full Code Here

                MinorCodes.NO_SUCH_POLICY,
                CompletionStatus.COMPLETED_MAYBE
            );
        }

        Policy policy = null;
        if (policy_overrides != null)
        {
            policy = (Policy)policy_overrides.get (new Integer(type));
        }
        return (policy != null) ? policy : poa.getPolicy(type);
View Full Code Here

    {
        if (logger.isDebugEnabled())
            logger.debug("receive_request_service_contexts for " + ri.operation());

          // First check whether the target is interested in SAS at all
          Policy targetSasPolicy = null;
          try {
            targetSasPolicy = ri.get_server_policy(SAS_POLICY_TYPE.value);
          }
          catch(Exception ex) {
          }
View Full Code Here

     */

    public org.omg.CORBA.Policy get_policy( org.omg.CORBA.Object self,
                                            int policy_type )
    {
        Policy result = get_client_policy(policy_type);
        if (result != null)
        {
            // TODO: "reconcile" with server-side policy
            return result;
        }
View Full Code Here

     * at the thread-level)
     */

    public org.omg.CORBA.Policy get_client_policy(int policy_type)
    {
        Policy result = null;

        if (policy_overrides != null)
        {
            Integer key = ObjectUtil.newInteger(policy_type);
            result = (Policy)policy_overrides.get(key);
View Full Code Here

        }
    } // get_policy

    public UtcT getRequestEndTime()
    {
        Policy policy = get_client_policy(REQUEST_END_TIME_POLICY_TYPE.value);
        if (policy != null)
        {
            return ((org.omg.Messaging.RequestEndTimePolicy)policy).end_time();
        }
        return null;
View Full Code Here

        return null;
    }

    public UtcT getReplyEndTime()
    {
        Policy policy = get_client_policy (REPLY_END_TIME_POLICY_TYPE.value);
        if (policy != null)
        {
            return ((org.omg.Messaging.ReplyEndTimePolicy)policy).end_time();
        }
        return null;
View Full Code Here

        return null;
    }

    public UtcT getRequestStartTime()
    {
        Policy policy = get_client_policy (REQUEST_START_TIME_POLICY_TYPE.value);
        if (policy != null)
        {
            return ((org.omg.Messaging.RequestStartTimePolicy)policy).start_time();
        }
        return null;
View Full Code Here

TOP

Related Classes of org.omg.CORBA.Policy

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.