/** * Permanently redirects the client to a target URI. The client is expected * to reuse the same method for the new request. * * @param targetRef * The target URI reference. */ public void redirectPermanent(Reference targetRef) { if (getResponse() != null) { getResponse().redirectPermanent(targetRef); } }
/** * Sets the server-specific information. * * @param serverInfo * The server-specific information. * @see Response#setServerInfo(ServerInfo) */ public void setServerInfo(ServerInfo serverInfo) { if (getResponse() != null) { getResponse().setServerInfo(serverInfo); } }
/** * Temporarily redirects the client to a target URI. The client is expected * to reuse the same method for the new request. * * @param targetRef * The target reference. */ public void redirectTemporary(Reference targetRef) { if (getResponse() != null) { getResponse().redirectTemporary(targetRef); } }
/** * Sets the cookie settings provided by the server. * * @param cookieSettings * The cookie settings provided by the server. * @see Response#setCookieSettings(Series) */ public void setCookieSettings(Series<CookieSetting> cookieSettings) { if (getResponse() != null) { getResponse().setCookieSettings(cookieSettings); } }
/** * Sets the status. * * @param status * The status to set. * @see Response#setStatus(Status) */ public void setStatus(Status status) { if (getResponse() != null) { getResponse().setStatus(status); } }
/** * Sets the reference that the client should follow for redirections or * resource creations. * * @param locationRef * The reference to set. * @see Response#setLocationRef(Reference) */ public void setLocationRef(Reference locationRef) { if (getResponse() != null) { getResponse().setLocationRef(locationRef); } }
/** * Sets the list of proxy authentication requests sent by an origin server * to a client. The list instance set must be thread-safe (use {@link CopyOnWriteArrayList} for example. * * @param requests * The list of proxy authentication requests sent by an origin * server to a client. * @see Response#setProxyChallengeRequests(List) */ public void setProxyChallengeRequests(List<ChallengeRequest> requests) { if (getResponse() != null) { getResponse().setProxyChallengeRequests(requests); } }
/** * Sets the list of authentication requests sent by an origin server to a * client. The list instance set must be thread-safe (use {@link CopyOnWriteArrayList} for example. * * @param requests * The list of authentication requests sent by an origin server * to a client. * @see Response#setChallengeRequests(List) */ public void setChallengeRequests(List<ChallengeRequest> requests) { if (getResponse() != null) { getResponse().setChallengeRequests(requests); } }
/** * Sets the status. * * @param status * The status to set. * @param throwable * The related error or exception. * @see Response#setStatus(Status, Throwable) */ public void setStatus(Status status, Throwable throwable) { if (getResponse() != null) { getResponse().setStatus(status, throwable); } }
/** * Sets the set of dimensions on which the response entity may vary. The set * instance set must be thread-safe (use {@link CopyOnWriteArraySet} for * example. * * @param dimensions * The set of dimensions on which the response entity may vary. * @see Response#setDimensions(Set) */ public void setDimensions(Set<Dimension> dimensions) { if (getResponse() != null) { getResponse().setDimensions(dimensions); } }
/** * Sets the set of methods allowed on the requested resource. The set * instance set must be thread-safe (use {@link CopyOnWriteArraySet} for * example. * * @param allowedMethods * The set of methods allowed on the requested resource. * @see Response#setAllowedMethods(Set) */ public void setAllowedMethods(Set<Method> allowedMethods) { if (getResponse() != null) { getResponse().setAllowedMethods(allowedMethods); } }
/** * Sets the status. * * @param status * The status to set. * @param message * The status message. * @see Response#setStatus(Status, String) */ public void setStatus(Status status, String message) { if (getResponse() != null) { getResponse().setStatus(status, message); } }
/** * Indicates if the response should be automatically committed. * * @param autoCommitting * True if the response should be automatically committed */ public void setAutoCommitting(boolean autoCommitting) { getResponse().setAutoCommitting(autoCommitting); }
/** * Sets the callback invoked after sending the response. * * @param onSentCallback * The callback invoked after sending the response. */ public void setOnSent(Uniform onSentCallback) { getResponse().setOnSent(onSentCallback); }
/** * Returns the callback invoked after sending the response. * * @return The callback invoked after sending the response. */ public Uniform getOnSent() { return getResponse().getOnSent(); }
/** * Indicates if the response should be automatically committed. When * processing a request on the server-side, setting this property to 'false' * let you ask to the server connector to wait before sending the response * back to the client when the initial calling thread returns. This will let * you do further updates to the response and manually calling {@link #commit()} later on, using another thread. * * @return True if the response should be automatically committed. */ public boolean isAutoCommitting() { return getResponse().isAutoCommitting(); }
/** * Ask the connector to abort the related network connection, for example * immediately closing the socket. */ public void abort() { getResponse().abort(); }
/** * Asks the response to immediately commit making it ready to be sent back * to the client. Note that all server connectors don't necessarily support * this feature. */ public void commit() { getResponse().commit(); }
/** * Indicates if the response has already been committed. * * @param committed * True if the response has already been committed. */ public void setCommitted(boolean committed) { getResponse().setCommitted(committed); }
/** * Indicates if the response has already been committed. * * @return True if the response has already been committed. */ public boolean isCommitted() { return getResponse().isCommitted(); }