ClusterManagementServiceTransport (Apache Geode 1.12.3)
Date: 2021-06-11

org.apache.geode.management.api

## Interface ClusterManagementServiceTransport

- All Known Implementing Classes:
    RestTemplateClusterManagementServiceTransport

      @Experimental
      public interface ClusterManagementServiceTransport

  Interface which abstracts the transport between the CMS client and the endpoint. Currently only an http implementation exists. However it does allow for different implementations; perhaps something that doesn't use `RestTemplate`. This interface supports the operations from `ClusterManagementService`.

- - ### Method Summary

    All Methods Instance Methods Abstract 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, Class<? extends ClusterManagementRealizationResult> responseType)` Submit a message with a specific command.
    `<T extends AbstractConfiguration<R>,R extends RuntimeInfo> ClusterManagementGetResult<T,R>` | `submitMessageForGet(T configMessage, Class<? extends ClusterManagementGetResult> responseType)` Submit a message with a specific command which returns a single result.
    `<T extends AbstractConfiguration<R>,R extends RuntimeInfo> ClusterManagementListResult<T,R>` | `submitMessageForList(T configMessage, Class<? extends ClusterManagementListResult> responseType)` Submit a message with a specific command which returns a list result.
    `<A extends ClusterManagementOperation<V>,V extends OperationResult> ClusterManagementListOperationsResult<V>` | `submitMessageForListOperation(A opType, Class<? extends ClusterManagementListOperationsResult> responseType)` Submit a message for a specific command which returns a list result of operations in progress.
    `<A extends ClusterManagementOperation<V>,V extends OperationResult> ClusterManagementOperationResult<V>` | `submitMessageForStart(A op)` Submit a message to start a specific command.

- - ### Method Detail

    - #### submitMessage

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

      Submit a message with a specific command. This supports the `ClusterManagementService.create(T)` and `ClusterManagementService.delete(T)` commands.
      Type Parameters:
        `T` - configuration object which extends `AbstractConfiguration`
      Parameters:
        `configMessage` - configuration object
        `command` - the command to use
        `responseType` - the expected response class
      Returns:
        `ClusterManagementRealizationResult`

    - #### submitMessageForList

          <T extends AbstractConfiguration<R>,R extends RuntimeInfo> ClusterManagementListResult<T,R> submitMessageForList(T configMessage,
                                                                                                                           Class<? extends ClusterManagementListResult> responseType)

      Submit a message with a specific command which returns a list result. This supports the `ClusterManagementService.list(AbstractConfiguration)` command.
      Type Parameters:
        `T` - configuration object which extends `AbstractConfiguration`
      Parameters:
        `configMessage` - configuration object
        `responseType` - the expected response class
      Returns:
        `ClusterManagementListResult`

    - #### submitMessageForGet

          <T extends AbstractConfiguration<R>,R extends RuntimeInfo> ClusterManagementGetResult<T,R> submitMessageForGet(T configMessage,
                                                                                                                         Class<? extends ClusterManagementGetResult> responseType)

      Submit a message with a specific command which returns a single result. This supports the `ClusterManagementService.get(T)` command.
      Type Parameters:
        `T` - configuration object which extends `AbstractConfiguration`
      Parameters:
        `configMessage` - configuration object
        `responseType` - the expected response class
      Returns:
        `ClusterManagementGetResult`

    - #### submitMessageForListOperation

          <A extends ClusterManagementOperation<V>,V extends OperationResult> ClusterManagementListOperationsResult<V> submitMessageForListOperation(A opType,
                                                                                                                                                     Class<? extends ClusterManagementListOperationsResult> responseType)

      Submit a message for a specific command which returns a list result of operations in progress. This supports the `ClusterManagementService.list(ClusterManagementOperation)` command.
      Type Parameters:
        `A` - operation of type `ClusterManagementOperation`
      Parameters:
        `responseType` - the expected response class
      Returns:
        `ClusterManagementListResult`

    - #### submitMessageForStart

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

      Submit a message to start a specific command. This supports the `ClusterManagementService.start(ClusterManagementOperation)` command.
      Type Parameters:
        `A` - operation of type `ClusterManagementOperation`
      Returns:
        `ClusterManagementListResult`

    - #### isConnected

          boolean isConnected()

      Indicate whether this transport is currently connected
      Returns:
        boolean indicating whether connected

    - #### configureConnection

          void configureConnection(ConnectionConfig connectionConfig)

      Configure the transport with using connectionConfig.
      Parameters:
        `connectionConfig` - `ConnectionConfig` holding connection configuration information.

    - #### close

          void close()

      Close the transport.