public void printStackTrace () { this.printStackTrace(System.out); }
public org.jdom.Element getStatus () { return new org.jdom.Element(getName()); }
public void init (final String serviceName, final ApplicationContext context, final java.util.Map serviceParams) throws ServiceException { super.init(serviceName, context, serviceParams); this.directory = (String)serviceParams.get(P_DIRECTORY); if ( ! this.directory.startsWith(java.io.File.separator)) this.directory = context.getApplicationDirectory()+this.directory; if (! this.directory.endsWith(java.io.File.separator)) this.directory += java.io.File.separator; }
throw new DispatchingException("dispatch() failure", t);
/** * 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 ("participant '"+this.getRegex()+"' is missing a "+ "'dispatcherClass' parameter, "+ dispatcher.init (getRegex()+".dispatcher", context, throw new DispatchingException ("Failed to instantiate dispatcher '"+this.dispatcherClassName+ "' for participant '"+getRegex()+"'", e);
(getParams(), P_WORKITEM_CODER); Definitions.getWorkItemCoderLoader(getContext()); ("Dispatcher '"+getName()+ "' using coder '"+this.workItemCoderName+"'");
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()); }
/** * Internal usage : returns the workitem coder for usage. */ protected WorkItemCoder instantiateEncoder () throws DispatchingException { WorkItemCoderLoader coderLoader = Definitions .getWorkItemCoderLoader(getContext()); WorkItemCoder coder = coderLoader.getDefaultCoder(); if (this.workItemCoderName != null) coder = coderLoader.getCoder(this.workItemCoderName); return coder; }
return dispatcher.dispatch(wi);
/** * 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); } }
/** * Inits this dispatcher. */ public void init (final String serviceName, final ApplicationContext context, final java.util.Map serviceParams) throws ServiceException { super.init(serviceName, context, serviceParams); this.recipient = MapUtils.getAsString(serviceParams, P_RECIPIENT); this.recipientField = MapUtils.getAsString(serviceParams, P_RECIPIENT_FIELD); this.cc = MapUtils.getAsString(serviceParams, P_CC); }
public void printStackTrace (java.io.PrintStream ps) { this.printStackTrace(new java.io.PrintWriter(ps)); }
throw new DispatchingException ("failed to archive (save) workitem to '"+fileName+"'", t);
ServiceException super.init(serviceName, context, serviceParams);
throw new DispatchingException("dispatching failed", t);
ServiceException super.init(serviceName, context, serviceParams);
throw new DispatchingException ("local dispatching to consumer '"+this.consumerName+ "' failed", owe);
throw new DispatchingException ("Dispatching failed for "+wi.toString(), e);