org.jboss.resteasy.example.pubsub

## Class SubscriptionResource

- java.lang.Object
- - org.jboss.resteasy.example.pubsub.SubscriptionResource

-     @Path(value="/")
      public class SubscriptionResource
      extends Object

  Version:
    $Revision: 1 $
  Author:
    Bill Burke

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `protected Executor` | `executor`
    `protected ConcurrentHashMap<String,Subscriber>` | `subscribers`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `SubscriptionResource()`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `Response` | `create(UriInfo uriInfo, String name)`
    `void` | `longPoll(String name, AsyncResponse response)`
    `void` | `post(HttpHeaders headers, byte[] content)`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Field Detail

    - #### subscribers

          protected ConcurrentHashMap<String,Subscriber> subscribers

    - #### executor

          protected Executor executor

  - ### Constructor Detail

    - #### SubscriptionResource

          public SubscriptionResource()

  - ### Method Detail

    - #### create

          @POST
          @Path(value="subscribers")
          public Response create(@Context
                                       UriInfo uriInfo,
                                       @FormParam(value="name")
                                       String name)

    - #### post

          @POST
          @Path(value="subscription")
          public void post(@Context
                                 HttpHeaders headers,
                                 byte[] content)

    - #### longPoll

          @GET
          @Path(value="subscribers/{name}")
          public void longPoll(@PathParam(value="name")
                                    String name,
                                    @Suspended
                                    AsyncResponse response)

Copyright © 2014. All Rights Reserved.