Class CamelResource


  • @Path("/mail")
    @ApplicationScoped
    public class CamelResource
    extends Object
    • Field Detail

      • producerTemplate

        @Inject
        org.apache.camel.ProducerTemplate producerTemplate
      • camelContext

        @Inject
        org.apache.camel.CamelContext camelContext
      • mailReceivedMessages

        @Inject
        @Named("mailReceivedMessages")
        List<Map<String,​Object>> mailReceivedMessages
    • Constructor Detail

      • CamelResource

        public CamelResource()
    • Method Detail

      • sendMail

        @Path("/send")
        @POST
        @Consumes("text/plain")
        public void sendMail​(@QueryParam("subject")
                             String subject,
                             @QueryParam("from")
                             String from,
                             @QueryParam("to")
                             String to,
                             @QueryParam("secured")
                             Boolean secured,
                             String body)
      • sendMailWithAttachment

        @Path("/send/attachment/{fileName}")
        @POST
        @Consumes("text/plain")
        public void sendMailWithAttachment​(@PathParam("fileName")
                                           String fileName,
                                           @QueryParam("subject")
                                           String subject,
                                           @QueryParam("from")
                                           String from,
                                           @QueryParam("to")
                                           String to,
                                           String body)
      • mimeMultipartUnmarshalMarshal

        @Path("/mimeMultipartUnmarshalMarshal")
        @POST
        @Consumes("text/plain")
        @Produces("text/plain")
        public String mimeMultipartUnmarshalMarshal​(String body)
      • mimeMultipart

        @Path("/mimeMultipartMarshal/{fileName}/{fileContent}")
        @POST
        @Consumes("text/plain")
        @Produces("text/plain")
        public String mimeMultipart​(@PathParam("fileName")
                                    String fileName,
                                    @PathParam("fileContent")
                                    String fileContent,
                                    String body)
      • getReceived

        @Path("/getReceived")
        @GET
        @Produces("application/json")
        public List<Map<String,​Object>> getReceived()
      • getReceivedAsString

        @Path("/getReceivedAsString")
        @GET
        @Produces("application/json")
        public List<Map<String,​Object>> getReceivedAsString()
                                                           throws javax.mail.MessagingException,
                                                                  IOException
        Throws:
        javax.mail.MessagingException
        IOException
      • clear

        @Path("/clear")
        @GET
        public void clear()
      • controlRoute

        @GET
        @Path("/route/{routeId}/{operation}")
        @Produces("text/plain")
        public String controlRoute​(@PathParam("routeId")
                                   String routeId,
                                   @PathParam("operation")
                                   String operation)
                            throws Exception
        Throws:
        Exception
      • stopConsumers

        @GET
        @Path("/stopConsumers")
        @Produces("text/plain")
        public void stopConsumers()
                           throws Exception
        Throws:
        Exception