Java 类org.omg.CORBA.PolicyError 实例源码

项目:TIDorbJ    文件:PolicyContext.java   
/**
 *  Reads the policies as a pair PolicyType/encapsuled policy data
 * @param input
 */
public void partialRead(CDRInputStream input)
{        
    int size = input.read_ulong();

    Policy policy = null;
    for (int i = 0; i< size; i++) {
        policy = PolicyFactory.readPolicy(input);
        if(policy != null) {            
            try {
                setPolicy(policy);
            }
            catch (PolicyError e) {//unreachable
            }
        }
    }        
}
项目:TIDorbJ    文件:ConfORB.java   
/**
 * Parse the ORB nominal Bidirectional Policy.
 * 
 * @param str
 *            the policy value.
 * @pre Values must be "NORMAL", "BOTH".
 * @exception org.omg.CORBA.INITIALIZE
 *                if the string does not contains a valid value.
 */
//TODO: remove iiop, this is por ORB's policy manager...
public void parse_bidirectional(String str)
{
    if (str == null)
        return;

    short value = 0;

    if (str.equals("NORMAL")) {
        return;
    } else if (str.equals("BOTH")) {
        try {
            policy_context.setPolicy(
               new BidirectionalPolicyImpl(org.omg.BiDirPolicy.BOTH.value));
        }
        catch (PolicyError pe) {}
    } else {
        throw new org.omg.CORBA.INITIALIZE("Invalid value"
                                           + bidirectional_name 
                                           + "=" + str);
    }
}
项目:TIDorbJ    文件:ConfORB.java   
/**
 * Parse the max_blocked_time value.
 * 
 * @param str
 *            the value digits.
 * @pre Values must be >= 0.
 * @exception org.omg.CORBA.INITIALIZE
 *                if the string does not contains a valid value.
 */
public void parse_max_blocked_time(String str)
{
    if (str == null)
        return;

    long value = parse_long(max_blocked_time_name, str);

    if (value < 0)
        throw new INITIALIZE(max_blocked_time_name + ":invalid value "
                             + value + " (minimum blocked 0)");

    if (value != DEFAULT_MAX_BLOCKED_TIME) {
        // converts to TimeT (from ms to units of 100 ns)
        value = UTC.toTimeT(value);
        try {
            policy_context.setPolicy(
                new RelativeRoundtripTimeoutPolicyImpl(value));
        }
        catch (PolicyError pe) {}
        max_blocked_time = value;
    }

}
项目:TIDorbJ    文件:BidirectionalPolicyImpl.java   
public static BidirectionalPolicyImpl createPolicy(Any val)
    throws org.omg.CORBA.PolicyError
{
    try {
        short policy_value = BidirectionalPolicyValueHelper.extract(val);

        if ((policy_value != org.omg.BiDirPolicy.BOTH.value)
            && (policy_value != org.omg.BiDirPolicy.NORMAL.value))
            throw new PolicyError(BAD_POLICY_VALUE.value);

        return new BidirectionalPolicyImpl(policy_value);

    }
    catch (BAD_PARAM bp) {
        throw new PolicyError(BAD_POLICY_VALUE.value);
    }
}
项目:OpenJSharp    文件: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 ) ;
}
项目:OpenJSharp    文件: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 ) ;
}
项目:openjdk-jdk10    文件: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 ) ;
}
项目:openjdk-jdk10    文件: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 ) ;
}
项目:openjdk9    文件: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 ) ;
}
项目:openjdk9    文件: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 ) ;
}
项目:lookaside_java-1.8.0-openjdk    文件: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 ) ;
}
项目:lookaside_java-1.8.0-openjdk    文件: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 ) ;
}
项目:jdk8u_corba    文件: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 ) ;
}
项目:jdk8u_corba    文件: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 ) ;
}
项目:javify    文件:ORB_1_4.java   
/**
 * Create policy using the previously registered factory.
 */
public Policy create_policy(int type, Any value)
  throws PolicyError
{
  Integer policy = new Integer(type);

  PolicyFactory forge = (PolicyFactory) policyFactories.get(policy);
  if (forge == null)
    throw new PolicyError("No factory registered for policy " + type,
      (short) type);
  else
    return forge.create_policy(type, value);
}
项目:jvm-stm    文件:ORB_1_4.java   
/**
 * Create policy using the previously registered factory.
 */
