@Override public MultivaluedMap<String, Object> getHeaders() { return jaxrsResponse.getMetadata(); }
public static MediaType resolveContentType(BuiltResponse response) { MediaType responseContentType = null; Object type = response.getMetadata().getFirst(HttpHeaderNames.CONTENT_TYPE); if (type == null) { return MediaType.WILDCARD_TYPE; } if (type instanceof MediaType) { responseContentType = (MediaType) type; } else { responseContentType = MediaType.valueOf(type.toString()); } return responseContentType; }
private BuiltResponse createResponse(Object value, MediaType contentType) { BuiltResponse responseImpl = new BuiltResponse(); responseImpl.setEntity(value); if (contentType != null) responseImpl.getMetadata().putSingle(HttpHeaderNames.CONTENT_TYPE, contentType); return responseImpl; }
public static void commitHeaders(BuiltResponse jaxrsResponse, HttpResponse response) if (jaxrsResponse.getMetadata() != null) List<Object> cookies = jaxrsResponse.getMetadata().get( HttpHeaderNames.SET_COOKIE); if (cookies != null) jaxrsResponse.getMetadata().remove(HttpHeaderNames.SET_COOKIE); if (jaxrsResponse.getMetadata() != null && jaxrsResponse.getMetadata().size() > 0) response.getOutputHeaders().putAll(jaxrsResponse.getMetadata());
@Override public MultivaluedMap<String, Object> getHeaders() { return jaxrsResponse.getMetadata(); }
@Override public MultivaluedMap<String, Object> getHeaders() { return jaxrsResponse.getMetadata(); }
public ServerResponse(final BuiltResponse response) { this.setEntity(response.getEntity()); this.setAnnotations(response.getAnnotations()); this.setStatus(response.getStatus()); this.setMetadata(response.getMetadata()); this.setEntityClass(response.getEntityClass()); this.setGenericType(response.getGenericType()); this.setReasonPhrase(response.getReasonPhrase()); } }
jaxrsResponse.getMetadata(), os, request);
public static MediaType resolveContentType(BuiltResponse response) { MediaType responseContentType = null; Object type = response.getMetadata().getFirst(HttpHeaderNames.CONTENT_TYPE); if (type == null) { return MediaType.WILDCARD_TYPE; } if (type instanceof MediaType) { responseContentType = (MediaType) type; } else { responseContentType = MediaType.valueOf(type.toString()); } return responseContentType; }
public static MediaType resolveContentType(BuiltResponse response) { MediaType responseContentType = null; Object type = response.getMetadata().getFirst(HttpHeaderNames.CONTENT_TYPE); if (type == null) { return MediaType.WILDCARD_TYPE; } if (type instanceof MediaType) { responseContentType = (MediaType) type; } else { responseContentType = MediaType.valueOf(type.toString()); } return responseContentType; }
public static void commitHeaders(BuiltResponse jaxrsResponse, HttpResponse response) if (jaxrsResponse.getMetadata() != null) List<Object> cookies = jaxrsResponse.getMetadata().get( HttpHeaderNames.SET_COOKIE); if (cookies != null) jaxrsResponse.getMetadata().remove(HttpHeaderNames.SET_COOKIE); if (jaxrsResponse.getMetadata() != null && jaxrsResponse.getMetadata().size() > 0) response.getOutputHeaders().putAll(jaxrsResponse.getMetadata());
public static void commitHeaders(BuiltResponse jaxrsResponse, HttpResponse response) if (jaxrsResponse.getMetadata() != null) List<Object> cookies = jaxrsResponse.getMetadata().get( HttpHeaderNames.SET_COOKIE); if (cookies != null) jaxrsResponse.getMetadata().remove(HttpHeaderNames.SET_COOKIE); if (jaxrsResponse.getMetadata() != null && jaxrsResponse.getMetadata().size() > 0) response.getOutputHeaders().putAll(jaxrsResponse.getMetadata());
public ServerResponse(final BuiltResponse response) { this.setEntity(response.getEntity()); this.setAnnotations(response.getAnnotations()); this.setStatus(response.getStatus()); this.setMetadata(response.getMetadata()); this.setEntityClass(response.getEntityClass()); this.setGenericType(response.getGenericType()); this.setReasonPhrase(response.getReasonPhrase()); } }
public ServerResponse(BuiltResponse response) { this.setEntity(response.getEntity()); this.setAnnotations(response.getAnnotations()); this.setStatus(response.getStatus()); this.setMetadata(response.getMetadata()); this.setEntityClass(response.getEntityClass()); this.setGenericType(response.getGenericType()); this.setReasonPhrase(response.getReasonPhrase()); } }
jaxrsResponse.getMetadata(), os, request); writerContext.proceed(); if(sendHeaders) {
jaxrsResponse.getMetadata(), os, request);