Package wycc.io

Examples of wycc.io.Token$Identifier


        return sequence;
    }
   
    private SourceSequence setUpSequence(String sid,  Long[] messageNumbers, boolean[] isAcked) {
        SourceSequence sequence = createMock(SourceSequence.class);
        Identifier id = createMock(Identifier.class);
        sequence.getIdentifier();
        EasyMock.expectLastCall().andReturn(id).anyTimes();
        id.getValue();
        EasyMock.expectLastCall().andReturn(sid).anyTimes();
        identifiers.add(id);
        Source source = createMock(Source.class);
        sequence.getSource();
        EasyMock.expectLastCall().andReturn(source).anyTimes();
View Full Code Here


        // fault is a SoapFault and has a SequenceFault cause
       
        message = setupOutboundFaultMessage();
        SequenceFault sf = new SequenceFault("REASON");
        sf.setFaultCode(RM10Constants.UNKNOWN_SEQUENCE_FAULT_QNAME);
        Identifier sid = new Identifier();
        sid.setValue("SID");
        sf.setSender(true);
        f.initCause(sf);
        message.setContent(Exception.class, f);     
        codec.encode(message);
        verifyHeaders(message, new String[] {RMConstants.SEQUENCE_FAULT_NAME});
View Full Code Here

    }

    private void setUpOutbound() {
        ObjectFactory factory = new ObjectFactory();
        s1 = factory.createSequenceType();
        Identifier sid = factory.createIdentifier();
        sid.setValue("sequence1");
        s1.setIdentifier(sid);
        s1.setMessageNumber(ONE);
        s2 = factory.createSequenceType();
        sid = factory.createIdentifier();
        sid.setValue("sequence2");
        s2.setIdentifier(sid);
        s2.setMessageNumber(TEN);

        ack1 = factory.createSequenceAcknowledgement();
        SequenceAcknowledgement.AcknowledgementRange r =
View Full Code Here

    class DefaultSequenceIdentifierGenerator implements SequenceIdentifierGenerator {

        public Identifier generateSequenceIdentifier() {
            String sequenceID = RMContextUtils.generateUUID();
            Identifier sid = new Identifier();
            sid.setValue(sequenceID);
            return sid;
        }
View Full Code Here

        // if a sequence was offered and accepted, then we can add this to
        // to the local destination sequence list, otherwise we have to wait for
        // and incoming CreateSequence request
       
        Identifier offeredId = reliableEndpoint.getProxy().getOfferedIdentifier();
        if (null != offeredId) {
            AcceptType accept = createResponse.getAccept();
            if (accept != null) {
                Destination dest = reliableEndpoint.getDestination();
                String address = accept.getAcksTo().getAddress().getValue();
View Full Code Here

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

       
        // 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

TOP

Related Classes of wycc.io.Token$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.