Commit 67817f47 authored by Andre Freyssinet's avatar Andre Freyssinet
Browse files

Returns links to frame parameter methods.

parent 00773e2d
......@@ -56,6 +56,8 @@ public class JmsService {
public static final String JMS = "jms";
public static final String JMS_CREATE_PROD = "create-producer";
public static final String JMS_CREATE_CONS = "create-consumer";
public static final String JMS_CREATE_PROD_FP = "create-producer-fp";
public static final String JMS_CREATE_CONS_FP = "create-consumer-fp";
@GET
@Produces(MediaType.TEXT_HTML)
......
......@@ -158,6 +158,8 @@ public class JndiService {
builder = Response.status(Response.Status.CREATED);
// Links for old style API
//link to the create producer
UriBuilder nextBuilder = uriInfo.getAbsolutePathBuilder().path(JmsService.JMS_CREATE_PROD);
builder.link(nextBuilder.build(), JmsService.JMS_CREATE_PROD);
......@@ -184,6 +186,36 @@ public class JndiService {
nextBuilder = uriInfo.getAbsolutePathBuilder().path(JmsService.JMS_CREATE_CONS);
nextBuilder.queryParam("session-mode", JMSContext.SESSION_TRANSACTED);
builder.link(nextBuilder.build(), JmsService.JMS_CREATE_CONS+"-transacted");
// Links for frame parameters API
//link to the create producer
nextBuilder = uriInfo.getAbsolutePathBuilder().path(JmsService.JMS_CREATE_PROD_FP);
builder.link(nextBuilder.build(), JmsService.JMS_CREATE_PROD_FP);
//link to the create producer DUPS_OK_ACKNOWLEDGE
nextBuilder = uriInfo.getAbsolutePathBuilder().path(JmsService.JMS_CREATE_PROD_FP);
nextBuilder.queryParam("session-mode", JMSContext.DUPS_OK_ACKNOWLEDGE);
builder.link(nextBuilder.build(), JmsService.JMS_CREATE_PROD_FP+"-dups-ok");
//link to the create producer SESSION_TRANSACTED
nextBuilder = uriInfo.getAbsolutePathBuilder().path(JmsService.JMS_CREATE_PROD_FP);
nextBuilder.queryParam("session-mode", JMSContext.SESSION_TRANSACTED);
builder.link(nextBuilder.build(), JmsService.JMS_CREATE_PROD_FP+"-transacted");
//link to the create consumer
nextBuilder = uriInfo.getAbsolutePathBuilder().path(JmsService.JMS_CREATE_CONS_FP);
builder.link(nextBuilder.build(), JmsService.JMS_CREATE_CONS_FP);
//link to the create consumer DUPS_OK_ACKNOWLEDGE
nextBuilder = uriInfo.getAbsolutePathBuilder().path(JmsService.JMS_CREATE_CONS_FP);
nextBuilder.queryParam("session-mode", JMSContext.DUPS_OK_ACKNOWLEDGE);
builder.link(nextBuilder.build(), JmsService.JMS_CREATE_CONS_FP+"-dups-ok");
//link to the create consumer CLIENT_ACKNOWLEDGE
nextBuilder = uriInfo.getAbsolutePathBuilder().path(JmsService.JMS_CREATE_CONS_FP);
nextBuilder.queryParam("session-mode", JMSContext.CLIENT_ACKNOWLEDGE);
builder.link(nextBuilder.build(), JmsService.JMS_CREATE_CONS_FP+"-client-ack");
//link to create consumer SESSION_TRANSACTED
nextBuilder = uriInfo.getAbsolutePathBuilder().path(JmsService.JMS_CREATE_CONS_FP);
nextBuilder.queryParam("session-mode", JMSContext.SESSION_TRANSACTED);
builder.link(nextBuilder.build(), JmsService.JMS_CREATE_CONS_FP+"-transacted");
//link to the lookup
nextBuilder = uriInfo.getAbsolutePathBuilder();
builder.link(nextBuilder.build(), "lookup");
......@@ -399,8 +431,8 @@ public class JndiService {
@DefaultValue(""+Message.DEFAULT_PRIORITY)@QueryParam("priority") int priority,
@DefaultValue(""+Message.DEFAULT_TIME_TO_LIVE)@QueryParam("time-to-live")long timeToLive,
@DefaultValue("0")@QueryParam("idle-timeout") long idleTimeout,
@QueryParam("user") String userName, // TODO: deprecates
@QueryParam("password")String password, // TODO: deprecates
@QueryParam("user") String userName, // TODO: Removes and renames userName2
@QueryParam("password")String password, // TODO: Removes and renames password2
@FormParam("user") String userName2,
@FormParam("password")String password2,
@Context UriInfo uriInfo) {
......@@ -511,8 +543,8 @@ public class JndiService {
@DefaultValue("false")@QueryParam("shared") boolean shared,
@QueryParam("sub-name") String subName,
@DefaultValue("0")@QueryParam("idle-timeout") long idleTimeout,
@QueryParam("user") String userName, // TODO: deprecates
@QueryParam("password")String password, // TODO: deprecates
@QueryParam("user") String userName, // TODO: removes and renames userName2
@QueryParam("password")String password, // TODO: removes and renames password2
@FormParam("user") String userName2,
@FormParam("password")String password2,
@Context UriInfo uriInfo) {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment