当前位置: 首页>>代码示例>>Java>>正文


Java PolicyError类代码示例

本文整理汇总了Java中org.omg.CORBA.PolicyError的典型用法代码示例。如果您正苦于以下问题:Java PolicyError类的具体用法?Java PolicyError怎么用?Java PolicyError使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


PolicyError类属于org.omg.CORBA包,在下文中一共展示了PolicyError类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: partialRead

import org.omg.CORBA.PolicyError; //导入依赖的package包/类
/**
 *  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
            }
        }
    }        
}
 
开发者ID:AlvaroVega,项目名称:TIDorbJ,代码行数:21,代码来源:PolicyContext.java

示例2: parse_bidirectional

import org.omg.CORBA.PolicyError; //导入依赖的package包/类
/**
 * 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);
    }
}
 
开发者ID:AlvaroVega,项目名称:TIDorbJ,代码行数:32,代码来源:ConfORB.java

示例3: parse_max_blocked_time

import org.omg.CORBA.PolicyError; //导入依赖的package包/类
/**
 * 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;
    }

}
 
开发者ID:AlvaroVega,项目名称:TIDorbJ,代码行数:33,代码来源:ConfORB.java

示例4: createPolicy

import org.omg.CORBA.PolicyError; //导入依赖的package包/类
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);
    }
}
 
开发者ID:AlvaroVega,项目名称:TIDorbJ,代码行数:18,代码来源:BidirectionalPolicyImpl.java

示例5: add_server_request_interceptor_with_policy

import org.omg.CORBA.PolicyError; //导入依赖的package包/类
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 ) ;
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:8,代码来源:ORBInitInfoImpl.java

示例6: add_ior_interceptor_with_policy

import org.omg.CORBA.PolicyError; //导入依赖的package包/类
public void add_ior_interceptor_with_policy (
    IORInterceptor interceptor, Policy[] policies )
    throws DuplicateName, PolicyError
{
    // XXX ignore policies for now
    add_ior_interceptor( interceptor ) ;
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:8,代码来源:ORBInitInfoImpl.java

示例7: create_policy

import org.omg.CORBA.PolicyError; //导入依赖的package包/类
/**
 * 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);
}
 
开发者ID:vilie,项目名称:javify,代码行数:16,代码来源:ORB_1_4.java

示例8: createPolicy

import org.omg.CORBA.PolicyError; //导入依赖的package包/类
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);
    }
}
 
开发者ID:AlvaroVega,项目名称:TIDorbJ,代码行数:12,代码来源:ThreadPolicyImpl.java

示例9: createPolicy

import org.omg.CORBA.PolicyError; //导入依赖的package包/类
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);
    }
}
 
开发者ID:AlvaroVega,项目名称:TIDorbJ,代码行数:13,代码来源:RequestProcessingPolicyImpl.java

示例10: createPolicy

import org.omg.CORBA.PolicyError; //导入依赖的package包/类
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);
    }
}
 
开发者ID:AlvaroVega,项目名称:TIDorbJ,代码行数:12,代码来源:LifespanPolicyImpl.java

示例11: createPolicy

import org.omg.CORBA.PolicyError; //导入依赖的package包/类
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);
    }
}
 
开发者ID:AlvaroVega,项目名称:TIDorbJ,代码行数:13,代码来源:IdAssignmentPolicyImpl.java

示例12: createPolicy

import org.omg.CORBA.PolicyError; //导入依赖的package包/类
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);
    }
}
 
开发者ID:AlvaroVega,项目名称:TIDorbJ,代码行数:13,代码来源:IdUniquenessPolicyImpl.java

示例13: createPolicy

import org.omg.CORBA.PolicyError; //导入依赖的package包/类
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);
    }
}
 
开发者ID:AlvaroVega,项目名称:TIDorbJ,代码行数:13,代码来源:ImplicitActivationPolicyImpl.java

示例14: createPolicy

import org.omg.CORBA.PolicyError; //导入依赖的package包/类
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);
    }
}
 
开发者ID:AlvaroVega,项目名称:TIDorbJ,代码行数:13,代码来源:ServantRetentionPolicyImpl.java

示例15: createPolicy

import org.omg.CORBA.PolicyError; //导入依赖的package包/类
/**
 * <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);
    }
}
 
开发者ID:AlvaroVega,项目名称:TIDorbJ,代码行数:22,代码来源:CompressionLowValuePolicyImpl.java


注:本文中的org.omg.CORBA.PolicyError类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。