Package org.apache.sandesha2.policy

Examples of org.apache.sandesha2.policy.SandeshaPolicyBean


        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


        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

      boolean responseWritten = TransportUtils.isResponseWritten(msgCtx);
      if (!responseWritten) {       
        sendAck = true;
      }
    } else if (!acksTo.hasAnonymousAddress()) {
      SandeshaPolicyBean policyBean = SandeshaUtil.getPropertyBean (msgCtx.getAxisOperation());
      long ackInterval = policyBean.getAcknowledgementInterval();
     
      ((Sender)storageManager.getSender()).scheduleAddressableAcknowledgement(sequenceId, ackInterval, rmMsgCtx);
     
      // If the MEP doesn't need the backchannel, and nor do we, we should signal it so that it
      // can close off as soon as possible.
View Full Code Here

  public static void setPolicyBean (ServiceClient serviceClient, SandeshaPolicyBean policyBean) throws SandeshaException {
    try {
      AxisService axisService = serviceClient.getAxisService();
      if (axisService!=null) {
        Parameter parameter = axisService.getParameter(Sandesha2Constants.SANDESHA_PROPERTY_BEAN);
        SandeshaPolicyBean parent = null;
        if (parameter==null) {
          parameter = new Parameter ();
          parameter.setName(Sandesha2Constants.SANDESHA_PROPERTY_BEAN);
        } else {
          parameter.setEditable(true); //if we don't do it here, Axis2 will not allow us to override the parameter value.
View Full Code Here

    propertyBean.setEnforceRM(Sandesha2Constants.Properties.DefaultValues.enforceRM);
   
  }

  public static SandeshaPolicyBean loadPropertiesFromModuleDesc(AxisModule desc) throws SandeshaException {
    SandeshaPolicyBean propertyBean = new SandeshaPolicyBean();

    Parameter expoBackoffParam = desc.getParameter(Sandesha2Constants.Properties.ExponentialBackoff);
    String expoBackoffStr = (String) expoBackoffParam.getValue();
    loadExponentialBackoff(expoBackoffStr, propertyBean);
View Full Code Here

        // no RMAssertion found
        if (!found) {
            return null;
        }

        SandeshaPolicyBean propertyBean = (SandeshaPolicyBean) assertion;
        propertyBean.setParent(parentPropertyBean);

        return propertyBean;
    }
View Full Code Here

        if (! found) {
            // no RMAssertion found
            return null;
        }
       
        SandeshaPolicyBean propertyBean = (SandeshaPolicyBean) assertion;
       
        if (propertyBean!=parentPropertyBean) {
          if(parentPropertyBean != null) propertyBean.setParent(parentPropertyBean);
          return propertyBean;
        }
       
        //propertyBean and parent being the same object means that there is no policy in this level, this is simply the reflection of
        //the parent.
View Full Code Here

     
      boolean startPolling = false;
      // We should poll for any reply-to that uses the anonymous URI, when MakeConnection
      // is enabled.
      if (Sandesha2Constants.SPEC_VERSIONS.v1_1.equals(specVersion)) {
        SandeshaPolicyBean policy = SandeshaUtil.getPropertyBean(msgContext.getConfigurationContext().getAxisConfiguration());
        if(policy.isEnableMakeConnection()) {
          EndpointReference reference = rmsBean.getAcksToEndpointReference();
          if(reference == null || reference.hasAnonymousAddress()) {
            rmsBean.setPollingMode(true);
            startPolling = true;
            //ensure addressing is turned on since we require it if we want to use makeConnection
View Full Code Here

    rmsBean.setSequenceID(newOutSequenceId);

    // We should poll for any reply-to that uses the anonymous URI, when MakeConnection
    // is enabled.
    if (Sandesha2Constants.SPEC_VERSIONS.v1_1.equals(createSeqResponseRMMsgCtx.getRMSpecVersion())) {
      SandeshaPolicyBean policy = SandeshaUtil.getPropertyBean(configCtx.getAxisConfiguration());
      if(policy.isEnableMakeConnection()) {
        EndpointReference reference = rmsBean.getAcksToEndpointReference();
        if(reference == null || reference.hasAnonymousAddress()) {
          rmsBean.setPollingMode(true);
        }
      }
View Full Code Here

    rmMsgCtx.setProperty(Sandesha2Constants.MessageContextProperties.INTERNAL_SEQUENCE_ID,internalSequenceID);
    rmMsgCtx.setProperty(Sandesha2Constants.MessageContextProperties.SEQUENCE_ID, sequenceID);
   
    // operation is the lowest level Sandesha2 could be attached.
    SandeshaPolicyBean propertyBean = SandeshaUtil.getPropertyBean(rmMsgCtx.getMessageContext().getAxisOperation());

    retransmitterBean.setSentCount(retransmitterBean.getSentCount() + 1);
    adjustNextRetransmissionTime(retransmitterBean, propertyBean);

    int maxRetransmissionAttempts = propertyBean.getMaximumRetransmissionCount();
   
    // We can only time out sequences if we can identify the correct sequence, and
    // we need the internal sequence id for that.
    boolean continueSending = true;
    if(internalSequenceID != null) {
View Full Code Here

TOP

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

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.