public String toString () { StringBuffer sb = new StringBuffer(); sb.append(this.getClass().getName()); sb.append(" : "); sb.append(this.getMessage()); if (this.reply != null) { sb.append(" (("); sb.append(this.reply.getClass().getName()); sb.append(") "); sb.append(this.reply.getExceptionMessage()); sb.append(")"); } return sb.toString(); }
public void printStackTrace (java.io.PrintWriter pw) { if (this.reply == null) { super.printStackTrace(pw); return; } pw.println(nullToSpace(this.reply.getMessage())); pw.println("Caused on listener side by :"); pw.println(nullToSpace(this.reply.getExceptionMessage())); if (this.reply.getExceptionStackTrace() != null) pw.print(this.reply.getExceptionStackTrace()); }
public void printStackTrace () { this.printStackTrace(System.out); }
/** * This method is used by dispatcher implementations. * It will throw a dispatching exception if and only if the * reply is a fatal one. */ protected Object handleReply (ListenerReply reply) throws DispatchingException { if (reply == null) { throw new DispatchingException("No reply from listener"); } if (reply instanceof FatalReply) { throw new FatalDispatchingException((FatalReply)reply); } if (reply instanceof OkReply) { log.debug("Listener replied 'ok'"); return ((OkReply)reply).getConsumerResult(); } WarningReply warn = (WarningReply)reply; StringBuffer sb = new StringBuffer(); sb.append("listener warned :\n"); sb.append(warn.getMessage()); sb.append('\n'); sb.append(warn.getExceptionMessage()); sb.append('\n'); sb.append(warn.getExceptionStackTrace()); log.warn(sb.toString()); return null; }
throw new DispatchingException("dispatching failed", t);
throw new DispatchingException ("failed to archive (save) workitem to '"+fileName+"'", t);
public void printStackTrace (java.io.PrintStream ps) { this.printStackTrace(new java.io.PrintWriter(ps)); }
throw new DispatchingException ("Failed to encode workitem", e);
throw new DispatchingException (""+wr.getClass().getName()+"\n"+wr.getMessage()); throw new DispatchingException ("last dispatch attempt failed", t);
throw new DispatchingException("dispatch() failure", t);
throw new DispatchingException ("participant '"+this.getRegex()+"' is missing a "+ "'dispatcherClass' parameter, "+ throw new DispatchingException ("Failed to instantiate dispatcher '"+this.dispatcherClassName+ "' for participant '"+getRegex()+"'", e);
/** * Replies to the engine (this method is only used by certain * extensions of this class). * This method is protected as well, but there shouldn't be any need * to override it. * * @param context the engine ApplicationContext * @param wi the param as it should resume along its flow. */ protected void reply (final ApplicationContext context, final WorkItem wi) throws DispatchingException { final InFlowWorkItem ifwi = (InFlowWorkItem)wi; try { Definitions.getExpressionPool(context) .reply(ifwi.getId(), ifwi); } catch (final Throwable t) { throw new DispatchingException ("failed to feed back workitem to engine", t); } }
throw new DispatchingException ("Cannot dispatch to 'null' recipient"); throw new DispatchingException ("Failed to dispatch workitem over SMTP", t);
throw new DispatchingException ("Dispatching failed for "+wi.toString(), e);
throw new DispatchingException ("local dispatching to consumer '"+this.consumerName+ "' failed", owe);