org.mule.modules.ssh.multiplexer

mule-module-SshMultiplexer

1.0
Namespacehttp://www.mulesoft.org/schema/mule/sshmultiplexedconnector
Schema Locationhttp://www.mulesoft.org/schema/mule/sshmultiplexedconnector/1.0/mule-sshmultiplexedconnector.xsd
Version1.0
Minimum Mule Version3.2

Module Overview

Cloud Connector for ssh that is capable to handle multiple session from different users and reusing the session of any given user if he wants to send multiple messages. Notice that while this connector can handle N sessions for N users, each user can only have 1 active session at a time

Summary

Configuration
<sshmultiplexedconnector:config>
Configure an instance of this module
Message Processors
<sshmultiplexedconnector:release>
Releases the ssh connection associated with the username (if any).
<sshmultiplexedconnector:send>
creates/reuses a ssh connection to the host login in as username.

Configuration

To use the this module within a flow the namespace to the module must be included. The resulting flow will look similar to the following:

<mule xmlns="http://www.mulesoft.org/schema/mule/core"
      xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
      xmlns:sshmultiplexedconnector="http://www.mulesoft.org/schema/mule/sshmultiplexedconnector"
      xsi:schemaLocation="
               http://www.mulesoft.org/schema/mule/core
               http://www.mulesoft.org/schema/mule/core/current/mule.xsd
               http://www.mulesoft.org/schema/mule/sshmultiplexedconnector
               http://www.mulesoft.org/schema/mule/sshmultiplexedconnector/1.0/mule-sshmultiplexedconnector.xsd">

      <!-- here goes your flows and configuration elements -->

</mule>

This module is configured using the config element. This element must be placed outside of your flows and at the root of your Mule application. You can create as many configurations as you deem necesary as long as each carries its own name.

Each message processor, message source or transformer carries a config-ref attribute that allows the invoker to specify which configuration to use.

Attributes
TypeNameDefault ValueDescription
xs:string name Optional. Give a name to this configuration so it can be later referenced.
xs:string callbackFlowName If not null, a flow with this name will be fetched from the registry and invoked everytime data is received from the other end.
xs:string host IP address for the target host
xs:int port TCP port in which the host is listening
xs:int receiverBufferSize Optional. The size of the receiver buffer in bytes.
xs:boolean shellMode if true, the connection will be opened in shell mode, meaning that the session context will be maintained from the moment it's stablished until it's closed.
xs:int timeout message timeout

Message Processors

<sshmultiplexedconnector:release>

Releases the ssh connection associated with the username (if any). It does so by invoking org.mule.modules.ssh.multiplexer.SshConnectionManager.release(String)

XML Sample
INCLUDE_ERROR

Attributes
NameDefault ValueDescription
config-ref Optional. Specify which configuration to use.
username - the username whose connection we want to free
Child Elements
See Also
  • org.mule.modules.ssh.multiplexer.SshConnectionManager.release(String)

<sshmultiplexedconnector:send>

creates/reuses a ssh connection to the host login in as username. Notice that after sending the message the session is kept active. It is up to you to release it. To release a session, the username can send {@org.mule.modules.ssh.multiplexer.SshMultiplexedConnector.DISCONNECT_STRING } as content. This will cause org.mule.modules.ssh.multiplexer.SshMultiplexedConnector.release(String) to be invoked

XML Sample
INCLUDE_ERROR

Attributes
NameDefault ValueDescription
config-ref Optional. Specify which configuration to use.
username - the username to use at remote authentication
password - the password to use at remote authentication
content - the content to send
breakLine Optional. - if true, then
Child Elements
Return Payload
  • Accumulates text response from the server until the receiving buffer is empty and then returns all of the content at once.
Exception Payload
Exception
See Also
  • org.mule.modules.ssh.multiplexer.SshMultiplexedConnector.release(String)