Package com.sun.xml.ws.rx.rm.protocol.wsrm200502

Examples of com.sun.xml.ws.rx.rm.protocol.wsrm200502.Identifier


       
        // check if the terminated sequence was created in response to a a createSequence
        // request
       
        Destination destination = reliableEndpoint.getDestination();
        Identifier sid = close.getIdentifier();
        DestinationSequence closedSeq = destination.getSequence(sid);
        if (null == closedSeq) {
            //  TODO
            LOG.severe("No such sequence.");
            return null;
View Full Code Here


        }
        return null;
    }
   
    Identifier clearUnattachedIdentifier() {
        Identifier ret = unattachedIdentifier;
        unattachedIdentifier = null;
        return ret;
    }
View Full Code Here

        if (msg.getExchange().isOneWay()) {
            msg.getExchange().put(Message.PROCESS_ONEWAY_RESPONSE, true);
        }
       
        RMProperties rmpsIn = null;
        Identifier inSeqId = null;
        long inMessageNumber = 0;
       
        if (isApplicationMessage) {
            rmpsIn = RMContextUtils.retrieveRMProperties(msg, false);
            if (null != rmpsIn && null != rmpsIn.getSequence()) {
                inSeqId = rmpsIn.getSequence().getIdentifier();
                inMessageNumber = rmpsIn.getSequence().getMessageNumber();
            }
            ContextUtils.storeDeferUncorrelatedMessageAbort(msg);
        }
       
        Map<?, ?> invocationContext = (Map<?, ?>)msg.get(Message.INVOCATION_CONTEXT);
       
        // special check for closing RM 1.0 sequence with no application message
        //  need to generate Sequence header for the LastMessage element anyway, in this case
        boolean close10 = isLastMessage && RM10Constants.NAMESPACE_URI.equals(rmNamespace) && invocationContext != null;
       
        if ((isApplicationMessage || close10) && !isPartialResponse) {
            if (LOG.isLoggable(Level.FINE)) {
                LOG.fine("inbound sequence: " + (null == inSeqId ? "null" : inSeqId.getValue()));
            }
           
            // get the current sequence, requesting the creation of a new one if necessary
            synchronized (source) {
                SourceSequence seq = null;
View Full Code Here

            try {
               
                RMProperties rmps = RMContextUtils.retrieveRMProperties(message, true);
                SequenceType sequence = rmps.getSequence();
                Long number = sequence.getMessageNumber();
                Identifier sid = sequence.getIdentifier();
                if (LOG.isLoggable(Level.INFO)) {
                    LOG.log(Level.INFO, "Captured message " + number + " in sequence " + sid.getValue());
                }
               
                // save message for potential retransmission
                ByteArrayInputStream bis = cw.getOutputStream().createInputStream();
                message.put(RMMessageConstants.SAVED_CONTENT, RewindableInputStream.makeRewindable(bis));
View Full Code Here

    }
   
    @Test
    public void testOfferedIdentifier() {
        OfferType offer = control.createMock(OfferType.class);       
        Identifier id = control.createMock(Identifier.class);
        EasyMock.expect(offer.getIdentifier()).andReturn(id).anyTimes();
        control.replay();
        Proxy proxy = new Proxy(rme);
        assertNull(proxy.getOfferedIdentifier());
        proxy.setOfferedIdentifier(offer);
View Full Code Here

        InterfaceInfo ii = control.createMock(InterfaceInfo.class);
        EasyMock.expect(si.getInterface()).andReturn(ii).anyTimes();
        OperationInfo oi = control.createMock(OperationInfo.class);
        EasyMock.expect(ii.getOperation(RM10Constants.TERMINATE_SEQUENCE_QNAME)).andReturn(oi).anyTimes();
        SourceSequence ss = control.createMock(SourceSequence.class);
        Identifier id = control.createMock(Identifier.class);
        EasyMock.expect(ss.getIdentifier()).andReturn(id).anyTimes();
        EasyMock.expect(ss.getProtocol()).andReturn(ProtocolVariation.RM10WSA200408).anyTimes();
        expectInvoke(proxy, oi, null);
        control.replay();
        proxy.terminate(ss);
View Full Code Here

        EasyMock.expect(sp.isIncludeOffer()).andReturn(Boolean.TRUE).anyTimes();
        Duration dOffered = DatatypeFactory.createDuration("PT24H");
        EasyMock.expect(sp.getOfferedSequenceExpiration()).andReturn(dOffered).anyTimes();
        Source source = control.createMock(Source.class);
        EasyMock.expect(rme.getSource()).andReturn(source).anyTimes();
        Identifier offeredId = control.createMock(Identifier.class);
        EasyMock.expect(source.generateSequenceIdentifier()).andReturn(offeredId).anyTimes();
            
        Endpoint endpoint = control.createMock(Endpoint.class);
        EasyMock.expect(rme.getEndpoint(ProtocolVariation.RM10WSA200408)).andReturn(endpoint).anyTimes();
        EndpointInfo epi = control.createMock(EndpointInfo.class);
View Full Code Here

       
        if (isApplicationMessage && !isPartialResponse) {
            addRetransmissionInterceptor(msg);
        }
       
        Identifier inSeqId = null;
        if (isApplicationMessage) {
            RMProperties rmpsIn = RMContextUtils.retrieveRMProperties(msg, false);
            if (null != rmpsIn && null != rmpsIn.getSequence()) {
                inSeqId = rmpsIn.getSequence().getIdentifier();
               
View Full Code Here

            || (mode == AckRequestModeType.PENDING && seq.needAcknowledge(rmpsIn.getMessageNumber()))) {
            Collection<AckRequestedType> reqs = rmpsIn.getAcksRequested();
            if (reqs == null) {
                reqs = new ArrayList<AckRequestedType>();
            }
            Identifier identifier = new Identifier();
            identifier.setValue(sequence.getIdentifier().getValue());
            AckRequestedType ackRequest = new AckRequestedType();
            ackRequest.setIdentifier(identifier);
            reqs.add(ackRequest);
            rmpsIn.setAcksRequested(reqs);
        }
View Full Code Here

        SequenceAcknowledgement ack2 = control.createMock(SequenceAcknowledgement.class);
        Collection<SequenceAcknowledgement> acks = new ArrayList<SequenceAcknowledgement>();
        acks.add(ack1);
        acks.add(ack2);
        EasyMock.expect(rmps.getAcks()).andReturn(acks);
        Identifier id1 = control.createMock(Identifier.class);
        EasyMock.expect(ack1.getIdentifier()).andReturn(id1);
        SourceSequence ss1 = control.createMock(SourceSequence.class);
        EasyMock.expect(source.getSequence(id1)).andReturn(ss1);
        ss1.setAcknowledged(ack1);
        EasyMock.expectLastCall();
        Identifier id2 = control.createMock(Identifier.class);
        EasyMock.expect(ack2.getIdentifier()).andReturn(id2);
        EasyMock.expect(source.getSequence(id2)).andReturn(null);
        control.replay();
        try {
            interceptor.processAcknowledgments(rme, rmps, ProtocolVariation.RM10WSA200408);
View Full Code Here

TOP

Related Classes of com.sun.xml.ws.rx.rm.protocol.wsrm200502.Identifier

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.