Class PubnubResource


  • @Path("/pubnub")
    public class PubnubResource
    extends Object
    • Field Detail

      • publishKey

        String publishKey
      • subscribeKey

        String subscribeKey
      • producerTemplate

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

        @Inject
        org.apache.camel.ConsumerTemplate consumerTemplate
      • context

        @Inject
        org.apache.camel.CamelContext context
    • Constructor Detail

      • PubnubResource

        public PubnubResource()
    • Method Detail

      • publish

        @Path("/publish/{channel}")
        @POST
        @Produces("text/plain")
        public javax.ws.rs.core.Response publish​(@PathParam("channel")
                                                 String channel,
                                                 String message)
                                          throws Exception
        Throws:
        Exception
      • subscribe

        @Path("/subscribe")
        @GET
        @Produces("text/plain")
        public String subscribe()
                         throws Exception
        Throws:
        Exception
      • presence

        @Path("/presence")
        @GET
        @Produces("text/plain")
        public String presence()
                        throws Exception
        Throws:
        Exception
      • setState

        @Path("/state")
        @POST
        @Produces("text/plain")
        public void setState()
                      throws Exception
        Throws:
        Exception
      • history

        @Path("/history")
        @GET
        @Produces("text/plain")
        public int history()
                    throws Exception
        Throws:
        Exception
      • herenow

        @Path("/herenow")
        @GET
        @Produces("text/plain")
        public int herenow()
                    throws Exception
        Throws:
        Exception
      • pubNub

        @Produces
        @Singleton
        @Named
        public com.pubnub.api.PubNub pubNub()