public Policy create_policy(int type, Any value)
  throws PolicyError
{
  Integer policy = new Integer(type);

  PolicyFactory forge = (PolicyFactory) policyFactories.get(policy);
  if (forge == null)
    throw new PolicyError("No factory registered for policy " + type,
      (short) type);
  else
    return forge.create_policy(type, value);
}
项目:infobip-open-jdk-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 ) ;
}
项目:infobip-open-jdk-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 ) ;
}
项目:openjdk-source-code-learn    文件: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 ) ;
}
项目:openjdk-source-code-learn    文件: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 ) ;
}
项目:OLD-OpenJDK8    文件: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 ) ;
}
项目:OLD-OpenJDK8    文件: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 ) ;
}
项目:JamVM-PH    文件:ORB_1_4.java   
/**
 * Create policy using the previously registered factory.
 */
public Policy create_policy(int type, Any value)
  throws PolicyError
{
  Integer policy = new Integer(type);

  PolicyFactory forge = (PolicyFactory) policyFactories.get(policy);
  if (forge == null)
    throw new PolicyError("No factory registered for policy " + type,
      (short) type);
  else
    return forge.create_policy(type, value);
}
项目:openjdk-orb    文件: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 ) ;
}
项目:openjdk-orb    文件: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 ) ;
}
项目:classpath    文件:ORB_1_4.java   
/**
 * Create policy using the previously registered factory.
 */
public Policy create_policy(int type, Any value)
  throws PolicyError
{
  Integer policy = new Integer(type);

  PolicyFactory forge = (PolicyFactory) policyFactories.get(policy);
  if (forge == null)
    throw new PolicyError("No factory registered for policy " + type,
      (short) type);
  else
    return forge.create_policy(type, value);
}
项目:openjdk-icedtea7    文件: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 ) ;
}
项目:openjdk-icedtea7    文件: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 ) ;
}
项目:TIDorbJ    文件:ThreadPolicyImpl.java   
public static ThreadPolicyImpl createPolicy(Any val)
    throws org.omg.CORBA.PolicyError
{
    try {
        ThreadPolicyValue value = ThreadPolicyValueHelper.extract(val);
        return new ThreadPolicyImpl(value);
    }
    catch (BAD_PARAM bp) {
        throw new PolicyError(BAD_POLICY_VALUE.value);
    }
}
项目:TIDorbJ    文件:RequestProcessingPolicyImpl.java   
public static RequestProcessingPolicyImpl createPolicy(Any val)
    throws org.omg.CORBA.PolicyError
{
    try {
        RequestProcessingPolicyValue value = 
            RequestProcessingPolicyValueHelper.extract(val);
        return new RequestProcessingPolicyImpl(value);
    }
    catch (BAD_PARAM bp) {
        throw new PolicyError(BAD_POLICY_VALUE.value);
    }
}
项目:TIDorbJ    文件:LifespanPolicyImpl.java   
public static LifespanPolicyImpl createPolicy(Any val)
    throws org.omg.CORBA.PolicyError
{
    try {
        LifespanPolicyValue value = LifespanPolicyValueHelper.extract(val);
        return new LifespanPolicyImpl(value);
    }
    catch (BAD_PARAM bp) {
        throw new PolicyError(BAD_POLICY_VALUE.value);
    }
}
项目:TIDorbJ    文件:IdAssignmentPolicyImpl.java   
public static IdAssignmentPolicyImpl createPolicy(Any val)
    throws org.omg.CORBA.PolicyError
{
    try {
        IdAssignmentPolicyValue value = 
            IdAssignmentPolicyValueHelper.extract(val);
        return new IdAssignmentPolicyImpl(value);
    }
    catch (BAD_PARAM bp) {
        throw new PolicyError(BAD_POLICY_VALUE.value);
    }
}
项目:TIDorbJ    文件:IdUniquenessPolicyImpl.java   
public static IdUniquenessPolicyImpl createPolicy(Any val)
   throws org.omg.CORBA.PolicyError
{
    try {
        IdUniquenessPolicyValue value = 
            IdUniquenessPolicyValueHelper.extract(val);
        return new IdUniquenessPolicyImpl(value);
    }
    catch (BAD_PARAM bp) {
        throw new PolicyError(BAD_POLICY_VALUE.value);
    }
}
项目:TIDorbJ    文件:ImplicitActivationPolicyImpl.java   
public static ImplicitActivationPolicyImpl createPolicy(Any val)
    throws org.omg.CORBA.PolicyError
{
    try {
        ImplicitActivationPolicyValue value = 
            ImplicitActivationPolicyValueHelper.extract(val);
        return new ImplicitActivationPolicyImpl(value);
    }
    catch (BAD_PARAM bp) {
        throw new PolicyError(BAD_POLICY_VALUE.value);
    }
}
项目:TIDorbJ    文件:ServantRetentionPolicyImpl.java   
public static ServantRetentionPolicyImpl createPolicy (Any val)
    throws org.omg.CORBA.PolicyError
{
    try {
        ServantRetentionPolicyValue value = 
            ServantRetentionPolicyValueHelper.extract(val);
        return new ServantRetentionPolicyImpl(value);
    }
    catch (BAD_PARAM bp) {
        throw new PolicyError(BAD_POLICY_VALUE.value);
    }
}
项目:TIDorbJ    文件:CompressionLowValuePolicyImpl.java   
/**
 * <code>createPolicy</code> create a new CompressionLowValuePolicyImpl.
 *
 * @param val an <code>Any</code> value
 * @return a <code>CompressionLowValuePolicyImpl</code> value
 * @exception org.omg.CORBA.PolicyError if an error occurs
 */
