Package org.apache.sandesha2.policy

Examples of org.apache.sandesha2.policy.PolicyEngineData


      logger.debug(rmpt.getTokenName());

    case RMProcessorContext.COMMIT:

      // ////////////////////
      PolicyEngineData ped = rmpc.readCurrentPolicyEngineData();
      String text = rmpc.getAssertion().getStrValue();
      ped.setMessageTypesToDrop(text);
      // ////////////////////

      break;
    case RMProcessorContext.ABORT:
      break;
View Full Code Here


    }

    processor.processPolicy(policy);

    RMProcessorContext ctx = processor.getContext();
    PolicyEngineData data = ctx.readCurrentPolicyEngineData();

   
    if (data.isAcknowledgementIntervalSet())
      propertyBean.setAcknowledgementInterval(data.getAcknowledgementInterval());
    else
      propertyBean.setAcknowledgementInterval(parentPropertyBean.getAcknowledgementInaterval());
   
    if (data.isExponentialBackoffSet())
      propertyBean.setExponentialBackoff(data.isExponentialBackoff());
    else
      propertyBean.setExponentialBackoff(parentPropertyBean.isExponentialBackoff());
   
    //Inactivity timeout given in the policy will affect only if it gives both the measure and the value.
    //Otherwise value will be taken from the parent.
    if (data.isInactivityTimeoutSet() && data.isInactivityTimeoutMeassureSet() )
      propertyBean.setInactiveTimeoutInterval(data.getInactivityTimeout(),data.getInactivityTimeoutMeassure());
    else
      propertyBean.setInactiveTimeoutInterval(parentPropertyBean.getInactiveTimeoutInterval());
   
    if (data.isInvokeInOrderSet())
      propertyBean.setInOrder(data.isInvokeInOrder());
    else
      propertyBean.setInOrder(parentPropertyBean.isInOrder());
   
    if (data.isMaximumRetransmissionCountSet())
      propertyBean.setMaximumRetransmissionCount(data.getMaximumRetransmissionCount());
    else
      propertyBean.setMaximumRetransmissionCount(parentPropertyBean.getMaximumRetransmissionCount());
   
    if (data.isRetransmissionIntervalSet())
      propertyBean.setRetransmissionInterval(data.getRetransmissionInterval());
    else
      propertyBean.setRetransmissionInterval(parentPropertyBean.getRetransmissionInterval());
     
    if (data.isStorageManagerSet())
      propertyBean.setStorageManagerClass(data.getStorageManager());
    else
      propertyBean.setStorageManagerClass(data.getStorageManager());
   
    if (data.isMessageTypesToDropSet())
      loadMessageTypesToDrop(data.getMessageTypesToDrop(),propertyBean);
    else
      propertyBean.setMsgTypesToDrop(parentPropertyBean.getMsgTypesToDrop());
   
    return propertyBean;
  }
View Full Code Here

    }

    processor.processPolicy(policy);

    RMProcessorContext ctx = processor.getContext();
    PolicyEngineData data = ctx.readCurrentPolicyEngineData();

    if (data.isAcknowledgementIntervalSet())
      propertyBean.setAcknowledgementInterval(data.getAcknowledgementInterval());
    else
      propertyBean.setAcknowledgementInterval(parentPropertyBean.getAcknowledgementInaterval());
   
    if (data.isExponentialBackoffSet())
      propertyBean.setExponentialBackoff(data.isExponentialBackoff());
    else
      propertyBean.setExponentialBackoff(parentPropertyBean.isExponentialBackoff());
   
    //Inactivity timeout given in the policy will affect only if it gives both the measure and the value.
    //Otherwise value will be taken from the parent.
    if (data.isInactivityTimeoutSet() && data.isInactivityTimeoutMeassureSet() )
      propertyBean.setInactiveTimeoutInterval(data.getInactivityTimeout(),data.getInactivityTimeoutMeassure());
    else
      propertyBean.setInactiveTimeoutInterval(parentPropertyBean.getInactiveTimeoutInterval());
   
    if (data.isInvokeInOrderSet())
      propertyBean.setInOrder(data.isInvokeInOrder());
    else
      propertyBean.setInOrder(parentPropertyBean.isInOrder());
   
    if (data.isMaximumRetransmissionCountSet())
      propertyBean.setMaximumRetransmissionCount(data.getMaximumRetransmissionCount());
    else
      propertyBean.setMaximumRetransmissionCount(parentPropertyBean.getMaximumRetransmissionCount());
   
    if (data.isRetransmissionIntervalSet())
      propertyBean.setRetransmissionInterval(data.getRetransmissionInterval());
    else
      propertyBean.setRetransmissionInterval(parentPropertyBean.getRetransmissionInterval());
     
    if (data.isStorageManagerSet())
      propertyBean.setStorageManagerClass(data.getStorageManager());
    else
      propertyBean.setStorageManagerClass(data.getStorageManager());
   
    if (data.isMessageTypesToDropSet())
      loadMessageTypesToDrop(data.getMessageTypesToDrop(),propertyBean);
    else
      propertyBean.setMsgTypesToDrop(parentPropertyBean.getMsgTypesToDrop());
   
    return propertyBean;
  }
