1 /* 2 * Replica is published under the terms 3 * of the Apache Software License. 4 */ 5 package replica.command.beans; 6 7 import replica.command.AbstractCommandProcessor; 8 import replica.command.Mappings; 9 10 /*** 11 * @author Pedro Costa 12 * @author Helder Silva 13 * @since 20/Jan/2004 14 */ 15 public class BeansCommandProcessor extends AbstractCommandProcessor { 16 17 BeansMappings mapsTable; 18 19 /*** 20 * 21 */ 22 public BeansCommandProcessor() { 23 super(); 24 } 25 26 /* (non-Javadoc) 27 * @see replica.command.AbstractCommandProcessor#readMappings() 28 */ 29 protected Mappings readMappings() { 30 return getMapsTable(); 31 } 32 33 34 35 /*** 36 * @return 37 */ 38 public BeansMappings getMapsTable() { 39 return mapsTable; 40 } 41 42 /*** 43 * @param hashtable 44 */ 45 public void setMapsTable(BeansMappings mapps) { 46 mapsTable = mapps; 47 } 48 49 /*** 50 * This default implementation assumes that command is a string and that the first word is the action Id. 51 * 52 * It passes the all command instruction, including the action Id, to the mapped command on execute. 53 * 54 * @return Object the result of the command execution. 55 * @see replica.server.cmd.CommandProcessor#process(java.lang.String) 56 * @throws CommandException if there is a problem executing the command. 57 * Callers can choose to catch or not. 58 */ 59 public Object process(Object command) { 60 61 return getCommand( command ).execute( command ); 62 } 63 64 }

This page was automatically generated by Maven