예제 #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;
 }