Contact Us 1-800-596-4880

STDIO Transport Reference

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

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.

No Child Elements of <connector…​>

To configure the STDIO connector:

<mule 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.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.5.xsd
      http://www.mulesoft.org/schema/mule/core http://www.mulesoft.org/schema/mule/core/3.2/mule.xsd
      http://www.mulesoft.org/schema/mule/stdio http://www.mulesoft.org/schema/mule/stdio/3.2/mule-stdio.xsd">

    <stdio:connector name="stdioConnector" messageDelayTime="1234" outputMessage="abc" promptMessage="bcd" promptMessageCode="456" resourceBundle="dummy-messages" />
    <model name="model">
      <service name="service">
        <inbound>
          <stdio:inbound-endpoint name="in" system="IN" connector-ref="stdioConnector" />
        </inbound>
        <outbound>
          <multicasting-router>
            <stdio:outbound-endpoint name="out" system="OUT" connector-ref="stdioConnector" />
            <stdio:outbound-endpoint name="err" system="ERR" connector-ref="stdioConnector" />
          </multicasting-router>
        </outbound>
      </service>
    </model>
</mule>

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" is expected in the bundle META-INF/services/org/mule/i18n/dummy-messages<langCode>.properties.