@RestController @RequestMapping(value="/streams/definitions") @ExposesResourceFor(value=StreamDefinitionResource.class) public class StreamDefinitionController extends Object
StreamDefinition. This
includes CRUD and optional deployment operations.| Constructor and Description |
|---|
StreamDefinitionController(StreamDefinitionRepository repository,
DeploymentIdRepository deploymentIdRepository,
StreamDeploymentController deploymentController,
org.springframework.cloud.deployer.spi.app.AppDeployer deployer,
AppRegistry appRegistry)
Create a
StreamDefinitionController that delegates
CRUD operations to the provided StreamDefinitionRepository
deployment ID operations to the provided DeploymentIdRepository
deployment operations to the provided StreamDeploymentController
deployment status computation to the provided AppDeployer
|
| Modifier and Type | Method and Description |
|---|---|
void |
delete(String name)
Request removal of an existing stream definition.
|
void |
deleteAll()
Request removal of all stream definitions.
|
StreamDefinitionResource |
display(String name)
Return a given stream definition resource.
|
org.springframework.hateoas.PagedResources<StreamDefinitionResource> |
list(org.springframework.data.domain.Pageable pageable,
org.springframework.data.web.PagedResourcesAssembler<StreamDefinition> assembler)
Return a page-able list of
StreamDefinitionResource defined streams. |
void |
save(String name,
String dsl,
boolean deploy)
Create a new stream.
|
public StreamDefinitionController(StreamDefinitionRepository repository, DeploymentIdRepository deploymentIdRepository, StreamDeploymentController deploymentController, org.springframework.cloud.deployer.spi.app.AppDeployer deployer, AppRegistry appRegistry)
StreamDefinitionController that delegates
StreamDefinitionRepositoryDeploymentIdRepositoryStreamDeploymentControllerAppDeployerrepository - the repository this controller will use for stream CRUD operationsdeploymentIdRepository - the repository this controller will use for deployment IDsdeploymentController - the deployment controller to delegate deployment operationsdeployer - the deployer this controller will use to compute deployment statusappRegistry - the app registry to look up registered apps@RequestMapping(value="", method=GET) @ResponseStatus(value=OK) public org.springframework.hateoas.PagedResources<StreamDefinitionResource> list(org.springframework.data.domain.Pageable pageable, org.springframework.data.web.PagedResourcesAssembler<StreamDefinition> assembler)
StreamDefinitionResource defined streams.pageable - page-able collection of StreamDefinitionResources.assembler - assembler for StreamDefinition@RequestMapping(value="", method=POST) @ResponseStatus(value=CREATED) public void save(@RequestParam(value="name") String name, @RequestParam(value="definition") String dsl, @RequestParam(value="deploy",defaultValue="false") boolean deploy)
name - stream namedsl - DSL definition for streamdeploy - if true, the stream is deployed upon creation (default is false)DuplicateStreamDefinitionException - if a stream definition with the same name already exists@RequestMapping(value="/{name}", method=DELETE) @ResponseStatus(value=OK) public void delete(@PathVariable(value="name") String name)
name - the name of an existing stream definition (required)@RequestMapping(value="/{name}", method=GET) @ResponseStatus(value=OK) public StreamDefinitionResource display(@PathVariable(value="name") String name)
name - the name of an existing stream definition (required)@RequestMapping(value="", method=DELETE) @ResponseStatus(value=OK) public void deleteAll() throws Exception
ExceptionCopyright © 2016 Pivotal Software, Inc.. All rights reserved.