@Override public javax.ws.rs.core.Response build() { StatusType st = status; if (st == null) { st = context.hasEntity() ? Status.OK : Status.NO_CONTENT; } return new OutboundJaxrsResponse(st, new OutboundMessageContext(context)); }
@Override public javax.ws.rs.core.Response build() { StatusType st = status; if (st == null) { st = context.hasEntity() ? Status.OK : Status.NO_CONTENT; } return new OutboundJaxrsResponse(st, new OutboundMessageContext(context)); }
/** * Get an OutboundJaxrsResponse instance for a given JAX-RS response. * * @param response response instance to from. * @return corresponding {@code OutboundJaxrsResponse} instance. */ public static OutboundJaxrsResponse from(javax.ws.rs.core.Response response) { if (response instanceof OutboundJaxrsResponse) { return (OutboundJaxrsResponse) response; } else { final StatusType status = response.getStatusInfo(); final OutboundMessageContext context = new OutboundMessageContext(); context.getHeaders().putAll(response.getMetadata()); context.setEntity(response.getEntity()); return new OutboundJaxrsResponse(status, context); } }
/** * Get an OutboundJaxrsResponse instance for a given JAX-RS response. * * @param response response instance to from. * @return corresponding {@code OutboundJaxrsResponse} instance. */ public static OutboundJaxrsResponse from(javax.ws.rs.core.Response response) { if (response instanceof OutboundJaxrsResponse) { return (OutboundJaxrsResponse) response; } else { final StatusType status = response.getStatusInfo(); final OutboundMessageContext context = new OutboundMessageContext(); context.getHeaders().putAll(response.getMetadata()); context.setEntity(response.getEntity()); return new OutboundJaxrsResponse(status, context); } }
@Override public void setResponseStatus(final int code) { StatusType type = Response.Status.fromStatusCode(code); if (type == null) { type = new StatusType() { @Override public int getStatusCode() { return code; } @Override public String getReasonPhrase() { return null; } @Override public Family getFamily() { return Family.familyOf(code); } }; } response = new OutboundJaxrsResponse(type, context); }
@Override public javax.ws.rs.core.Response build() { StatusType st = status; if (st == null) { st = context.hasEntity() ? Status.OK : Status.NO_CONTENT; } return new OutboundJaxrsResponse(st, new OutboundMessageContext(context)); }
@Override public javax.ws.rs.core.Response build() { StatusType st = status; if (st == null) { st = context.hasEntity() ? Status.OK : Status.NO_CONTENT; } return new OutboundJaxrsResponse(st, new OutboundMessageContext(context)); }
@Override public javax.ws.rs.core.Response build() { StatusType st = status; if (st == null) { st = context.hasEntity() ? Status.OK : Status.NO_CONTENT; } return new OutboundJaxrsResponse(st, new OutboundMessageContext(context)); }
@Override public javax.ws.rs.core.Response build() { StatusType st = status; if (st == null) { st = context.hasEntity() ? Status.OK : Status.NO_CONTENT; } return new OutboundJaxrsResponse(st, new OutboundMessageContext(context)); }
@Override public javax.ws.rs.core.Response build() { StatusType st = status; if (st == null) { st = context.hasEntity() ? Status.OK : Status.NO_CONTENT; } return new OutboundJaxrsResponse(st, new OutboundMessageContext(context)); }
/** * Get an OutboundJaxrsResponse instance for a given JAX-RS response. * * @param response response instance to from. * @return corresponding {@code OutboundJaxrsResponse} instance. */ public static OutboundJaxrsResponse from(javax.ws.rs.core.Response response) { if (response instanceof OutboundJaxrsResponse) { return (OutboundJaxrsResponse) response; } else { final StatusType status = response.getStatusInfo(); final OutboundMessageContext context = new OutboundMessageContext(); context.getHeaders().putAll(response.getMetadata()); context.setEntity(response.getEntity()); return new OutboundJaxrsResponse(status, context); } }
/** * Get an OutboundJaxrsResponse instance for a given JAX-RS response. * * @param response response instance to from. * @return corresponding {@code OutboundJaxrsResponse} instance. */ public static OutboundJaxrsResponse from(javax.ws.rs.core.Response response) { if (response instanceof OutboundJaxrsResponse) { return (OutboundJaxrsResponse) response; } else { final StatusType status = response.getStatusInfo(); final OutboundMessageContext context = new OutboundMessageContext(); context.getHeaders().putAll(response.getMetadata()); context.setEntity(response.getEntity()); return new OutboundJaxrsResponse(status, context); } }
/** * Get an OutboundJaxrsResponse instance for a given JAX-RS response. * * @param response response instance to from. * @return corresponding {@code OutboundJaxrsResponse} instance. */ public static OutboundJaxrsResponse from(javax.ws.rs.core.Response response) { if (response instanceof OutboundJaxrsResponse) { return (OutboundJaxrsResponse) response; } else { final StatusType status = response.getStatusInfo(); final OutboundMessageContext context = new OutboundMessageContext(); context.getHeaders().putAll(response.getMetadata()); context.setEntity(response.getEntity()); return new OutboundJaxrsResponse(status, context); } }
/** * Get an OutboundJaxrsResponse instance for a given JAX-RS response. * * @param response response instance to from. * @return corresponding {@code OutboundJaxrsResponse} instance. */ public static OutboundJaxrsResponse from(javax.ws.rs.core.Response response) { if (response instanceof OutboundJaxrsResponse) { return (OutboundJaxrsResponse) response; } else { final StatusType status = response.getStatusInfo(); final OutboundMessageContext context = new OutboundMessageContext(); context.getHeaders().putAll(response.getMetadata()); context.setEntity(response.getEntity()); return new OutboundJaxrsResponse(status, context); } }
/** * Get an OutboundJaxrsResponse instance for a given JAX-RS response. * * @param response response instance to from. * @return corresponding {@code OutboundJaxrsResponse} instance. */ public static OutboundJaxrsResponse from(javax.ws.rs.core.Response response) { if (response instanceof OutboundJaxrsResponse) { return (OutboundJaxrsResponse) response; } else { final StatusType status = response.getStatusInfo(); final OutboundMessageContext context = new OutboundMessageContext(); context.getHeaders().putAll(response.getMetadata()); context.setEntity(response.getEntity()); return new OutboundJaxrsResponse(status, context); } }