Package javax.ws.rs.core.Response

Examples of javax.ws.rs.core.Response.ResponseBuilder.cookie()


                .outbound(new RestPayloadImpl.Outbound(false))
                .managedJob()
                .parameters(params);
        ResponseBuilder rb = Response.status(HttpURLConnection.HTTP_OK);
        if ( isSingleInstanceCommand(model)) {
            rb.cookie(getJSessionCookie(jSessionId));
        }
        rb.entity(SseCommandHelper.invokeAsync(commandInvocation, null));
        return rb.build();
    }
View Full Code Here


        } else {
            rb.type(MediaType.APPLICATION_JSON_TYPE);
            rb.entity(ar);
        }
        if ( isSingleInstanceCommand(model)) {
            rb.cookie(getJSessionCookie(jSessionId));
        }
        return rb.build();
    }

    /** Some ActionReporters has special logic which must be reflected here
View Full Code Here

              .getAdminCookieMaxageMinutes();
          NewCookie cookieUsername = new NewCookie("username", admin
              .getUsername(), null, null, null, maxAge, false);
          NewCookie cookiePassword = new NewCookie("password", admin
              .getPassword(), null, null, null, maxAge, false);
          rb.cookie(cookieUsername, cookiePassword);
        }
      }

      result = rb.build();
    } catch (Exception ex) {
View Full Code Here

    @PUT
    @Produces("text/plain")
    public Response setCookies() {
        ResponseBuilder rb = Response.ok();
        rb.cookie(new NewCookie("name", "value", uri.getBaseUri().getPath() + uri.getPath(), uri
            .getBaseUri().getHost().toLowerCase(), "comment", 10, false));
        rb.cookie(new NewCookie("name2", "value2", uri.getBaseUri().getPath() + uri.getPath(), uri
            .getBaseUri().getHost().toLowerCase(), "comment2", 10, false));
        rb.cookie(new NewCookie("name3", "value3", uri.getBaseUri().getPath() + uri.getPath(), uri
            .getBaseUri().getHost().toLowerCase(), "comment2", 10, false));
View Full Code Here

    @Produces("text/plain")
    public Response setCookies() {
        ResponseBuilder rb = Response.ok();
        rb.cookie(new NewCookie("name", "value", uri.getBaseUri().getPath() + uri.getPath(), uri
            .getBaseUri().getHost().toLowerCase(), "comment", 10, false));
        rb.cookie(new NewCookie("name2", "value2", uri.getBaseUri().getPath() + uri.getPath(), uri
            .getBaseUri().getHost().toLowerCase(), "comment2", 10, false));
        rb.cookie(new NewCookie("name3", "value3", uri.getBaseUri().getPath() + uri.getPath(), uri
            .getBaseUri().getHost().toLowerCase(), "comment2", 10, false));
        return rb.build();
    }
View Full Code Here

        ResponseBuilder rb = Response.ok();
        rb.cookie(new NewCookie("name", "value", uri.getBaseUri().getPath() + uri.getPath(), uri
            .getBaseUri().getHost().toLowerCase(), "comment", 10, false));
        rb.cookie(new NewCookie("name2", "value2", uri.getBaseUri().getPath() + uri.getPath(), uri
            .getBaseUri().getHost().toLowerCase(), "comment2", 10, false));
        rb.cookie(new NewCookie("name3", "value3", uri.getBaseUri().getPath() + uri.getPath(), uri
            .getBaseUri().getHost().toLowerCase(), "comment2", 10, false));
        return rb.build();
    }

    @CookieParam("name3")
View Full Code Here

                .outbound(new RestPayloadImpl.Outbound(false))
                .managedJob()
                .parameters(params);
        ResponseBuilder rb = Response.status(HttpURLConnection.HTTP_OK);
        if ( isSingleInstanceCommand(model)) {
            rb.cookie(getJSessionCookie(jSessionId));
        }
        rb.entity(SseCommandHelper.invokeAsync(commandInvocation, null));
        return rb.build();
    }
View Full Code Here

        } else {
            rb.type(MediaType.APPLICATION_JSON_TYPE);
            rb.entity(ar);
        }
        if ( isSingleInstanceCommand(model)) {
            rb.cookie(getJSessionCookie(jSessionId));
        }
        return rb.build();
    }

    /** Some ActionReporters has special logic which must be reflected here
View Full Code Here

                .subject(getSubject())
                .managedJob()
                .parameters(params);
        ResponseBuilder rb = Response.status(HttpURLConnection.HTTP_OK);
        if ( isSingleInstanceCommand(model)) {
            rb.cookie(getJSessionCookie(jSessionId));
        }
        rb.entity(SseCommandHelper.invokeAsync(commandInvocation, null));
        return rb.build();
    }
View Full Code Here

        } else {
            rb.type(MediaType.APPLICATION_JSON_TYPE);
            rb.entity(ar);
        }
        if ( isSingleInstanceCommand(model)) {
            rb.cookie(getJSessionCookie(jSessionId));
        }
        return rb.build();
    }

    /** Some ActionReporters has special logic which must be reflected here
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.