public String process(InputStream input) throws Exception { return process(null, input ); }
/** * this is a somwhat contrived variant constructor, one that throws an exception * if things go wrong. * @param ignored */ public AdminClient(boolean ignored) throws ServiceException { initAdminClient(); }
/** * process the options then run a list call * @param opts * @return * @throws Exception */ public String list(Options opts) throws Exception { processOpts( opts ); return list(); }
/** * process the command line ops, then send a quit command * @param opts * @return * @throws Exception */ public String quit(Options opts) throws Exception { processOpts( opts ); return quit(); }
public String process(Options opts, String xmlFile) throws Exception { processOpts( opts ); return process( xmlFile ); }
/** * Creates in instance of <code>AdminClient</code> and * invokes <code>process(args)</code>. * <p>Diagnostic output goes to <code>log.info</code>.</p> * @param args Commands to process */ public static void main (String[] args) { try { AdminClient admin = new AdminClient(); String result = admin.process(args); if (result != null) { System.out.println( StringUtils.unescapeNumericChar(result) ); } else { System.exit(1); } } catch (AxisFault ae) { System.err.println(Messages.getMessage("exception00") + " " + ae.dumpToString()); System.exit(1); } catch (Exception e) { System.err.println(Messages.getMessage("exception00") + " " + e.getMessage()); System.exit(1); } } }
System.out.println(Messages.getMessage("usage00","AdminClient [Options] [list | <deployment-descriptor-files>]")); System.out.println(""); System.out.println(getUsageInfo()); return null; sb.append( list(opts) ); else if (args[i].equals("quit")) sb.append( quit(opts) ); else if (args[i].equals("passwd")) { System.out.println(Messages.getMessage("changePwd00")); input = new ByteArrayInputStream(str.getBytes()); i++; sb.append( process(opts, input) ); sb.append( process(opts, args[i] ) ); } else { java.util.StringTokenizer tokenizer = null ; String file = tokenizer.nextToken(); System.out.println( Messages.getMessage("processFile00", file) ); sb.append( process(opts, file) ); if(tokenizer.hasMoreTokens()) sb.append("\n");
/** * go from the (parsed) command line to setting properties on our call object. * @param opts * @throws Exception if call==null */ public void processOpts(Options opts) throws Exception { if (call == null) { throw new Exception(Messages.getMessage("nullCall00")); } URL address = new URL(opts.getURL()); setTargetEndpointAddress(address); setLogin(opts.getUser(), opts.getPassword()); String tName = opts.isValueSet( 't' ); setTransport(tName); }
/** * Creates in instance of <code>AdminClient</code> and * invokes <code>process(args)</code>. * <p>Diagnostic output goes to <code>log.info</code>.</p> * @param args Commands to process */ public static void main (String[] args) { try { AdminClient admin = new AdminClient(); String result = admin.process(args); if (result != null) { System.out.println( StringUtils.unescapeNumericChar(result) ); } else { System.exit(1); } } catch (AxisFault ae) { System.err.println(Messages.getMessage("exception00") + " " + ae.dumpToString()); System.exit(1); } catch (Exception e) { System.err.println(Messages.getMessage("exception00") + " " + e.getMessage()); System.exit(1); } } }
System.out.println(Messages.getMessage("usage00","AdminClient [Options] [list | <deployment-descriptor-files>]")); System.out.println(""); System.out.println(getUsageInfo()); return null; sb.append( list(opts) ); else if (args[i].equals("quit")) sb.append( quit(opts) ); else if (args[i].equals("passwd")) { System.out.println(Messages.getMessage("changePwd00")); input = new ByteArrayInputStream(str.getBytes()); i++; sb.append( process(opts, input) ); sb.append( process(opts, args[i] ) ); } else { java.util.StringTokenizer tokenizer = null ; String file = tokenizer.nextToken(); System.out.println( Messages.getMessage("processFile00", file) ); sb.append( process(opts, file) ); if(tokenizer.hasMoreTokens()) sb.append("\n");
/** * go from the (parsed) command line to setting properties on our call object. * @param opts * @throws Exception if call==null */ public void processOpts(Options opts) throws Exception { if (call == null) { throw new Exception(Messages.getMessage("nullCall00")); } URL address = new URL(opts.getURL()); setTargetEndpointAddress(address); setLogin(opts.getUser(), opts.getPassword()); String tName = opts.isValueSet( 't' ); setTransport(tName); }
public String process(Options opts, String xmlFile) throws Exception { processOpts( opts ); return process( xmlFile ); }
/** * process the command line ops, then send a quit command * @param opts * @return * @throws Exception */ public String quit(Options opts) throws Exception { processOpts( opts ); return quit(); }
processOpts( opts );
public String process(InputStream input) throws Exception { return process(null, input ); }
/** * Creates in instance of <code>AdminClient</code> and * invokes <code>process(args)</code>. * <p>Diagnostic output goes to <code>log.info</code>.</p> * @param args Commands to process */ public static void main (String[] args) { try { AdminClient admin = new AdminClient(); String result = admin.process(args); if (result != null) { System.out.println( StringUtils.unescapeNumericChar(result) ); } else { System.exit(1); } } catch (AxisFault ae) { System.err.println(Messages.getMessage("exception00") + " " + ae.dumpToString()); System.exit(1); } catch (Exception e) { System.err.println(Messages.getMessage("exception00") + " " + e.getMessage()); System.exit(1); } } }
System.out.println(Messages.getMessage("usage00","AdminClient [Options] [list | <deployment-descriptor-files>]")); System.out.println(""); System.out.println(getUsageInfo()); return null; sb.append( list(opts) ); else if (args[i].equals("quit")) sb.append( quit(opts) ); else if (args[i].equals("passwd")) { System.out.println(Messages.getMessage("changePwd00")); input = new ByteArrayInputStream(str.getBytes()); i++; sb.append( process(opts, input) ); sb.append( process(opts, args[i] ) ); } else { java.util.StringTokenizer tokenizer = null ; String file = tokenizer.nextToken(); System.out.println( Messages.getMessage("processFile00", file) ); sb.append( process(opts, file) ); if(tokenizer.hasMoreTokens()) sb.append("\n");
/** * go from the (parsed) command line to setting properties on our call object. * @param opts * @throws Exception if call==null */ public void processOpts(Options opts) throws Exception { if (call == null) { throw new Exception(Messages.getMessage("nullCall00")); } URL address = new URL(opts.getURL()); setTargetEndpointAddress(address); setLogin(opts.getUser(), opts.getPassword()); String tName = opts.isValueSet( 't' ); setTransport(tName); }
public String process(Options opts, String xmlFile) throws Exception { processOpts( opts ); return process( xmlFile ); }