use of com.adaptris.core.WorkflowInterceptor in project interlok by adaptris.
the class BasicJettyConsumer method submitToWorkflow.
private boolean submitToWorkflow(AdaptrisMessage msg) {
boolean waitForCompletion = false;
if (retrieveAdaptrisMessageListener() instanceof WorkflowImp) {
List<WorkflowInterceptor> interceptors = ((WorkflowImp) retrieveAdaptrisMessageListener()).getInterceptors();
for (WorkflowInterceptor i : interceptors) {
if (JettyWorkflowInterceptorImpl.class.isAssignableFrom(i.getClass())) {
waitForCompletion = true;
break;
}
}
}
retrieveAdaptrisMessageListener().onAdaptrisMessage(msg);
return waitForCompletion;
}
use of com.adaptris.core.WorkflowInterceptor in project interlok by adaptris.
the class WorkflowManager method testAndInjectCachingInterceptor.
/**
* Test if we have a configured caching interceptor. If we do, great, otherwise create one.
*
* @throws CoreException
*/
private void testAndInjectCachingInterceptor() throws CoreException {
for (WorkflowInterceptor interceptor : managedWorkflow.getInterceptors()) {
if (interceptor instanceof JmxSubmitMessageInterceptor) {
this.injectInterceptor = (JmxSubmitMessageInterceptor) interceptor;
}
}
if (this.injectInterceptor == null) {
injectInterceptor = LifecycleHelper.initAndStart(new JmxSubmitMessageInterceptor());
managedWorkflow.getInterceptors().add(injectInterceptor);
}
}
use of com.adaptris.core.WorkflowInterceptor in project interlok by adaptris.
the class StatisticsMBeanCase method createWorkflow.
protected static StandardWorkflow createWorkflow(String uid, WorkflowInterceptor... interceptors) throws CoreException {
StandardWorkflow wf = new StandardWorkflow();
wf.setUniqueId(uid);
for (WorkflowInterceptor wi : interceptors) {
wf.addInterceptor(wi);
}
return wf;
}
use of com.adaptris.core.WorkflowInterceptor in project interlok by adaptris.
the class MessageNotificationCase method createWorkflow.
protected StandardWorkflow createWorkflow(String uid, WorkflowInterceptor... interceptors) throws CoreException {
StandardWorkflow wf = new StandardWorkflow();
wf.setUniqueId(uid);
for (WorkflowInterceptor wi : interceptors) {
wf.addInterceptor(wi);
}
return wf;
}
use of com.adaptris.core.WorkflowInterceptor in project interlok by adaptris.
the class InFlightWorkflowInterceptorTest method createPoolingWorkflow.
protected static PoolingWorkflow createPoolingWorkflow(String uid, WorkflowInterceptor... interceptors) throws CoreException {
PoolingWorkflow wf = new PoolingWorkflow();
wf.setUniqueId(uid);
for (WorkflowInterceptor wi : interceptors) {
wf.addInterceptor(wi);
}
return wf;
}
Aggregations