Examples of Flow


Examples of org.apache.fop.fo.flow.Flow

                 && ((currentPageNumber % 2) == 0)) {}
            else {
                BodyAreaContainer bodyArea = currentPage.getBody();
                bodyArea.setIDReferences(areaTree.getIDReferences());

                Flow flow = getCurrentFlow(RegionBody.REGION_CLASS);

                if (null == flow) {
                    MessageHandler.errorln("No flow found for region-body "
                                           + "in page-master '"
                                           + currentPageMasterName + "'");
                    break;

                } else {
                    status = flow.layout(bodyArea);
                }

            }

            // because of markers, do after fo:flow (likely also
View Full Code Here

Examples of org.apache.fop.fo.flow.Flow

    private void formatStaticContent(AreaTree areaTree) throws FOPException {
        SimplePageMaster simpleMaster = getCurrentSimplePageMaster();

        if (simpleMaster.getRegion(RegionBefore.REGION_CLASS) != null
                && (currentPage.getBefore() != null)) {
            Flow staticFlow =
                (Flow)_flowMap.get(simpleMaster.getRegion(RegionBefore.REGION_CLASS).getRegionName());
            if (staticFlow != null) {
                AreaContainer beforeArea = currentPage.getBefore();
                beforeArea.setIDReferences(areaTree.getIDReferences());
                layoutStaticContent(staticFlow,
                                    simpleMaster.getRegion(RegionBefore.REGION_CLASS),
                                    beforeArea);
            }
        }

        if (simpleMaster.getRegion(RegionAfter.REGION_CLASS) != null
                && (currentPage.getAfter() != null)) {
            Flow staticFlow =
                (Flow)_flowMap.get(simpleMaster.getRegion(RegionAfter.REGION_CLASS).getRegionName());
            if (staticFlow != null) {
                AreaContainer afterArea = currentPage.getAfter();
                afterArea.setIDReferences(areaTree.getIDReferences());
                layoutStaticContent(staticFlow,
                                    simpleMaster.getRegion(RegionAfter.REGION_CLASS),
                                    afterArea);
            }
        }

        if (simpleMaster.getRegion(RegionStart.REGION_CLASS) != null
                && (currentPage.getStart() != null)) {
            Flow staticFlow =
                (Flow)_flowMap.get(simpleMaster.getRegion(RegionStart.REGION_CLASS).getRegionName());
            if (staticFlow != null) {
                AreaContainer startArea = currentPage.getStart();
                startArea.setIDReferences(areaTree.getIDReferences());
                layoutStaticContent(staticFlow,
                                    simpleMaster.getRegion(RegionStart.REGION_CLASS),
                                    startArea);
            }
        }

        if (simpleMaster.getRegion(RegionEnd.REGION_CLASS) != null
                && (currentPage.getEnd() != null)) {
            Flow staticFlow =
                (Flow)_flowMap.get(simpleMaster.getRegion(RegionEnd.REGION_CLASS).getRegionName());
            if (staticFlow != null) {
                AreaContainer endArea = currentPage.getEnd();
                endArea.setIDReferences(areaTree.getIDReferences());
                layoutStaticContent(staticFlow,
View Full Code Here

Examples of org.apache.fop.fo.flow.Flow

     */
    private boolean flowsAreIncomplete() {
        boolean isIncomplete = false;

        for (Enumeration e = _flowMap.elements(); e.hasMoreElements(); ) {
            Flow flow = (Flow)e.nextElement();
            if (flow instanceof StaticContent) {
                continue;
            }

            Status status = flow.getStatus();
            isIncomplete |= status.isIncomplete();
        }
        return isIncomplete;
    }
View Full Code Here

Examples of org.apache.fop.fo.pagination.Flow

        testGetNextPage(providedPages, expectedPage, false);
    }

    private void testGetNextPage(final Page[] providedPages, Page expectedPage, boolean isBlank) {

        final Flow flow = mock(Flow.class);
        final PageSequence pseq = mock(PageSequence.class);
        final Root root = mock(Root.class);
        final AreaTreeHandler ath = mock(AreaTreeHandler.class);

        when(flow.getFlowName()).thenReturn(MAIN_FLOW_NAME);
        when(pseq.getMainFlow()).thenReturn(flow);
        when(pseq.getRoot()).thenReturn(root);

        PageSequenceLayoutManager sut = new PageSequenceLayoutManager(ath, pseq) {
View Full Code Here

Examples of org.apache.qpid.amqp_1_0.type.transport.Flow

                                           Sender.SenderClosingException,
                                           Connection.ConnectionException,
                                           IOException, ParseException
    {
        Transfer xfr = new Transfer();
        Flow fs = new Flow();
        fs.setIncomingWindow(UnsignedInteger.valueOf(1024));
        fs.setDeliveryCount(UnsignedInteger.valueOf(2));
        fs.setLinkCredit(UnsignedInteger.valueOf(18));
        fs.setAvailable(UnsignedInteger.valueOf(0));
        fs.setDrain(false);

        xfr.setHandle(UnsignedInteger.valueOf(0));
        xfr.setDeliveryTag(new Binary("\"queue\"<-6ec024a7-d98e-4196-9348-15f6026c32ca:0".getBytes()));
        //xfr.setDeliveryTag(new Binary(new byte[] {0}));
        xfr.setDeliveryId(UnsignedInteger.valueOf(0));
View Full Code Here

Examples of org.apache.qpid.proton.amqp.transport.Flow

        }
    }

    private void writeFlow(TransportSession ssn, TransportLink link)
    {
        Flow flow = new Flow();
        flow.setNextIncomingId(ssn.getNextIncomingId());
        flow.setNextOutgoingId(ssn.getNextOutgoingId());
        ssn.updateWindows();
        flow.setIncomingWindow(ssn.getIncomingWindowSize());
        flow.setOutgoingWindow(ssn.getOutgoingWindowSize());
        if (link != null) {
            flow.setHandle(link.getLocalHandle());
            flow.setDeliveryCount(link.getDeliveryCount());
            flow.setLinkCredit(link.getLinkCredit());
            flow.setDrain(link.getLink().getDrain());
        }
        writeFrame(ssn.getLocalChannel(), flow, null, null);
    }
View Full Code Here

Examples of org.apache.qpid.proton.type.transport.Flow

                        int credits = sender.getCredit();
                        sender.setCredit(0);
                        transportLink.setDeliveryCount(transportLink.getDeliveryCount().add(UnsignedInteger.valueOf(credits)));
                        transportLink.setLinkCredit(UnsignedInteger.ZERO);

                        Flow flow = new Flow();
                        flow.setHandle(transportLink.getLocalHandle());
                        flow.setNextIncomingId(transportSession.getNextIncomingId());
                        flow.setIncomingWindow(transportSession.getIncomingWindowSize());
                        flow.setOutgoingWindow(transportSession.getOutgoingWindowSize());
                        flow.setDeliveryCount(transportLink.getDeliveryCount());
                        flow.setLinkCredit(transportLink.getLinkCredit());
                        flow.setDrain(sender.getDrain());
                        flow.setNextOutgoingId(transportSession.getNextOutgoingId());
                        int frameBytes = writeFrame(buffer, transportSession.getLocalChannel(), flow, null, null);
                        written += frameBytes;
                        endpoint.clearModified();
                    }
View Full Code Here

Examples of org.apache.qpid.proton.type.transport.Flow

                        int credits = receiver.clearUnsentCredits();
                        transportSession.getSession().clearIncomingWindowResize();
                        if(credits != 0 || receiver.getDrain())
                        {
                            transportLink.addCredit(credits);
                            Flow flow = new Flow();
                            flow.setHandle(transportLink.getLocalHandle());
                            flow.setNextIncomingId(transportSession.getNextIncomingId());
                            flow.setIncomingWindow(transportSession.getIncomingWindowSize());
                            flow.setOutgoingWindow(transportSession.getOutgoingWindowSize());
                            flow.setDeliveryCount(transportLink.getDeliveryCount());
                            flow.setLinkCredit(transportLink.getLinkCredit());
                            flow.setDrain(receiver.getDrain());
                            flow.setNextOutgoingId(transportSession.getNextOutgoingId());
                            int frameBytes = writeFrame(buffer, transportSession.getLocalChannel(), flow, null, null);
                            written += frameBytes;
                            if(receiver.getLocalState() == EndpointState.ACTIVE)
                            {
                                endpoint.clearModified();
                            }
                        }

                    }
                }
                endpoint = endpoint.transportNext();
            }
            endpoint = _connectionEndpoint.getTransportHead();
            while(endpoint != null && buffer.remaining() >= _maxFrameSize)
            {

                if(endpoint instanceof SessionImpl)
                {

                    SessionImpl session = (SessionImpl) endpoint;
                    TransportSession transportSession = getTransportState(session);

                    if(session.getLocalState() == EndpointState.ACTIVE)
                    {
                        boolean windowResized = session.clearIncomingWindowResize();
                        if(windowResized)
                        {
                            Flow flow = new Flow();
                            flow.setIncomingWindow(transportSession.getIncomingWindowSize());
                            flow.setOutgoingWindow(transportSession.getOutgoingWindowSize());
                            flow.setNextOutgoingId(transportSession.getNextOutgoingId());
                            flow.setNextIncomingId(transportSession.getNextIncomingId());
                            int frameBytes = writeFrame(buffer, transportSession.getLocalChannel(), flow, null, null);
                            written += frameBytes;
                        }
                    }
                }
View Full Code Here

Examples of org.apache.qpid.proton.type.transport.Flow

    {
        Map m = new LinkedHashMap();
        final Object x = Arrays.asList((Object) Symbol.valueOf("hel lo"), "hi", Symbol.valueOf("x"));
        m.put(Symbol.valueOf("ddd"), x);
        m.put("hello", "world");
        final Flow flow = new Flow();
        flow.setDrain(true);
        m.put(flow, "wibble");
        final AMQPMessageFormat f = new AMQPMessageFormat();
        System.err.println(f.encode(m));

        byte[] data = {0, 23, 45, 98, (byte) 255, 32, 78, 12, 126, 127, (byte) 128, 66,67,68};
View Full Code Here

Examples of org.apache.servicemix.jbi.nmr.flow.Flow

        boolean foundRoute = false;
        // If we found a destination, or this is a reply
        if (exchange.getEndpoint() != null || exchange.getRole() == Role.CONSUMER) {
            foundRoute = true;
            Flow flow = defaultFlowChooser.chooseFlow(flows, exchange);
            if (flow == null) {
                throw new MessagingException("Unable to choose a flow for exchange: " + exchange);
            }
            flow.send(exchange);
        }

        if (exchange.getRole() == Role.PROVIDER) {
            getSubscriptionManager().dispatchToSubscribers(exchange);
        }
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.