public static CompressionLowValuePolicyImpl createPolicy(Any val)
    throws org.omg.CORBA.PolicyError
{
    try {
        int policy_value = 
            CompressionLowValuePolicyValueHelper.extract(val);

        return new CompressionLowValuePolicyImpl(policy_value);

    }
    catch (BAD_PARAM bp) {
        throw new PolicyError(BAD_POLICY_VALUE.value);
    }
}
项目:TIDorbJ    文件:CompressorIdLevelListPolicyImpl.java   
/**
 * <code>createPolicy</code> .
 *
 * @param val an <code>Any</code> value
 * @return a <code>CompressorIdLevelListPolicyImpl</code> value
 * @exception org.omg.CORBA.PolicyError if an error occurs
 */
public static CompressorIdLevelListPolicyImpl createPolicy(Any val)
    throws org.omg.CORBA.PolicyError
{
    try {
        CompressorIdLevel[] policy_value = 
            CompressorIdLevelListHelper.extract(val);

        return new CompressorIdLevelListPolicyImpl(policy_value);

    }
    catch (BAD_PARAM bp) {
        throw new PolicyError(BAD_POLICY_VALUE.value);
    }
}
项目:TIDorbJ    文件:CompressionMinRatioPolicyImpl.java   
/**
 * <code>createPolicy</code> .
 *
 * @param val an <code>Any</code> value
 * @return a <code>CompressionMinRatioPolicyImpl</code> value
 * @exception org.omg.CORBA.PolicyError if an error occurs
 */
public static CompressionMinRatioPolicyImpl createPolicy(Any val)
    throws org.omg.CORBA.PolicyError
{
    try {
        float policy_value = 
            CompressionMinRatioPolicyValueHelper.extract(val);

        return new CompressionMinRatioPolicyImpl(policy_value);

    }
    catch (BAD_PARAM bp) {
        throw new PolicyError(BAD_POLICY_VALUE.value);
    }
}
项目:TIDorbJ    文件:CompressionEnablingPolicyImpl.java   
/**
 * Describe <code>createPolicy</code> method here.
 *
 * @param val an <code>Any</code> value
 * @return a <code>CompressionEnablingPolicyImpl</code> value
 * @exception org.omg.CORBA.PolicyError if an error occurs
 */
public static CompressionEnablingPolicyImpl createPolicy(Any val)
    throws org.omg.CORBA.PolicyError
{
    try {
        boolean policy_value = 
            CompressionEnablingPolicyValueHelper.extract(val);

        return new CompressionEnablingPolicyImpl(policy_value);

    }
    catch (BAD_PARAM bp) {
        throw new PolicyError(BAD_POLICY_VALUE.value);
    }
}
项目:TIDorbJ    文件:PolicyContext.java   
public synchronized void setPolicies(Policy[] policies,
                                     SetOverrideType set_add)
    throws org.omg.CORBA.InvalidPolicies
{

    if (set_add == SetOverrideType.SET_OVERRIDE) {
        clear();
    }

    java.util.Vector errors = null;

    for (short i = 0; i < policies.length; i++) {
        try {
            setPolicy(policies[i]);
        }
        catch (PolicyError pe) {
            if (errors == null)
                errors = new java.util.Vector();
            errors.add(new Short(i));
        }
    }

    if (errors != null) {
        InvalidPolicies ex = new InvalidPolicies();

        int size = errors.size();

        ex.indices = new short[size];

        for (int i = 0; i < size; i++)
            ex.indices[i] = ((Short) errors.elementAt(i)).shortValue();

        throw ex;
    }

}