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