All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.worklight.adapters.rest.api.MFPServerOAuthException Maven / Gradle / Ivy

/*
* © Copyright IBM Corp. 2016
* All Rights Reserved. US Government Users Restricted Rights - Use, duplication or disclosure restricted by GSA ADP Schedule Contract with IBM Corp.
*/

package com.worklight.adapters.rest.api;

import java.io.IOException;
import java.io.PrintWriter;

import javax.servlet.ServletOutputStream;
import javax.servlet.http.HttpServletResponse;

/**
 *
 * @deprecated Since version 8.0 this exception is never thrown.
 */

@Deprecated
public abstract class MFPServerOAuthException extends MFPServerOperationException{

	private static final long serialVersionUID = 1L;

	public MFPServerOAuthException(String msg) {
		super(msg);
	}

	protected void writeTextToResponse(HttpServletResponse resp, String text) throws IOException {
		resp.setContentType("text/plain; charset=UTF-8");
		ServletOutputStream os = resp.getOutputStream();
		PrintWriter pw = new PrintWriter(os);
		pw.println(text);
		pw.flush();
		pw.close();
	}

	public abstract void writeOAuthFailureResponse(HttpServletResponse resp) throws IOException;
	
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy