com.smartgwt.client.types

## Enum RPCTransport

- java.lang.Object
- - java.lang.Enum<RPCTransport>
  - - com.smartgwt.client.types.RPCTransport

- All Implemented Interfaces:
    ValueEnum, java.io.Serializable, java.lang.Comparable<RPCTransport>

      public enum RPCTransport
      extends java.lang.Enum<RPCTransport>
      implements ValueEnum

  Smart GWT supports multiple RPC transports for maximum compatibility and feature richness. All of transports use HTTP as the underlying protocol, but use different mechanisms for sending the HTTP request and processing the response. The transport is typically auto-selected for by based on the feature being used and the current browser settings. For advanced use cases, `transport` and `defaultTransport` are exposed as override points.

- - ### Enum Constant Summary

    Enum Constants
    Enum Constant and Description
    `HIDDENFRAME` Available with Smart GWT Server only.
    `SCRIPTINCLUDE` Write a SCRIPT tag into the DOM with a SRC attribute that targets an arbitrary URL.
    `XMLHTTPREQUEST` Uses the XMLHttpRequest object to make the request to the server.

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `java.lang.String` | `getValue()`
    `static RPCTransport` | `valueOf(java.lang.String name)` Returns the enum constant of this type with the specified name.
    `static RPCTransport[]` | `values()` Returns an array containing the constants of this enum type, in the order they are declared.

    - ### Methods inherited from class java.lang.Enum

      `clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf`

    - ### Methods inherited from class java.lang.Object

      `getClass, notify, notifyAll, wait, wait, wait`

- - ### Enum Constant Detail

    - #### XMLHTTPREQUEST

          public static final RPCTransport XMLHTTPREQUEST

      Uses the XMLHttpRequest object to make the request to the server. Note that in some browsers with certain configurations, this transport may not be available. See `PlatformDependencies` for more information. This transport is not useful with file uploads. Cannot be used to target cross-domain URLs directly.

    - #### SCRIPTINCLUDE

          public static final RPCTransport SCRIPTINCLUDE

      Write a SCRIPT tag into the DOM with a SRC attribute that targets an arbitrary URL. This transport is the only one that allows direct cross-domain URL access.

      For `callback` to work, the server being contacted must support the ability to generate JavaScript code in the response that will call a JavaScript function generated by Smart GWT. Smart GWT passes the name of the function to call via a URL parameter, which can be controlled with `callbackParam`.

    - #### HIDDENFRAME

          public static final RPCTransport HIDDENFRAME

      Available with Smart GWT Server only. An HTML form is dynamically assembled that targets a hidden IFRAME. This mechanism is supported on all browsers and cannot be disabled by end users.

      If using the Smart GWT Server and using `Server-side data integration`, the "hiddenFrame" transport is automatically used for all RPCManager and DataSource requests if the "xmlHttpRequest" transport is not available.

      Cannot be used to target cross-domain URLs directly.

  - ### Method Detail

    - #### values

          public static RPCTransport[] values()

      Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:

          for (RPCTransport c : RPCTransport.values())
              System.out.println(c);

      Returns:
        an array containing the constants of this enum type, in the order they are declared

    - #### valueOf

          public static RPCTransport valueOf(java.lang.String name)

      Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)
      Parameters:
        `name` - the name of the enum constant to be returned.
      Returns:
        the enum constant with the specified name
      Throws:
        `java.lang.IllegalArgumentException` - if this enum type has no constant with the specified name
        `java.lang.NullPointerException` - if the argument is null

    - #### getValue

          public java.lang.String getValue()

      Specified by:
        `getValue` in interface `ValueEnum`