/** * Creates a new instance of a command to be used by a new execution request * * @param commandNode the command node that identifies it. * @param sessionID the session id of this execution. * @return the command instance to execute. * @throws XMPPErrorException if there is problem creating the new instance. * @throws SecurityException * @throws NoSuchMethodException * @throws InvocationTargetException * @throws IllegalArgumentException * @throws IllegalAccessException * @throws InstantiationException */ private LocalCommand newInstanceOfCmd(String commandNode, String sessionID) throws XMPPErrorException, InstantiationException, IllegalAccessException, IllegalArgumentException, InvocationTargetException, NoSuchMethodException, SecurityException { AdHocCommandInfo commandInfo = commands.get(commandNode); LocalCommand command = commandInfo.getCommandInstance(); command.setSessionID(sessionID); command.setName(commandInfo.getName()); command.setNode(commandInfo.getNode()); return command; }
try { command = (LocalCommand) commandInfo.getCommandInstance(); command.setSessionID(sessionID); command.setName(commandInfo.getName()); command.setNode(commandInfo.getNode());
try { command = (LocalCommand) commandInfo.getCommandInstance(); command.setSessionID(sessionID); command.setName(commandInfo.getName()); command.setNode(commandInfo.getNode());
try { command = (LocalCommand) commandInfo.getCommandInstance(); command.setSessionID(sessionID); command.setName(commandInfo.getName()); command.setNode(commandInfo.getNode());