Contact Us 1-800-596-4880

STDIO Transport Reference

Mule Runtime Engine versions 3.5, 3.6, and 3.7 reached End of Life on or before January 25, 2020. For more information, contact your Customer Success Manager to determine how you can migrate to the latest Mule version.

The STDIO Transport allows the reading and writing of streaming data to Java’s System.out and System.in objects for debugging.

The following example configures the STDIO connector:

<mule xmlns:doc="http://www.mulesoft.org/schema/mule/documentation"
      xmlns="http://www.mulesoft.org/schema/mule/core"
      xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
      xmlns:spring="http://www.springframework.org/schema/beans"
      xmlns:stdio="http://www.mulesoft.org/schema/mule/stdio"
      xsi:schemaLocation="http://www.mulesoft.org/schema/mule/stdio
      http://www.mulesoft.org/schema/mule/stdio/3.6/mule-stdio.xsd
      http://www.springframework.org/schema/beans
      http://www.springframework.org/schema/beans/spring-beans-current.xsd
      http://www.mulesoft.org/schema/mule/core
      http://www.mulesoft.org/schema/mule/core/3.6/mule.xsd">

    <stdio:connector name="stdioConnector" messageDelayTime="1234"
           outputMessage="abc" promptMessage="bcd"
           promptMessageCode="456" resourceBundle="dummy-messages"
           doc:name="STDIO"/>

    <flow name="flow">
      <stdio:inbound-endpoint  system="IN" connector-ref="stdioConnector"/>
        <all>
            <processor-chain>
                <stdio:outbound-endpoint system="OUT"
                   connector-ref="stdioConnector"/>
            <stdio:outbound-endpoint system="ERR"
                   connector-ref="stdioConnector" />
            </processor-chain>
        </all>
    </flow>
</mule>

Note: In this code example, spring-beans-current.xsd is a placeholder. To locate the correct version, see http://www.springframework.org/schema/beans/.

Transformers

There are no built-in transformers for the STDIO transport.

Internationalizing Messages

If you are internationalizing your application, you can also internationalize the promptMessages and outputMessages for the STDIO connector. (This assumes that you have already created a resource bundle that contains your messages as described on that page.)

To internationalize, you must specify both the resourceBundle parameter and the promptMessageCode and/or outputMessageCode parameters. The resourceBundle parameter contains the key to the resource bundle itself. The promptMessageCode provides the key to the message in the bundle for the prompt message. In the snippet above, the "dummy-messages" resource bundle means that the prompt message "456" appears in the bundle META-INF/services/org/mule/i18n/dummy-messages<langCode>.properties.

Connector

Attributes of <connector…​>

Name Type Required Default Description

messageDelayTime

long

no

Delay in milliseconds before printing the prompt to stdout.

outputMessage

string

no

Text printed to stdout when a message is sent.

promptMessage

string

no

Text printed to stdout when waiting for input.

promptMessageCode

string

no

Code used to retrieve prompt message from resource bundle.

outputMessageCode

string

no

Code used to retrieve output message from resource bundle.

resourceBundle

string

no

Resource bundle to provide prompt with promptMessageCode.

Child Elements of <connector…​>

Name Cardinality Description