Class FileResource
- java.lang.Object
-
- org.apache.camel.quarkus.component.file.it.FileResource
-
@Path("/file") @ApplicationScoped public class FileResource extends Object
-
-
Field Summary
Fields Modifier and Type Field Description static StringCONSUME_BATCH(package private) org.apache.camel.ConsumerTemplateconsumerTemplate(package private) org.apache.camel.CamelContextcontext(package private) org.apache.camel.ProducerTemplateproducerTemplatestatic StringSEPARATORstatic StringSORT_BY
-
Constructor Summary
Constructors Constructor Description FileResource()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description javax.ws.rs.core.ResponsecreateFile(String folder, byte[] content, String charset, String fileName)Map<String,Object>getBatch()StringgetFile(String folder, String name)StringgetFromMock(String mockId)StringpollEnrich(String body, String route)voidresetMock(String mockId)voidstartRoute(String routeId)voidwriteThenReadFileWithCharsetShouldSucceed()
-
-
-
Field Detail
-
CONSUME_BATCH
public static String CONSUME_BATCH
-
SORT_BY
public static String SORT_BY
-
SEPARATOR
public static String SEPARATOR
-
producerTemplate
@Inject org.apache.camel.ProducerTemplate producerTemplate
-
consumerTemplate
@Inject org.apache.camel.ConsumerTemplate consumerTemplate
-
context
@Inject org.apache.camel.CamelContext context
-
-
Method Detail
-
getFile
@Path("/get/{folder}/{name}") @GET @Produces("text/plain") public String getFile(@PathParam("folder") String folder, @PathParam("name") String name) throws Exception- Throws:
Exception
-
getBatch
@Path("/getBatch") @GET @Produces("application/json") public Map<String,Object> getBatch() throws Exception- Throws:
Exception
-
startRoute
@Path("/startRoute") @POST @Consumes("text/plain") public void startRoute(String routeId) throws Exception- Throws:
Exception
-
getFromMock
@Path("/getFromMock/{mockId}") @GET public String getFromMock(@PathParam("mockId") String mockId)
-
resetMock
@Path("/resetMock/{mockId}") @GET public void resetMock(@PathParam("mockId") String mockId)
-
createFile
@Path("/create/{folder}") @POST @Consumes("application/octet-stream") @Produces("text/plain") public javax.ws.rs.core.Response createFile(@PathParam("folder") String folder, byte[] content, @QueryParam("charset") String charset, @QueryParam("fileName") String fileName) throws Exception- Throws:
Exception
-
pollEnrich
@Path("/route/{route}") @POST @Consumes("text/plain") public String pollEnrich(String body, @PathParam("route") String route) throws Exception- Throws:
Exception
-
-