Package org.omg.CORBA

Examples of org.omg.CORBA.PolicyError


    public InvocationPolicyFactory() {}

    public Policy create_policy(int type, Any value) throws PolicyError {

        if (type != INVOCATION_POLICY_TYPE.value) {
            throw new PolicyError("Invalid InvocationPolicyType", (short) 0);
        }

        short policyValue = InvocationPolicyValueHelper.extract(value);

        switch (policyValue) {
        case SHARED.value :
        case UNSHARED.value :
        case EITHER.value :
            break;
        default :
            throw new PolicyError("Invalid InvocationPolicyValue", (short) 1);
        }

        return new InvocationPolicyImpl(policyValue);
    }
View Full Code Here


    public OTSPolicyFactory() {}

    public Policy create_policy(int type, Any value) throws PolicyError {

        if (type != OTS_POLICY_TYPE.value) {
            throw new PolicyError("Invalid OTSPolicyType", (short) 0);
        }

        short policyValue = OTSPolicyValueHelper.extract(value);

        switch (policyValue) {
        case REQUIRES.value :
        case ADAPTS.value :
        case FORBIDS.value :
            break;
        default :
            throw new PolicyError("Invalid OTSPolicyValue", (short) 1);
        }

        return new OTSPolicyImpl(policyValue);
    }
View Full Code Here

    @Override
    public Policy create_policy(int type, Any value)
            throws PolicyError {
        if (type != CodebasePolicy.TYPE) {
            throw new PolicyError();
        }
        String codebase = value.extract_string();
        return new CodebasePolicy(codebase);
    }
View Full Code Here

    }

    @Override
    public Policy create_policy(int type, Any value) throws PolicyError {
        if (type != CSIv2Policy.TYPE) {
            throw new PolicyError();
        }

        // stored as java.io.Serializable - is this a hack?
        IORSecurityConfigMetadata metadata = (IORSecurityConfigMetadata) value.extract_Value();
        return new CSIv2Policy(metadata, codec);
View Full Code Here

    public Policy create_policy( int type, Any value )
        throws PolicyError
    {
        if( type != ATLAS_POLICY_TYPE.value )
            throw new PolicyError();

        return new ATLASPolicyImpl( ATLASPolicyValuesHelper.extract( value ));

    }
View Full Code Here

    public Policy create_policy( int type, Any value )
        throws PolicyError
    {
        if( type != SAS_POLICY_TYPE.value )
            throw new PolicyError();

        return new SASPolicyImpl( SASPolicyValuesHelper.extract( value ));

    }
View Full Code Here

    public Policy create_policy(int type, Any value)
        throws PolicyError
    {
        if (type != SSL_POLICY_TYPE.value)
            throw new PolicyError();

        return new SSLPolicyImpl(SSLPolicyValueHelper.extract(value));

    }
View Full Code Here

    public Policy create_policy( int type, Any any )
        throws PolicyError
    {
        if( type != BIDIRECTIONAL_POLICY_TYPE.value )
        {
            throw new PolicyError("Invalid policy type of " + type,
                                  BAD_POLICY.value );
        }

        short value = BidirectionalPolicyValueHelper.extract( any );

        if( value != NORMAL.value &&
            value != BOTH.value )
        {
            throw new PolicyError("Invalid value for BiDir policy of " + value,
                                  BAD_POLICY_VALUE.value);
        }

        return new BiDirPolicy( value );
    }
View Full Code Here

   public Policy create_policy(int type, Any value)
      throws PolicyError
   {
      if (type != CSIv2Policy.TYPE) {
         throw new PolicyError();
      }
     
      // stored as java.io.Serializable - is this a hack?
      IorSecurityConfigMetaData metadata =
         (IorSecurityConfigMetaData)value.extract_Value();
View Full Code Here

   public Policy create_policy(int type, Any value)
      throws PolicyError
   {
      if (type != CodebasePolicy.TYPE) {
         throw new PolicyError();
      }
      String codebase = value.extract_string();
      return new CodebasePolicy(codebase);
   }
View Full Code Here

TOP

Related Classes of org.omg.CORBA.PolicyError

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.