com.viaoa.remote.rest.OARestClientException Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of oa-core Show documentation
Show all versions of oa-core Show documentation
Object Automation library
The newest version!
package com.viaoa.remote.rest;
import com.viaoa.remote.rest.info.OARestInvokeInfo;
/**
* OARestClient exception, supplying OARestInvokeInfo.
*
* @author vvia
*/
public class OARestClientException extends RuntimeException {
private transient OARestInvokeInfo invokeInfo;
public OARestClientException(String msg) {
super(msg);
}
public OARestClientException(OARestInvokeInfo invokeInfo) {
this.invokeInfo = invokeInfo;
}
public OARestClientException(OARestInvokeInfo invokeInfo, String msg) {
super(msg);
this.invokeInfo = invokeInfo;
}
public OARestClientException(OARestInvokeInfo invokeInfo, String msg, Exception e) {
super(msg, e);
this.invokeInfo = invokeInfo;
}
public OARestInvokeInfo getInvokeInfo() {
return this.invokeInfo;
}
public int getHttpStatusCode() {
if (invokeInfo == null) {
return 200; // HttpServletResponse.SC_OK;
}
return invokeInfo.responseCode;
}
public String getHttpStatusMessage() {
if (invokeInfo == null) {
return null;
}
return invokeInfo.responseCodeMessage;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy