Examples of PolicyError


Examples of org.omg.CORBA.PolicyError

public class ServerPolicyFactory extends LocalObject implements PolicyFactory {

    public final static int POLICY_TYPE = 0x41534600;

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

        return new ServerPolicy((ServerPolicy.Config) value.extract_Value());
    }
View Full Code Here

Examples of org.omg.CORBA.PolicyError

public class ClientPolicyFactory extends LocalObject implements PolicyFactory {

    public final static int POLICY_TYPE = 0x41534601;

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

        return new ClientPolicy((CSSConfig) value.extract_Value());
    }
View Full Code Here

Examples of org.omg.CORBA.PolicyError

public class ClientTransactionPolicyFactory extends LocalObject implements PolicyFactory {
    public final static int POLICY_TYPE = 0x41534603;

    public Policy create_policy(int type, Any value) throws PolicyError {
        if (type != POLICY_TYPE){
            throw new PolicyError();
        }
        return new ClientTransactionPolicy(((ClientTransactionPolicyConfig)value.extract_Value()));
    }
View Full Code Here

Examples of org.omg.CORBA.PolicyError

public class ServerTransactionPolicyFactory extends LocalObject implements PolicyFactory {
    public final static int POLICY_TYPE = 0x41534602;

    public Policy create_policy(int type, Any value) throws PolicyError {
        if (type != POLICY_TYPE){
            throw new PolicyError();
        }
        return new ServerTransactionPolicy((ServerTransactionPolicyConfig) value.extract_Value());
    }
View Full Code Here

Examples of org.omg.CORBA.PolicyError

    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

Examples of org.omg.CORBA.PolicyError

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

        return new BiDirPolicyImpl( BidirectionalPolicyValueHelper.extract( value ));
    }
View Full Code Here

Examples of org.omg.CORBA.PolicyError

{
    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

Examples of org.omg.CORBA.PolicyError

{
     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

Examples of org.omg.CORBA.PolicyError

    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

Examples of org.omg.CORBA.PolicyError

    }

    @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
TOP
Copyright © 2018 www.massapi.com. 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.