Examples of RMProperties


Examples of org.objectweb.celtix.ws.rm.RMProperties

        sb = new SOAPBindingImpl(false);
        ObjectMessageContext objectCtx = new ObjectMessageContextImpl();
        SOAPMessageContext context = (SOAPMessageContext)sb.createBindingMessageContext(objectCtx);
        sb.read(istreamCtx, context);
        assertTrue(codec.handleMessage(context));
        RMProperties rmps = RMContextUtils.retrieveRMProperties(context, false);
        SequenceType st = rmps.getSequence();
        assertNotNull(st);
        assertEquals(st.getIdentifier().getValue(), SEQ_IDENTIFIER);
        assertEquals(st.getMessageNumber(), MSG1_MESSAGE_NUMBER);
       
        assertNull(rmps.getAcks());
        assertNull(rmps.getAcksRequested());

    }
View Full Code Here

Examples of org.objectweb.celtix.ws.rm.RMProperties

        ObjectMessageContext objectCtx = new ObjectMessageContextImpl();
        SOAPMessageContext context = (SOAPMessageContext)sb.createBindingMessageContext(objectCtx);
        sb.read(istreamCtx, context);
       
        assertTrue(codec.handleMessage(context));
        RMProperties rmps = RMContextUtils.retrieveRMProperties(context, false);
        Collection<SequenceAcknowledgement> acks = rmps.getAcks();
        assertNotNull(acks);
        assertEquals(1, acks.size());
        SequenceAcknowledgement ack = acks.iterator().next();
        assertNotNull(ack);
        assertEquals(ack.getIdentifier().getValue(), SEQ_IDENTIFIER);
        assertEquals(2, ack.getAcknowledgementRange().size());
        assertNull(rmps.getSequence());
        assertNull(rmps.getAcksRequested());
    }
View Full Code Here

Examples of org.objectweb.celtix.ws.rm.RMProperties

        ObjectMessageContext objectCtx = new ObjectMessageContextImpl();
        SOAPMessageContext context = (SOAPMessageContext)sb.createBindingMessageContext(objectCtx);
        sb.read(istreamCtx, context);
       
        assertTrue(codec.handleMessage(context));
        RMProperties rmps = RMContextUtils.retrieveRMProperties(context, false);
        Collection<AckRequestedType> requested = rmps.getAcksRequested();
        assertNotNull(requested);
        assertEquals(1, requested.size());
        AckRequestedType ar = requested.iterator().next();
        assertNotNull(ar);
        assertEquals(ar.getIdentifier().getValue(), SEQ_IDENTIFIER);

        SequenceType s = rmps.getSequence();
        assertNotNull(s);
        assertEquals(s.getIdentifier().getValue(), SEQ_IDENTIFIER);
        assertEquals(s.getMessageNumber(), MSG2_MESSAGE_NUMBER);

        assertNull(rmps.getAcks());
    }
View Full Code Here

Examples of org.objectweb.celtix.ws.rm.RMProperties

     */
    protected final Resender getDefaultResender() {  
        return new Resender() {
            public void resend(ObjectMessageContext context,
                               boolean requestAcknowledge) {
                RMProperties properties =
                    RMContextUtils.retrieveRMProperties(context, true);
                SequenceType st = properties.getSequence();
                if (st != null) {
                    LOG.log(Level.INFO, "RESEND_MSG", st.getMessageNumber());
                }
                try {
                    refreshMAPs(context);
View Full Code Here

Examples of org.objectweb.celtix.ws.rm.RMProperties

     *
     * @param context the message context
     * @param requestAcknowledge true if an AckRequested header should be included
     */
    private void refreshRMProperties(MessageContext context, boolean requestAcknowledge) {
        RMProperties properties =
            RMContextUtils.retrieveRMProperties(context, true);
        List<AckRequestedType> requests = null;
        if (requestAcknowledge) {
            requests = new ArrayList<AckRequestedType>();
            requests.add(RMUtils.getWSRMFactory().createAckRequestedType());
            Identifier id = properties.getSequence().getIdentifier();
            requests.get(0).setIdentifier(id);
        }
        properties.setAcksRequested(requests);
    }
View Full Code Here

Examples of org.objectweb.celtix.ws.rm.RMProperties

     * @param ctx the message context.
     * @return ResendCandidate
     */
    protected ResendCandidate cacheUnacknowledged(ObjectMessageContext ctx) {
        ResendCandidate candidate = null;
        RMProperties rmps = RMContextUtils.retrieveRMProperties(ctx, true);
        if (null == rmps) {
            SOAPMessage message = (SOAPMessage)ctx.get(SOAP_MSG_KEY);
            rmps = getRMSoapHandler().unmarshalRMProperties(message);
            RMContextUtils.storeRMProperties(ctx, rmps, true);           
        }
        AddressingProperties maps = ContextUtils.retrieveMAPs(ctx, false, true);
        if (null == maps) {
            SOAPMessage message = (SOAPMessage)ctx.get(SOAP_MSG_KEY);
            try {
                maps = getWsaSOAPHandler().unmarshalMAPs(message);
                ContextUtils.storeMAPs(maps, ctx, true);
            } catch (Exception ex) {
                ex.printStackTrace();
            }
        }
       
        SequenceType st = rmps.getSequence();
        Identifier sid = st.getIdentifier();
        synchronized (this) {
            String key = sid.getValue();
            List<ResendCandidate> sequenceCandidates =
                getSequenceCandidates(key);
View Full Code Here

Examples of org.objectweb.celtix.ws.rm.RMProperties

        synchronized (this) {
            List<ResendCandidate> sequenceCandidates = getSequenceCandidates(seq);
            if (null != sequenceCandidates) {
                for (int i = sequenceCandidates.size() - 1; i >= 0; i--) {
                    ResendCandidate candidate = sequenceCandidates.get(i);
                    RMProperties properties = RMContextUtils.retrieveRMProperties(candidate.getContext(),
                                                                                  true);
                    SequenceType st = properties.getSequence();
                    BigInteger m = st.getMessageNumber();
                    if (seq.isAcknowledged(m)) {
                        sequenceCandidates.remove(i);
                        candidate.resolved();
                        purged.add(m);
View Full Code Here

Examples of org.objectweb.celtix.ws.rm.RMProperties

    }

    protected void handleInbound(LogicalMessageContext context) throws SequenceFault {

        LOG.entering(getClass().getName(), "handleInbound");
        RMProperties rmps = RMContextUtils.retrieveRMProperties(context, false);
       
        final AddressingPropertiesImpl maps = ContextUtils.retrieveMAPs(context, false, false);
        assert null != maps;

        String action = null;
View Full Code Here

Examples of org.objectweb.celtix.ws.rm.RMProperties

    }
   
    public void verifyAckRequestedInbound(List<LogicalMessageContext> contexts) throws Exception {
        boolean found = false;
        for (LogicalMessageContext context : contexts) {
            RMProperties rmps = RMContextUtils.retrieveRMProperties(context, false);
            if (null != rmps
                && rmps.getAcksRequested() != null
                && rmps.getAcksRequested().size() > 0) {
                found = true;
                break;
            }
        }
        assertTrue("expected AckRequested", found);
View Full Code Here

Examples of org.objectweb.celtix.ws.rm.RMProperties

                                                                      "MessageNumber")).next();
        return se.getTextContent();
    }

    protected SequenceType getSequence(LogicalMessageContext context) {
        RMProperties rmps = RMContextUtils.retrieveRMProperties(context, false);
        return rmps == null ? null : rmps.getSequence();
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.