View Full Code Here

            if (wsRMPolicyKey != null) {
                Object property = synapseOutMessageContext.getEntry(wsRMPolicyKey);
                if (property instanceof OMElement) {
                    OMElement policyOMElement = (OMElement) property;
                    RMAssertionBuilder builder = new RMAssertionBuilder();
                    SandeshaPolicyBean sandeshaPolicyBean = (SandeshaPolicyBean) builder.build(policyOMElement, null);
                    Parameter policyParam = new Parameter(Sandesha2Constants.SANDESHA_PROPERTY_BEAN, sandeshaPolicyBean);
                    anoymousService.addParameter(policyParam);
                }
            }
        }
View Full Code Here

            if (wsRMPolicyKey != null) {
                Object property = synapseOutMessageContext.getEntry(wsRMPolicyKey);
                if (property instanceof OMElement) {
                    OMElement policyOMElement = (OMElement) property;
                    RMAssertionBuilder builder = new RMAssertionBuilder();
                    SandeshaPolicyBean sandeshaPolicyBean = (SandeshaPolicyBean) builder.build(policyOMElement, null);
                    Parameter policyParam = new Parameter(Sandesha2Constants.SANDESHA_PROPERTY_BEAN, sandeshaPolicyBean);
                    anoymousService.addParameter(policyParam);
                }
            }
        }
View Full Code Here

        super(name);
    }

    public void setUp() throws Exception {
        AxisConfiguration axisConfig = new AxisConfiguration();
        SandeshaPolicyBean propertyBean = new SandeshaPolicyBean ();
        Parameter parameter = new Parameter ();
        parameter.setName(Sandesha2Constants.SANDESHA_PROPERTY_BEAN);
        parameter.setValue(propertyBean);
        axisConfig.addParameter(parameter);
       
View Full Code Here

        super("SenderBeanMgrTest");
    }

    public void setUp() throws Exception {
        AxisConfiguration axisConfig = new AxisConfiguration();
        SandeshaPolicyBean propertyBean = new SandeshaPolicyBean ();
        Parameter parameter = new Parameter ();
        parameter.setName(Sandesha2Constants.SANDESHA_PROPERTY_BEAN);
        parameter.setValue(propertyBean);
        axisConfig.addParameter(parameter);
       
View Full Code Here

    try {
      AxisConfiguration axisConfiguration = new AxisConfiguration ();
      ConfigurationContext configurationContext = new ConfigurationContext (axisConfiguration);
     
      //setting a dummy property been to stop Sandesha2 from throwing exceptions.
      SandeshaPolicyBean policyBean = new SandeshaPolicyBean ();
      axisConfiguration.addParameter(new Parameter (Sandesha2Constants.SANDESHA_PROPERTY_BEAN,policyBean));
     
      InMemoryStorageManager storageManager = new InMemoryStorageManager (configurationContext);
     
      Transaction transaction = storageManager.getTransaction();
View Full Code Here

        super ("InvokerBeanMgrTest");
    }

    public void setUp() throws Exception {
        AxisConfiguration axisConfig = new AxisConfiguration();
        SandeshaPolicyBean propertyBean = new SandeshaPolicyBean ();
        Parameter parameter = new Parameter ();
        parameter.setName(Sandesha2Constants.SANDESHA_PROPERTY_BEAN);
        parameter.setValue(propertyBean);
        axisConfig.addParameter(parameter);
       
View Full Code Here

    }

    public void setUp() throws Exception {
     
        AxisConfiguration axisConfig =  new AxisConfiguration();
        SandeshaPolicyBean propertyBean = new SandeshaPolicyBean ();
        Parameter parameter = new Parameter ();
        parameter.setName(Sandesha2Constants.SANDESHA_PROPERTY_BEAN);
        parameter.setValue(propertyBean);
        axisConfig.addParameter(parameter);
       
View Full Code Here

TOP

Related Classes of org.apache.sandesha2.policy.PolicyEngineData

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.