simplehttp.error.AccessDenied Maven / Gradle / Ivy
package simplehttp.error;
import com.sun.net.httpserver.HttpExchange;
import static simplehttp.ResponseBuilder.respondError;
import static simplehttp.constants.StatusCodes.FORBIDDEN;
public final class AccessDenied extends Exception implements HttpError {
public AccessDenied() { super("Access Denied"); }
public AccessDenied(final String message) {
super(message);
}
@Override
public void processExchange(final HttpExchange exchange) {
respondError(exchange, FORBIDDEN, getMessage());
}
public boolean isServerError() {
return false;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy