Nav

Generic Connector

The Generic connector provides a wide array of configuration options that let you code the protocol into the address of the endpoint. 

Mule supports numerous protocols which can be configured as endpoints. Many, but not all of the protocols included with Mule are already configured as endpoint-based connectors available as processors in the connectors category of the palette. These include FTP, HTTP, and Ajax, for instance.

The Generic connector can also be used to specify these or additional endpoints, by entering the full address in the Address field, including the protocol designation within the address (ftp://foo, vm://foo, https://foo, etc.).

To Install this Connector

  1. In Anypoint Studio, click the Exchange icon in the Studio taskbar.

  2. Click Login in Anypoint Exchange.

  3. Search for the connector and click Install.

  4. Follow the prompts to install the connector.

When Studio has an update, a message displays in the lower right corner, which you can click to install the update.

Configuring the Generic Connector

The normal properties windows tabs are at your disposal. Whether you use the connector to access an inbound or outbound endpoint, you configure the desired settings via these windows, or via the Configuration XML of your application. For background reading, see Endpoint Configuration Reference

General Tab

Define the endpoint for your generic connector at a minimum, using the endpoint’s address or by referencing a created Connector Configuration global element that your Mule application can use to determine for the connector:

  • Encoding for the processed messages

  • MIME Type to direct the server in generating the response for your application

  • Transport to be used (or not, Disable Transport Transformer), and,

  • Exchange pattern: one-way or request-response.

generic general properties

Advanced Tab

Whether for a one-way or request-response generic connector, set additional properties on your endpoint(s) from the Advanced tab, where you can fix the endpoint address, and tune the connector to your desired use. Track your business events by default by selecting the corresponding checkbox (see below).

generic advanced properties

Reconnection Tab

By default, there is no reconnection strategy implemented for you, but you may choose to configure reconnection on a set frequency (Standard Reconnection) or via Custom Reconnection strategy.

generic reconnection properties

Transformers Tab

Nest transformers inside your generic connector from its configured endpoint(s).

generic general transformers properties

Inbound Endpoint

Anypoint Studio Visualization

inbound connector

Default inbound endpoint XML

<inbound-endpoint address="" doc:name="Generic"/>

An inbound endpoint receives messages via the associated transport. As with global endpoints, each transport implements its own inbound endpoint element.

Attributes of <inbound-endpoint…​>

Name Type Required Description

name

name (no spaces)

no

Identifies the endpoint in the registry. There is no need to set the 'name' attribute on inbound or outbound endpoints, only on global endpoints.

ref

string

no

A reference to a global endpoint, which is used as a template to construct this endpoint. A template fixes the address (protocol, path, host, etc.), and may specify initial values for various properties, but further properties can be defined locally (as long as they do not change the address in any way).

address

string

no

The generic address for this endpoint. If this attribute is used, the protocol must be specified as part of the URI. Alternatively, most transports provide their own attributes for specifying the address (path, host, etc.). Note that the address attribute cannot be combined with 'ref' or with the transport-provided alternative attributes.

responseTimeout

integer

no

The timeout for a response if making a synchronous endpoint call

encoding

string

no

String encoding used for messages.

connector-ref

string

no

The name of the connector associated with this endpoint. This must be specified if more than one connector is defined for this transport.

transformer-refs

list of names

no

A list of the transformers to apply (in order) to the message before it is delivered to the component.

responseTransformer-refs

list of names

no

A list of the transformers to apply (in order) to the synchronous response before it is returned via the transport.

disableTransportTransformer

boolean

no

Don’t use the default inbound/outbound/response transformer which corresponds to this endpoint’s transport, if any.

mime type

string

no

The mime type, for example text/plain or application/json

exchange-pattern

enumeration

no

Child Elements of <inbound-endpoint…​>

Name Cardinality Description

abstract-reconnection-strategy

0..1

A placeholder for a reconnection strategy element. Reconnection strategies define how Mule should attempt to handle a connection failure.

abstract-multi-transaction

0..1

A placeholder for multi-transaction elements. Multi-transactions allow a series of operations to be grouped together spanning different transports, for example JMS and JDBC, but without the overhead of XA. The trade-off is that XA reliability guarantees aren’t available, and services must be ready to handle duplicates. This is very similar to a 1.5 PC concept. EE-only feature.

response

0..1

 

abstract-redelivery-policy

0..1

A placeholder for a redelivery policy. Redelivery policies determine what action to take when the same message is redelivered repeatedly.

abstract-transaction

0..1

A placeholder for transaction elements. Transactions allow a series of operations to be grouped together.

abstract-transformer

0..1

A placeholder for transformer elements. Transformers convert message payloads.

abstract-filter

0..1

A placeholder for filter elements, which control which messages are handled.

abstract-security-filter

0..1

A placeholder for security filter elements, which control access to the system.

abstract-intercepting-message-processor

0..1

A placeholder for intercepting router elements.

abstract-observer-message-processor

0..1

A placeholder for message processors that observe the message but do not mutate it used for example for logging.

processor

0..1

A reference to a message processor defined elsewhere.

custom-processor

0..1

 

abstract-mixed-content-message-processor

0..1

A placeholder for message processor elements.

property

0..*

Sets a Mule property. This is a name/value pair that can be set on components, services, etc., and which provide a generic way of configuring the system. Typically, you shouldn’t need to use a generic property like this, since almost all functionality is exposed via dedicated elements. However, it can be useful in configuring obscure or overlooked options and in configuring transports from the generic endpoint elements.

properties

0..1

A map of Mule properties.

Outbound Endpoint

Anypoint Studio Visualization

generic connector outbound

Default outbound endpoint XML

<outbound-endpoint address="" doc:name="Generic"/>

An outbound endpoint sends messages via the associated transport. As with global endpoints, each transport implements its own outbound endpoint element.

Attributes of the Outbound Endpoint

Name Type Required Description

name

name (no spaces)

no

Identifies the endpoint in the registry. There is no need to set the 'name' attribute on inbound or outbound endpoints, only on global endpoints.

ref

string

no

A reference to a global endpoint, which is used as a template to construct this endpoint. A template fixes the address (protocol, path, host, etc.), and may specify initial values for various properties, but further properties can be defined locally (as long as they do not change the address in any way).

address

string

no

The generic address for this endpoint. If this attribute is used, the protocol must be specified as part of the URI. Alternatively, most transports provide their own attributes for specifying the address (path, host, etc.). Note that the address attribute cannot be combined with 'ref' or with the transport-provided alternative attributes.

responseTimeout

integer

no

The timeout for a response if making a synchronous endpoint call

encoding

string

no

String encoding used for messages.

connector-ref

string

no

The name of the connector associated with this endpoint. This must be specified if more than one connector is defined for this transport.

transformer-refs

list of names

no

A list of the transformers to apply (in order) to the message before it is delivered to the component.

responseTransformer-refs

list of names

no

A list of the transformers to apply (in order) to the synchronous response before it is returned via the transport.

disableTransportTransformer

boolean

no

Don’t use the default inbound/outbound/response transformer which corresponds to this endpoint’s transport, if any.

mime type

string

no

The mime type, for example text/plain or application/json

exchange-pattern

enumeration

no

Child Elements of the Outbound Endpoint

Name Cardinality Description

abstract-reconnection-strategy

0..1

A placeholder for a reconnection strategy element. Reconnection strategies define how Mule should attempt to handle a connection failure.

abstract-multi-transaction

0..1

A placeholder for multi-transaction elements. Multi-transactions allow a series of operations to be grouped together spanning different transports, for example JMS and JDBC, but without the overhead of XA. The trade-off is that XA reliability guarantees aren’t available, and services must be ready to handle duplicates. This is very similar to a 1.5 PC concept. EE-only feature.

response

0..1

 

abstract-redelivery-policy

0..1

A placeholder for a redelivery policy. Redelivery policies determine what action to take when the same message is redelivered repeatedly.

abstract-transaction

0..1

A placeholder for transaction elements. Transactions allow a series of operations to be grouped together.

abstract-transformer

0..1

A placeholder for transformer elements. Transformers convert message payloads.

abstract-filter

0..1

A placeholder for filter elements, which control which messages are handled.

abstract-security-filter

0..1

A placeholder for security filter elements, which control access to the system.

abstract-intercepting-message-processor

0..1

A placeholder for intercepting router elements.

abstract-observer-message-processor

0..1

A placeholder for message processors that observe the message but do not mutate it used for example for logging.

processor

0..1

A reference to a message processor defined elsewhere.

custom-processor

0..1

 

abstract-mixed-content-message-processor

0..1

A placeholder for message processor elements.

property

0..*

Sets a Mule property. This is a name/value pair that can be set on components, services, etc., and which provide a generic way of configuring the system. Typically, you shouldn’t need to use a generic property like this, since almost all functionality is exposed via dedicated elements. However, it can be useful in configuring obscure or overlooked options and in configuring transports from the generic endpoint elements.

properties

0..1

A map of Mule properties.

Global Configuration Reference

In XML only, you can also define a global generic endpoint and reference it from specific endpoints within your flows.

Endpoint

A global endpoint, which acts as a template that can be used to construct an inbound or outbound endpoint elsewhere in the configuration by referencing the global endpoint name. Each transport implements its own endpoint element, with a more friendly syntax, but this generic element can be used with any transport by supplying the correct address URI. For example, "vm://foo" describes a VM transport endpoint.

Attributes of <endpoint…​>

Name Type Required Description

name

name (no spaces)

yes

Identifies the endpoint so that other elements can reference it. This name can also be referenced in the MuleClient.

ref

string

no

A reference to a global endpoint, which is used as a template to construct this endpoint. A template fixes the address (protocol, path, host, etc.), and may specify initial values for various properties, but further properties can be defined locally (as long as they do not change the address in any way).

address

string

no

The generic address for this endpoint. If this attribute is used, the protocol must be specified as part of the URI. Alternatively, most transports provide their own attributes for specifying the address (path, host, etc.). Note that the address attribute cannot be combined with 'ref' or with the transport-provided alternative attributes.

responseTimeout

integer

no

The timeout for a response if making a synchronous endpoint call

encoding

string

no

String encoding used for messages.

connector-ref

string

no

The name of the connector associated with this endpoint. This must be specified if more than one connector is defined for this transport.

transformer-refs

list of names

no

A list of the transformers to apply (in order) to the message before it is delivered to the component.

responseTransformer-refs

list of names

no

A list of the transformers to apply (in order) to the synchronous response before it is returned via the transport.

disableTransportTransformer

boolean

no

Don’t use the default inbound/outbound/response transformer which corresponds to this endpoint’s transport, if any.

mime type

string

no

The mime type, for example, text/plain or application/json

exchange-pattern

enumeration

no

Child Elements of <endpoint…​>

Name Cardinality Description

abstract-reconnection-strategy

0..1

A placeholder for a reconnection strategy element. Reconnection strategies define how Mule should attempt to handle a connection failure.

abstract-multi-transaction

0..1

A placeholder for multi-transaction elements. Multi-transactions allow a series of operations to be grouped together spanning different transports, for example JMS and JDBC, but without the overhead of XA. The trade-off is that XA reliability guarantees aren’t available, and services must be ready to handle duplicates. This is very similar to a 1.5 PC concept. EE-only feature.

response

0..1

 

abstract-redelivery-policy

0..1

A placeholder for a redelivery policy. Redelivery policies determine what action to take when the same message is redelivered repeatedly.

abstract-transaction

0..1

A placeholder for transaction elements. Transactions allow a series of operations to be grouped together.

abstract-transformer

0..1

A placeholder for transformer elements. Transformers convert message payloads.

abstract-filter

0..1

A placeholder for filter elements, which control which messages are handled.

abstract-security-filter

0..1

A placeholder for security filter elements, which control access to the system.

abstract-intercepting-message-processor

0..1

A placeholder for intercepting router elements.

abstract-observer-message-processor

0..1

A placeholder for message processors that observe the message but do not mutate it used for example for logging.

processor

0..1

A reference to a message processor defined elsewhere.

custom-processor

0..1

 

abstract-mixed-content-message-processor

0..1

A placeholder for message processor elements.

property

0..*

Sets a Mule property. This is a name/value pair that can be set on components, services, etc., and which provide a generic way of configuring the system. Typically, you shouldn’t need to use a generic property like this, since almost all functionality is exposed via dedicated elements. However, it can be useful in configuring obscure or overlooked options and in configuring transports from the generic endpoint elements.

properties

0..1

A map of Mule properties.