Пример #1
0
 protected IMessageDispatcher buildDispatcher(
     MessagingContext context, IHandlerInvocation invocation) {
   IMessageDispatcher dispatcher = new MessageDispatcher(context, invocation);
   if (context.getHandlerMetadata().isEnveloped()) {
     dispatcher = new EnvelopedMessageDispatcher(dispatcher);
   }
   if (context.getHandlerMetadata().isFiltered()) {
     dispatcher = new FilteredMessageDispatcher(dispatcher);
   }
   return dispatcher;
 }
Пример #2
0
 protected IHandlerInvocation buildInvocationForHandler(MessagingContext context) {
   IHandlerInvocation invocation = new ReflectiveHandlerInvocation(context);
   if (context.getHandlerMetadata().isAsynchronous()) {
     invocation = new AsynchronousHandlerInvocation(invocation);
   }
   return invocation;
 }