Example usage for org.springframework.http MediaType TEXT_PLAIN_VALUE

List of usage examples for org.springframework.http MediaType TEXT_PLAIN_VALUE

Introduction

In this page you can find the example usage for org.springframework.http MediaType TEXT_PLAIN_VALUE.

Prototype

String TEXT_PLAIN_VALUE

To view the source code for org.springframework.http MediaType TEXT_PLAIN_VALUE.

Click Source Link

Document

A String equivalent of MediaType#TEXT_PLAIN .

Usage

From source file:org.talend.dataprep.command.GenericCommandTestService.java

@ApiOperation("Execute an operation")
@RequestMapping(value = "/command/test/fail_rejected_semaphore_fallback", method = RequestMethod.GET, consumes = MediaType.ALL_VALUE, produces = MediaType.TEXT_PLAIN_VALUE)
public void fail_with_rejected_semaphore_fallback() {
    throw new HystrixRuntimeException(HystrixRuntimeException.FailureType.REJECTED_SEMAPHORE_FALLBACK, null,
            "Rejected semaphore fallback", null, null);
}

From source file:org.talend.dataprep.command.GenericCommandTestService.java

@ApiOperation("Execute an operation")
@RequestMapping(value = "/command/test/fail_short_circuit", method = RequestMethod.GET, consumes = MediaType.ALL_VALUE, produces = MediaType.TEXT_PLAIN_VALUE)
public void fail_with_short_circuit() {
    throw new HystrixRuntimeException(HystrixRuntimeException.FailureType.SHORTCIRCUIT, null, "Short circuit",
            null, null);/*from w  w  w  . ja v  a2  s  .  c om*/
}

From source file:org.talend.dataprep.command.GenericCommandTestService.java

@ApiOperation("Execute an operation")
@RequestMapping(value = "/command/test/fail_timeout", method = RequestMethod.GET, consumes = MediaType.ALL_VALUE, produces = MediaType.TEXT_PLAIN_VALUE)
public void fail_with_timeout() {
    throw new HystrixRuntimeException(HystrixRuntimeException.FailureType.TIMEOUT, null, "Timeout", null, null);
}

From source file:org.talend.dataprep.dataset.store.content.http.MockRemoteHttpServer.java

@RequestMapping(value = "/not/so/far/away", method = RequestMethod.GET, consumes = MediaType.ALL_VALUE, produces = MediaType.TEXT_PLAIN_VALUE)
public String getSampleRemoteFile() throws IOException {
    return IOUtils.toString(this.getClass().getResourceAsStream("file.csv"));
}

From source file:org.talend.dataprep.dataset.store.content.http.MockRemoteHttpServer.java

@RequestMapping(value = "/cannot/be/reached", method = RequestMethod.GET, consumes = MediaType.ALL_VALUE, produces = MediaType.TEXT_PLAIN_VALUE)
public String wontGetSampleRemoteFile() {
    throw new ResourceNotFoundException();
}