Search in sources :

Example 11 with DestinationPolicyType

use of org.apache.cxf.ws.rm.manager.DestinationPolicyType in project cxf by apache.

the class WSRM12ServerCycleTest method wsrm.

public static RMFeature wsrm(long brtxInterval, long ackInterval) {
    RMAssertion.BaseRetransmissionInterval baseRetransmissionInterval = new RMAssertion.BaseRetransmissionInterval();
    baseRetransmissionInterval.setMilliseconds(Long.valueOf(brtxInterval));
    RMAssertion.AcknowledgementInterval acknowledgementInterval = new RMAssertion.AcknowledgementInterval();
    acknowledgementInterval.setMilliseconds(Long.valueOf(ackInterval));
    RMAssertion rmAssertion = new RMAssertion();
    rmAssertion.setAcknowledgementInterval(acknowledgementInterval);
    rmAssertion.setBaseRetransmissionInterval(baseRetransmissionInterval);
    AcksPolicyType acksPolicy = new AcksPolicyType();
    acksPolicy.setIntraMessageThreshold(0);
    DestinationPolicyType destinationPolicy = new DestinationPolicyType();
    destinationPolicy.setAcksPolicy(acksPolicy);
    RMFeature feature = new RMFeature();
    feature.setRMAssertion(rmAssertion);
    feature.setDestinationPolicy(destinationPolicy);
    feature.setRMNamespace(RM11Constants.NAMESPACE_URI);
    return feature;
}
Also used : AcksPolicyType(org.apache.cxf.ws.rm.manager.AcksPolicyType) RMAssertion(org.apache.cxf.ws.rmp.v200502.RMAssertion) RMFeature(org.apache.cxf.ws.rm.feature.RMFeature) DestinationPolicyType(org.apache.cxf.ws.rm.manager.DestinationPolicyType)

Aggregations

DestinationPolicyType (org.apache.cxf.ws.rm.manager.DestinationPolicyType)11 Message (org.apache.cxf.message.Message)7 AcksPolicyType (org.apache.cxf.ws.rm.manager.AcksPolicyType)7 CreateSequenceResponseType (org.apache.cxf.ws.rm.v200502.CreateSequenceResponseType)4 Expires (org.apache.cxf.ws.rm.v200502.Expires)4 Test (org.junit.Test)3 Date (java.util.Date)2 SequenceTerminationPolicyType (org.apache.cxf.ws.rm.manager.SequenceTerminationPolicyType)2 SourcePolicyType (org.apache.cxf.ws.rm.manager.SourcePolicyType)2 PostConstruct (javax.annotation.PostConstruct)1 JMException (javax.management.JMException)1 Duration (javax.xml.datatype.Duration)1 Bus (org.apache.cxf.Bus)1 SpringBusFactory (org.apache.cxf.bus.spring.SpringBusFactory)1 InstrumentationManager (org.apache.cxf.management.InstrumentationManager)1 Exchange (org.apache.cxf.message.Exchange)1 AddressingProperties (org.apache.cxf.ws.addressing.AddressingProperties)1 DeliveryAssurance (org.apache.cxf.ws.rm.RMConfiguration.DeliveryAssurance)1 RMFeature (org.apache.cxf.ws.rm.feature.RMFeature)1 RetryPolicyType (org.apache.cxf.ws.rm.manager.RetryPolicyType)1