/** * Get action object by the action name * * @param actionName * @return */ public Action getAction(String actionName) { for (Action action : service.getActions().values()) { if (action.getActionTag().equals(actionName)) { return action; } } return null; }
public List<String> getActions() { List<String> list = new LinkedList<String>(); if (service.getActions() != null) { for (Action action : service.getActions().values()) list.add(action.getActionTag()); } return list; }
/** * Perform actions specified in the incoming message * * @param message * @throws IllegalArgumentException * @throws IllegalAccessException * @throws InvocationTargetException */ private void performActions(Message message) throws IllegalArgumentException, IllegalAccessException, InvocationTargetException { Action action = service.isActionPresent(message.getAction()); if (action != null) action.getMethod().invoke(appObject, message.getActionInput(), message.getSrcServiceID()); }