Resource class implementing /queues/{name} path methods. More...
Public Member Functions | |
QueueResource (UriInfo uriInfo, EntityManager entityManagerConfig, EntityManager entityManagerData, String queueName) | |
Creates a new instance of QueueResource. More... | |
JSONObject | getQueue () |
GET method : returns an application/json formatted queue. More... | |
MessagesResource | getMessages () |
Method getMessages. More... | |
Response | updateQueue (JSONObject jsonEntity) |
PUT method : updates the queue. More... | |
Response | deleteQueue () |
DELETE method : deletes the queue. More... | |
String | toString () |
Method toString. More... | |
Static Public Member Functions | |
static QueueEntity | findByName (EntityManager entityManager, String name) |
Method findByName. More... | |
static JSONObject | asJson (QueueEntity queueEntity, String path) throws JSONException |
Returns the resource formatted as json. More... | |
Private Attributes | |
UriInfo | uriInfo |
Field uriInfo. More... | |
EntityManager | entityManagerConfig |
Field entityManagerConfig. More... | |
EntityManager | entityManagerData |
Field entityManagerData. More... | |
QueueEntity | queueEntity |
the JPA entity More... | |
String | queueName |
queue name More... | |
Static Private Attributes | |
static Logger | logger |
Field logger. More... | |
Resource class implementing /queues/{name} path methods.
|
inline |
Creates a new instance of QueueResource.
uriInfo | UriInfo actual uri passed by parent resource |
queueName | String Queue name |
entityManagerConfig | EntityManager |
entityManagerData | EntityManager |
|
inlinestatic |
Returns the resource formatted as json.
queueEntity | QueueEntity |
path | String |
JSONException |
|
inline |
DELETE method : deletes the queue.
|
inlinestatic |
Method findByName.
Looks for a QueueEntity based on it's name.
entityManager | EntityManager |
name | String |
|
inline |
Method getMessages.
|
inline |
GET method : returns an application/json formatted queue.
|
inline |
Method toString.
|
inline |
PUT method : updates the queue.
jsonEntity | JSONObject the queue holding new values |
|
private |
Field entityManagerConfig.
|
private |
Field entityManagerData.
|
staticprivate |
Field logger.
|
private |
the JPA entity
|
private |
queue name
|
private |
Field uriInfo.