
org.openas2.processor.ProcessorException Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of openas2-server Show documentation
Show all versions of openas2-server Show documentation
Open source implementation of the AS2 standard for signed encrypted and compressed document transfer
package org.openas2.processor;
import java.io.PrintWriter;
import java.io.StringWriter;
import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;
import org.openas2.OpenAS2Exception;
public class ProcessorException extends OpenAS2Exception {
/**
*
*/
private static final long serialVersionUID = 1L;
private Processor processor;
private List causes;
public ProcessorException(Processor processor) {
super();
this.processor = processor;
}
public List getCauses() {
if (causes == null) {
causes = new ArrayList();
}
return causes;
}
public Processor getProcessor() {
return processor;
}
public void setCauses(List list) {
causes = list;
}
public void setProcessor(Processor processor) {
this.processor = processor;
}
public String getMessage() {
StringWriter strWriter = new StringWriter();
PrintWriter writer = new PrintWriter(strWriter);
writer.print(super.getMessage());
Iterator> causesIt = getCauses().iterator();
while (causesIt.hasNext()) {
Exception e = (Exception) causesIt.next();
writer.println();
e.printStackTrace(writer);
}
writer.flush();
return strWriter.toString();
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy