Package com.volantis.mcs.protocols

Examples of com.volantis.mcs.protocols.OutputBuffer


    // Javadoc inherited
    public XDIMEResult callOpenOnProtocol(
        XDIMEContextInternal context, XDIMEAttributes attributes)
        throws XDIMEException {
        MarinerPageContext pageContext = getPageContext(context);
        OutputBuffer buffer = pageContext.getCurrentOutputBuffer();
       
        buffer.writeText("{date: ");

        return XDIMEResult.PROCESS_ELEMENT_BODY;
    }
View Full Code Here


    }

    // Javadoc inherited
    public void callCloseOnProtocol(XDIMEContextInternal context) {
        MarinerPageContext pageContext = getPageContext(context);
        OutputBuffer buffer = pageContext.getCurrentOutputBuffer();
       
        buffer.writeText("}");
    }
View Full Code Here

            // Set the text by constructing an artificial output buffer from
            // the text attribute
            // NB: The allocation mechanism must be compatible with the
            //     de-allocation mechanism used in
            //     {@link MenuElement#releaseLabelOutputBuffers}
            OutputBuffer text = pageContext.getProtocol().
                    getOutputBufferFactory().createOutputBuffer();
            text.writeText(attributes.getText());
            builder.setText(text);

            // End the menu text
            builder.endText();
View Full Code Here

    // Javadoc inherited
    public XDIMEResult callOpenOnProtocol(
        XDIMEContextInternal context, XDIMEAttributes attributes)
        throws XDIMEException {
        MarinerPageContext pageContext = getPageContext(context);
        OutputBuffer buffer = pageContext.getCurrentOutputBuffer();
       
        buffer.writeText("{percentage: ");

        return XDIMEResult.PROCESS_ELEMENT_BODY;
    }
View Full Code Here

    }

    // Javadoc inherited
    public void callCloseOnProtocol(XDIMEContextInternal context) {
        MarinerPageContext pageContext = getPageContext(context);
        OutputBuffer buffer = pageContext.getCurrentOutputBuffer();
       
        buffer.writeText("}");

    }
View Full Code Here

    }

    // javadoc inherited
    public OutputBuffer resolvePaneOutputBuffer(
            FormatReference paneFormatReference) {
        OutputBuffer buffer = null;

        if (paneFormatReference != null) {
            Pane pane = getPane(paneFormatReference.getStem());

            if (pane != null) {
View Full Code Here

    }

    // Javadoc inherited.
    public void popOutputBuffer(OutputBuffer expectedOutputBuffer) {

        OutputBuffer outputBuffer = (OutputBuffer) outputBufferStack.pop();
        if (expectedOutputBuffer != null &&
                expectedOutputBuffer != outputBuffer) {
            throw new IllegalStateException("OUTPUT BUFFER STACK:"
                                            + " Expected " +
                                            expectedOutputBuffer
View Full Code Here

    }

    // Javadoc inherited.
    public OutputBuffer getCurrentOutputBuffer() {

        OutputBuffer currentOutputBuffer;
        OutputBuffer topOutputBuffer;

        if (outputBufferStack == null || outputBufferStack.isEmpty()) {
            topOutputBuffer = null;
            currentOutputBuffer = null;
        } else {
            topOutputBuffer = (OutputBuffer) outputBufferStack.peek();

            // The OutputBuffer on the stack could be a simple one, or a
            // compound one. If it is a compound one then we need to return
            // its current buffer.
            currentOutputBuffer = topOutputBuffer.getCurrentBuffer();
        }

        if (logger.isDebugEnabled()) {
            if (currentOutputBuffer == topOutputBuffer) {
                logger.debug(
View Full Code Here

        MarinerPageContext pageContext =
                ContextInternals.getMarinerPageContext(context);
        // If the current output buffer is null then the output buffer
        // wrapped by the protocol encoding writer will return null when
        // it's writer is retrieved.
        OutputBuffer ob = pageContext.getCurrentOutputBuffer();
        Writer w = null;
        if (ob == null) {
            // We are going to throw away whatever is written here
            if (dummyWriter == null) {
                dummyWriter = new BlackHoleWriter();
View Full Code Here

                elementID != null && pageContext.getCurrentFragment() != null) {

            final MetaData metaData = pageContext.getElementMetaData(elementID);

            // get the link meta data associated with this container
            OutputBuffer linkToLabel = (OutputBuffer)
                    metaData.getPropertyValue(
                            MetaPropertyHandlerFactory.FRAGMENT_LINK_LABEL);
            OutputBuffer linkFromLabel = (OutputBuffer)
                    metaData.getPropertyValue(
                            MetaPropertyHandlerFactory.ENCLOSING_FRAGMENT_LINK_LABEL);

            // If no labels have been specified using meta data then there is
            // nothing to update the fragment instance with and so
View Full Code Here

TOP

Related Classes of com.volantis.mcs.protocols.OutputBuffer

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.