Пример #1
0
 public Object onCall(UMOEventContext context) throws Exception {
   Object result;
   logger.debug("Message received by MuleManagerComponent");
   ByteArrayInputStream in = new ByteArrayInputStream(context.getTransformedMessageAsBytes());
   AdminNotification action = (AdminNotification) wireFormat.read(in);
   if (AdminNotification.ACTION_INVOKE == action.getAction()) {
     result = invokeAction(action, context);
   } else if (AdminNotification.ACTION_SEND == action.getAction()) {
     result = sendAction(action, context);
   } else if (AdminNotification.ACTION_DISPATCH == action.getAction()) {
     result = sendAction(action, context);
   } else if (AdminNotification.ACTION_RECEIVE == action.getAction()) {
     result = receiveAction(action, context);
   } else {
     result =
         handleException(
             null,
             new MuleException(
                 new Message(
                     Messages.EVENT_TYPE_X_NOT_RECOGNISED,
                     "AdminNotification:" + action.getAction())));
   }
   return result;
 }