001package com.nimbusds.oauth2.sdk; 002 003 004import java.net.URI; 005 006 007/** 008 * The base abstract class for requests. 009 */ 010public abstract class AbstractRequest implements Request { 011 012 013 /** 014 * The request endpoint. 015 */ 016 private URI uri; 017 018 019 /** 020 * Creates a new base abstract request. 021 * 022 * @param uri The URI of the endpoint (HTTP or HTTPS) for which the 023 * request is intended, {@code null} if not specified (if, 024 * for example, the {@link #toHTTPRequest()} method will not 025 * be used). 026 */ 027 public AbstractRequest(final URI uri) { 028 029 this.uri = uri; 030 } 031 032 033 @Override 034 public URI getEndpointURI() { 035 036 return uri; 037 } 038}