@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)
ClusterManagementServiceTransport
configureConnection
in interface ClusterManagementServiceTransport
connectionConfig
- ConnectionConfig
holding connection configuration information.public <T extends AbstractConfiguration<?>> ClusterManagementRealizationResult submitMessage(T configMessage, CommandType command)
ClusterManagementServiceTransport
ClusterManagementService.create(T)
and ClusterManagementService.delete(T)
commands.submitMessage
in interface ClusterManagementServiceTransport
T
- configuration object which extends AbstractConfiguration
configMessage
- configuration objectcommand
- the command to useClusterManagementRealizationResult
public <T extends AbstractConfiguration<R>,R extends RuntimeInfo> ClusterManagementGetResult<T,R> submitMessageForGet(T config)
ClusterManagementServiceTransport
ClusterManagementService.get(T)
command.submitMessageForGet
in interface ClusterManagementServiceTransport
T
- configuration object which extends AbstractConfiguration
R
- the type of the corresponding runtime informationconfig
- configuration objectClusterManagementGetResult
public <T extends AbstractConfiguration<R>,R extends RuntimeInfo> ClusterManagementListResult<T,R> submitMessageForList(T config)
ClusterManagementServiceTransport
ClusterManagementService.list(AbstractConfiguration)
command.submitMessageForList
in interface ClusterManagementServiceTransport
T
- configuration object which extends AbstractConfiguration
R
- the type of the corresponding runtime informationconfig
- configuration objectClusterManagementListResult
public <A extends ClusterManagementOperation<V>,V extends OperationResult> ClusterManagementListOperationsResult<A,V> submitMessageForListOperation(A opType)
ClusterManagementServiceTransport
ClusterManagementService.list(ClusterManagementOperation)
command.submitMessageForListOperation
in interface ClusterManagementServiceTransport
A
- operation of type ClusterManagementOperation
V
- result of type OperationResult
opType
- the operation for which a message should be submittedClusterManagementListResult
public <A extends ClusterManagementOperation<V>,V extends OperationResult> ClusterManagementOperationResult<A,V> submitMessageForGetOperation(A op, String operationId)
ClusterManagementServiceTransport
ClusterManagementService.get(AbstractConfiguration)
command.submitMessageForGetOperation
in interface ClusterManagementServiceTransport
A
- operation of type ClusterManagementOperation
V
- result of type OperationResult
op
- the operation for which a message should be submittedoperationId
- the identifier of the operationClusterManagementListResult
public <A extends ClusterManagementOperation<V>,V extends OperationResult> ClusterManagementOperationResult<A,V> submitMessageForStart(A op)
ClusterManagementServiceTransport
ClusterManagementService.start(ClusterManagementOperation)
command.submitMessageForStart
in interface ClusterManagementServiceTransport
A
- operation of type ClusterManagementOperation
V
- result of type OperationResult
op
- the operation for which a message should be submittedClusterManagementListResult
public boolean isConnected()
ClusterManagementServiceTransport
isConnected
in interface ClusterManagementServiceTransport
public void close()
ClusterManagementServiceTransport
close
in interface ClusterManagementServiceTransport