001package com.nimbusds.oauth2.sdk; 002 003 004import com.nimbusds.oauth2.sdk.http.HTTPResponse; 005 006 007/** 008 * Response message, serialises to an HTTP response. 009 */ 010public interface Response extends Message { 011 012 013 /** 014 * Checks if the response indicates success. 015 * 016 * @return {@code true} if the response indicates success, else 017 * {@code false}. 018 */ 019 public boolean indicatesSuccess(); 020 021 022 /** 023 * Returns the matching HTTP response. 024 * 025 * @return The HTTP response. 026 * 027 * @throws SerializeException If the response message couldn't be 028 * serialised to an HTTP response. 029 */ 030 public HTTPResponse toHTTPResponse() 031 throws SerializeException; 032}