---
schema_version: "1"
id: ed2d26b4d5fe58b4fe1e090b049ab737dc6a6536f4d933cf3256d1e68bcdf415
title: Importing Types From Other Modules
collection: mulesoft
version: current
locale: en-us
portal_url: https://docs.salesforce.com/mulesoft/current/en-us/mule-sdk/latest/imported-types.md
canonical_url: https://docs.mulesoft.com/mule-sdk/latest/imported-types
source_site: docs.mulesoft.com
content_type: documentation
content_hash: 7b8d97295080234ad23d1dcf94a3f9210d254eb0c9388157e7f986239229fa11
description: MuleSoft Documentation Site
release: "1.13"
latest: true
---
---
product: Mule SDK
version: 1.13
is-latest-version: true
keywords: parameter, parameters, mule, sdk, dsl, xml, import, type
---

# Importing Types From Other Modules

> For the full documentation index, see: https://docs.mulesoft.com/llms.txt

Every module can declare a set of types that are part of the module’s API. This set of types can
then be imported by other modules, while keeping the original module’s namespace definition.

Importing another module’s types is useful in many cases, including:

- Reusing the logic bundled inside the type, such as a specific authentication method.

- Exposing the user to the same API for configuring the same properties. For example, if you want to
  configure the same parameters in the same order, with the same descriptions, you can enforce that
  by using the same types in different modules.

You can reuse a module’s type in three steps:

1.  Add the dependency in your `pom.xml` to the `mule-plugin` whose API you want to use:

    ```xml
        <dependency>
            <groupId>org.mule.connectors</groupId>
            <artifactId>mule-sockets-connector</artifactId> (1)
            <version>${muleSocketsConnectorVersion}</version>
            <classifier>mule-plugin</classifier> (2)
        </dependency>
    ```

    <table><tbody><tr><td><i data-value="1"></i><b>1</b></td><td>The module where the Type is declared</td></tr><tr><td><i data-value="2"></i><b>2</b></td><td>Remember to add the <code>mule-plugin</code> classifier in the dependency</td></tr></tbody></table>

2.  Declare an `@Import` in the Extension class referencing the type you want to import:

    ```java
    @Extension(name = "HTTP")
    @Import(type = TcpClientSocketProperties.class)
    @Import(type = TcpServerSocketProperties.class)
    public class HttpConnector {

    }
    ```

3.  Use the types in your parameters declaration:

    ```java
    @Alias("request")
    public class HttpRequesterProvider implements CachedConnectionProvider<HttpExtensionClient> {

      @Parameter
      private TcpClientSocketProperties clientSocketProperties;

    }
    ```

Notice how this changes the DSL declaration, since now your extension (in this case `http`) can
receive parameters declared in another namespace (in this example, `sockets`):

```xml
<http:request-connection>
  <http:client-socket-properties>
      <sockets:tcp-client-socket-properties connectionTimeout="1000" keepAlive="true" receiveBufferSize="1024"/>
  </http:client-socket-properties>
</http:request-connection>
```
