@Experimental public class RestTemplateClusterManagementServiceTransport extends Object implements ClusterManagementServiceTransport
ClusterManagementServiceTransport which uses Spring's
RestTemplate for communication between client and CMS endpoint.| Constructor and Description |
|---|
RestTemplateClusterManagementServiceTransport(ConnectionConfig connectionConfig) |
RestTemplateClusterManagementServiceTransport(org.springframework.web.client.RestTemplate restTemplate) |
RestTemplateClusterManagementServiceTransport(org.springframework.web.client.RestTemplate restTemplate,
ConnectionConfig connectionConfig) |
| 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<?>> |
submitMessage(T configMessage,
CommandType command)
Submit a message with a specific command.
|
<T extends AbstractConfiguration<R>,R extends RuntimeInfo> |
submitMessageForGet(T config)
Submit a message with a specific command which returns a single result.
|
<A extends ClusterManagementOperation<V>,V extends OperationResult> |
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> |
submitMessageForList(T config)
Submit a message with a specific command which returns a list result.
|
<A extends ClusterManagementOperation<V>,V extends OperationResult> |
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> |
submitMessageForStart(A op)
Submit a message to start a specific command.
|
public RestTemplateClusterManagementServiceTransport(org.springframework.web.client.RestTemplate restTemplate)
public RestTemplateClusterManagementServiceTransport(ConnectionConfig connectionConfig)
public RestTemplateClusterManagementServiceTransport(org.springframework.web.client.RestTemplate restTemplate,
ConnectionConfig connectionConfig)
public void configureConnection(ConnectionConfig connectionConfig)
ClusterManagementServiceTransportconfigureConnection in interface ClusterManagementServiceTransportconnectionConfig - ConnectionConfig holding connection configuration information.public <T extends AbstractConfiguration<?>> ClusterManagementRealizationResult submitMessage(T configMessage, CommandType command)
ClusterManagementServiceTransportClusterManagementService.create(T)
and ClusterManagementService.delete(T) commands.submitMessage in interface ClusterManagementServiceTransportT - configuration object which extends AbstractConfigurationconfigMessage - configuration objectcommand - the command to useClusterManagementRealizationResultpublic <T extends AbstractConfiguration<R>,R extends RuntimeInfo> ClusterManagementGetResult<T,R> submitMessageForGet(T config)
ClusterManagementServiceTransportClusterManagementService.get(T) command.submitMessageForGet in interface ClusterManagementServiceTransportT - configuration object which extends AbstractConfigurationR - the type of the corresponding runtime informationconfig - configuration objectClusterManagementGetResultpublic <T extends AbstractConfiguration<R>,R extends RuntimeInfo> ClusterManagementListResult<T,R> submitMessageForList(T config)
ClusterManagementServiceTransportClusterManagementService.list(AbstractConfiguration) command.submitMessageForList in interface ClusterManagementServiceTransportT - configuration object which extends AbstractConfigurationR - the type of the corresponding runtime informationconfig - configuration objectClusterManagementListResultpublic <A extends ClusterManagementOperation<V>,V extends OperationResult> ClusterManagementListOperationsResult<A,V> submitMessageForListOperation(A opType)
ClusterManagementServiceTransportClusterManagementService.list(ClusterManagementOperation) command.submitMessageForListOperation in interface ClusterManagementServiceTransportA - operation of type ClusterManagementOperationV - result of type OperationResultopType - the operation for which a message should be submittedClusterManagementListResultpublic <A extends ClusterManagementOperation<V>,V extends OperationResult> ClusterManagementOperationResult<A,V> submitMessageForGetOperation(A op, String operationId)
ClusterManagementServiceTransportClusterManagementService.get(AbstractConfiguration) command.submitMessageForGetOperation in interface ClusterManagementServiceTransportA - operation of type ClusterManagementOperationV - result of type OperationResultop - the operation for which a message should be submittedoperationId - the identifier of the operationClusterManagementListResultpublic <A extends ClusterManagementOperation<V>,V extends OperationResult> ClusterManagementOperationResult<A,V> submitMessageForStart(A op)
ClusterManagementServiceTransportClusterManagementService.start(ClusterManagementOperation) command.submitMessageForStart in interface ClusterManagementServiceTransportA - operation of type ClusterManagementOperationV - result of type OperationResultop - the operation for which a message should be submittedClusterManagementListResultpublic boolean isConnected()
ClusterManagementServiceTransportisConnected in interface ClusterManagementServiceTransportpublic void close()
ClusterManagementServiceTransportclose in interface ClusterManagementServiceTransport