
cat.inspiracio.servlet.InitialServletRequest Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of dummy-servlet Show documentation
Show all versions of dummy-servlet Show documentation
Dummy Servlet provides some implementations for the interfaces and classes
of the Java Servlet spec that are useful for testing and simulation.
Version 5.0.0 is for Servlet 5.0.0.
The newest version!
/*
Copyright 2024 Alexander Bunkenburg
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
package cat.inspiracio.servlet;
import jakarta.servlet.*;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.UnsupportedEncodingException;
import java.util.Enumeration;
import java.util.Locale;
import java.util.Map;
/** All methods throw RuntimeException. */
public class InitialServletRequest implements ServletRequest {
/** Make one. */
protected InitialServletRequest(){}
@Override public AsyncContext getAsyncContext(){throw new RuntimeException();}
@Override public Object getAttribute(String name){throw new RuntimeException();}
@Override public Enumeration getAttributeNames(){throw new RuntimeException();}
@Override public String getCharacterEncoding(){throw new RuntimeException();}
@Override public int getContentLength(){throw new RuntimeException();}
@Override public long getContentLengthLong(){throw new RuntimeException();}
@Override public String getContentType(){throw new RuntimeException();}
@Override public DispatcherType getDispatcherType(){throw new RuntimeException();}
@Override public ServletInputStream getInputStream() throws IOException {throw new RuntimeException();}
@Override public String getLocalAddr(){throw new RuntimeException();}
@Override public Locale getLocale(){throw new RuntimeException();}
@Override public Enumeration getLocales(){throw new RuntimeException();}
@Override public String getLocalName(){throw new RuntimeException();}
@Override public int getLocalPort(){throw new RuntimeException();}
@Override public String getParameter(String name){throw new RuntimeException();}
@Override public Map getParameterMap(){throw new RuntimeException();}
@Override public Enumeration getParameterNames(){throw new RuntimeException();}
@Override public String[] getParameterValues(String name){throw new RuntimeException();}
@Override public String getProtocol(){throw new RuntimeException();}
@Override public String getProtocolRequestId() {throw new RuntimeException();}
@Override public BufferedReader getReader() throws IOException{throw new RuntimeException();}
@Override public String getRemoteAddr(){throw new RuntimeException();}
@Override public String getRemoteHost(){throw new RuntimeException();}
@Override public int getRemotePort(){throw new RuntimeException();}
@Override public RequestDispatcher getRequestDispatcher(String path){throw new RuntimeException();}
@Override public String getRequestId() {throw new RuntimeException();}
@Override public String getScheme(){throw new RuntimeException();}
@Override public String getServerName(){throw new RuntimeException();}
@Override public int getServerPort(){throw new RuntimeException();}
@Override public ServletConnection getServletConnection() {throw new RuntimeException();}
@Override public ServletContext getServletContext(){throw new RuntimeException();}
@Override public boolean isAsyncStarted(){throw new RuntimeException();}
@Override public boolean isAsyncSupported(){throw new RuntimeException();}
@Override public boolean isSecure(){throw new RuntimeException();}
@Override public void removeAttribute(String name){throw new RuntimeException();}
@Override public void setAttribute(String name, Object o){throw new RuntimeException();}
@Override public void setCharacterEncoding(String env)throws UnsupportedEncodingException {throw new RuntimeException();}
@Override public AsyncContext startAsync() throws IllegalStateException {throw new RuntimeException();}
@Override public AsyncContext startAsync(ServletRequest servletRequest, ServletResponse servletResponse) throws IllegalStateException {throw new RuntimeException();}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy