RestTemplateClusterManagementServiceTransport (Apache Geode 1.13.3)
Date: 2021-06-22

org.apache.geode.management.api

## Class RestTemplateClusterManagementServiceTransport

- java.lang.Object
- - org.apache.geode.management.api.RestTemplateClusterManagementServiceTransport

- All Implemented Interfaces:
    ClusterManagementServiceTransport

      @Experimental
      public class RestTemplateClusterManagementServiceTransport
      extends Object
      implements ClusterManagementServiceTransport

  Concrete implementation of `ClusterManagementServiceTransport` which uses Spring's `RestTemplate` for communication between client and CMS endpoint.

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `RestTemplateClusterManagementServiceTransport(ConnectionConfig connectionConfig)`
    `RestTemplateClusterManagementServiceTransport(org.springframework.web.client.RestTemplate restTemplate)`
    `RestTemplateClusterManagementServiceTransport(org.springframework.web.client.RestTemplate restTemplate, ConnectionConfig connectionConfig)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `close()` Close the transport.
    `void` | `configureConnection(ConnectionConfig connectionConfig)` Configure the transport with using connectionConfig.
    `boolean` | `isConnected()` Indicate whether this transport is currently connected
    `<T extends AbstractConfiguration<?>> ClusterManagementRealizationResult` | `submitMessage(T configMessage, CommandType command)` Submit a message with a specific command.
    `<T extends AbstractConfiguration<R>,R extends RuntimeInfo> ClusterManagementGetResult<T,R>` | `submitMessageForGet(T config)` Submit a message with a specific command which returns a single result.
    `<A extends ClusterManagementOperation<V>,V extends OperationResult> ClusterManagementOperationResult<A,V>` | `submitMessageForGetOperation(A op, String operationId)` Submit a message for a specific command which returns a single operation in progress.
    `<T extends AbstractConfiguration<R>,R extends RuntimeInfo> ClusterManagementListResult<T,R>` | `submitMessageForList(T config)` Submit a message with a specific command which returns a list result.
    `<A extends ClusterManagementOperation<V>,V extends OperationResult> ClusterManagementListOperationsResult<A,V>` | `submitMessageForListOperation(A opType)` Submit a message for a specific command which returns a list result of operations in progress.
    `<A extends ClusterManagementOperation<V>,V extends OperationResult> ClusterManagementOperationResult<A,V>` | `submitMessageForStart(A op)` Submit a message to start a specific command.

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

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### RestTemplateClusterManagementServiceTransport

          public RestTemplateClusterManagementServiceTransport(org.springframework.web.client.RestTemplate restTemplate)

    - #### RestTemplateClusterManagementServiceTransport

          public RestTemplateClusterManagementServiceTransport(ConnectionConfig connectionConfig)

    - #### RestTemplateClusterManagementServiceTransport

          public RestTemplateClusterManagementServiceTransport(org.springframework.web.client.RestTemplate restTemplate,
                                                               ConnectionConfig connectionConfig)

  - ### Method Detail

    - #### configureConnection

          public void configureConnection(ConnectionConfig connectionConfig)

      Description copied from interface: `ClusterManagementServiceTransport`
      Configure the transport with using connectionConfig.
      Specified by:
        `configureConnection` in interface `ClusterManagementServiceTransport`
      Parameters:
        `connectionConfig` - `ConnectionConfig` holding connection configuration information.

    - #### submitMessage

          public <T extends AbstractConfiguration<?>> ClusterManagementRealizationResult submitMessage(T configMessage,
                                                                                                       CommandType command)

      Description copied from interface: `ClusterManagementServiceTransport`
      Submit a message with a specific command. This supports the `ClusterManagementService.create(T)` and `ClusterManagementService.delete(T)` commands.
      Specified by:
        `submitMessage` in interface `ClusterManagementServiceTransport`
      Type Parameters:
        `T` - configuration object which extends `AbstractConfiguration`
      Parameters:
        `configMessage` - configuration object
        `command` - the command to use
      Returns:
        `ClusterManagementRealizationResult`

    - #### submitMessageForGet

          public <T extends AbstractConfiguration<R>,R extends RuntimeInfo> ClusterManagementGetResult<T,R> submitMessageForGet(T config)

      Description copied from interface: `ClusterManagementServiceTransport`
      Submit a message with a specific command which returns a single result. This supports the `ClusterManagementService.get(T)` command.
      Specified by:
        `submitMessageForGet` in interface `ClusterManagementServiceTransport`
      Type Parameters:
        `T` - configuration object which extends `AbstractConfiguration`
      Parameters:
        `config` - configuration object
      Returns:
        `ClusterManagementGetResult`

    - #### submitMessageForList

          public <T extends AbstractConfiguration<R>,R extends RuntimeInfo> ClusterManagementListResult<T,R> submitMessageForList(T config)

      Description copied from interface: `ClusterManagementServiceTransport`
      Submit a message with a specific command which returns a list result. This supports the `ClusterManagementService.list(AbstractConfiguration)` command.
      Specified by:
        `submitMessageForList` in interface `ClusterManagementServiceTransport`
      Type Parameters:
        `T` - configuration object which extends `AbstractConfiguration`
      Parameters:
        `config` - configuration object
      Returns:
        `ClusterManagementListResult`

    - #### submitMessageForListOperation

          public <A extends ClusterManagementOperation<V>,V extends OperationResult> ClusterManagementListOperationsResult<A,V> submitMessageForListOperation(A opType)

      Description copied from interface: `ClusterManagementServiceTransport`
      Submit a message for a specific command which returns a list result of operations in progress. This supports the `ClusterManagementService.list(ClusterManagementOperation)` command.
      Specified by:
        `submitMessageForListOperation` in interface `ClusterManagementServiceTransport`
      Type Parameters:
        `A` - operation of type `ClusterManagementOperation`
      Returns:
        `ClusterManagementListResult`

    - #### submitMessageForGetOperation

          public <A extends ClusterManagementOperation<V>,V extends OperationResult> ClusterManagementOperationResult<A,V> submitMessageForGetOperation(A op,
                                                                                                                                                        String operationId)

      Description copied from interface: `ClusterManagementServiceTransport`
      Submit a message for a specific command which returns a single operation in progress. This supports the `ClusterManagementService.get(AbstractConfiguration)` command.
      Specified by:
        `submitMessageForGetOperation` in interface `ClusterManagementServiceTransport`
      Type Parameters:
        `A` - operation of type `ClusterManagementOperation`
        `operationId` - the identifier of the operation
      Returns:
        `ClusterManagementListResult`

    - #### submitMessageForStart

          public <A extends ClusterManagementOperation<V>,V extends OperationResult> ClusterManagementOperationResult<A,V> submitMessageForStart(A op)

      Description copied from interface: `ClusterManagementServiceTransport`
      Submit a message to start a specific command. This supports the `ClusterManagementService.start(ClusterManagementOperation)` command.
      Specified by:
        `submitMessageForStart` in interface `ClusterManagementServiceTransport`
      Type Parameters:
        `A` - operation of type `ClusterManagementOperation`
      Returns:
        `ClusterManagementListResult`

    - #### isConnected

          public boolean isConnected()

      Description copied from interface: `ClusterManagementServiceTransport`
      Indicate whether this transport is currently connected
      Specified by:
        `isConnected` in interface `ClusterManagementServiceTransport`
      Returns:
        boolean indicating whether connected

    - #### close

          public void close()

      Description copied from interface: `ClusterManagementServiceTransport`
      Close the transport.
      Specified by:
        `close` in interface `ClusterManagementServiceTransport`