com.mathworks.mps.client

## Interface MWClient

- All Known Implementing Classes:
    MWHttpClient

      public interface MWClient

  The MWClient interface needs to be implemented by a class that is meant to provide client-server communication for MATLAB Production Server.

- - ### Method Summary

    All Methods Instance Methods Abstract Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `close()` Close all open server connections and free any native resources.
    `MWInvokable` | `createComponentProxy(java.net.URL url)` Creates a proxy object reference to a deployable archive hosted by MATLAB Production Server.
    `MWInvokable` | `createComponentProxy(java.net.URL url, MWMarshalingRules marshalingRules)` Creates a reflection-based proxy object reference to a deployable hosted by MATLAB Production Server.
    `<T> T` | `createProxy(java.net.URL url, java.lang.Class<T> mwComponent)` Creates an interface-based proxy object reference to a deployable archive hosted by MATLAB Production Server.
    `java.lang.String` | `getID()` Get unique identifier for this client instance

- - ### Method Detail

    - #### createProxy

          <T> T createProxy(java.net.URL url,
                            java.lang.Class<T> mwComponent)

      Creates an interface-based proxy object reference to a deployable archive hosted by MATLAB Production Server. The deployable archive is identified by a URL. The type of this proxy object is determined by the second input `mwComponent`. The proxy object has public methods of the interface defined by `mwComponent`. This interface has methods with names of MATLAB functions in the deployable archive and with inputs and outputs consistent with MATLAB functions in terms of types and numbers. When a method is invoked, the proxy object establishes a client-server connection, sends the inputs to the MATLAB function and receives the result.
      Type Parameters:
        `T` - The type of the returned object
      Parameters:
        `url` - url to the deployable archive with the form: `http://<server_name>:<port_number>/<archive_name>`
        `mwComponent` - Reference to interface modeled after the deployable archive pointed by the URL
      Returns:
        An object of type T

    - #### createComponentProxy

          MWInvokable createComponentProxy(java.net.URL url,
                                           MWMarshalingRules marshalingRules)

      Creates a reflection-based proxy object reference to a deployable hosted by MATLAB Production Server. The deployable archive is identified by a URL. The proxy object has an `invoke` method to call MATLAB functions contained in the specified deployable archive.
      Parameters:
        `url` - url to the deployable archive with the form: `http://<server_name>:<port_number>/<CTF_name>`
        `marshalingRules` - List of java classes, used as input or output arguments to the MATLAB function, that represent a MATALB struct
      Returns:
        A reference to the proxy object that provides methods to directly invoke MATLAB functions

    - #### createComponentProxy

          MWInvokable createComponentProxy(java.net.URL url)

      Creates a proxy object reference to a deployable archive hosted by MATLAB Production Server. The deployable archive is identified by a URL. The proxy object has an `invoke` method to call MATLAB functions contained in the specified deployable archive.
      Parameters:
        `url` - url to the deployable archive with the form: `http://<server_name>:<port_number>/<CTF_name>`
      Returns:
        A reference to the proxy object that provides methods to directly invoke MATLAB functions

    - #### close

          void close()

      Close all open server connections and free any native resources.

    - #### getID

          java.lang.String getID()

      Get unique identifier for this client instance
      Returns:
        String representing the unique identifier for this instance of the client

Copyright 2010-2022 The MathWorks, Inc.