
cat.inspiracio.servlet.http.InitialHttpServletResponse 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 2016 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.http;
import cat.inspiracio.servlet.InitialServletResponse;
import jakarta.servlet.http.Cookie;
import jakarta.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.util.Collection;
/** All methods throw RuntimeException. */
public class InitialHttpServletResponse extends InitialServletResponse implements HttpServletResponse {
/** Make one. */
protected InitialHttpServletResponse(){}
@Override public void addCookie(Cookie cookie){throw new RuntimeException();}
@Override public void addDateHeader(String name, long date){throw new RuntimeException();}
@Override public void addHeader(String name, String value){throw new RuntimeException();}
@Override public void addIntHeader(String name, int value){throw new RuntimeException();}
@Override public boolean containsHeader(String name){throw new RuntimeException();}
@Override public String encodeRedirectURL(String url){throw new RuntimeException();}
@Override public String encodeURL(String url){throw new RuntimeException();}
@Override public String getHeader(String s){throw new RuntimeException();}
@Override public Collection getHeaderNames(){throw new RuntimeException();}
@Override public Collection getHeaders(String s){throw new RuntimeException();}
@Override public int getStatus(){throw new RuntimeException();}
@Override public void sendError(int sc) throws IOException{throw new RuntimeException();}
@Override public void sendError(int sc, String msg) throws IOException {throw new RuntimeException();}
@Override public void sendRedirect(String location) throws IOException{throw new RuntimeException();}
@Override public void setDateHeader(String name, long date){throw new RuntimeException();}
@Override public void setHeader(String name, String value){throw new RuntimeException();}
@Override public void setIntHeader(String name, int value){throw new RuntimeException();}
@Override public void setStatus(int sc){throw new RuntimeException();}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy