<p>send.</p>

@param args a {@link java.lang.String} object.
@return a {@link java.lang.Object} object.
@throws java.lang.Exception if any.
963410
public Object send( String... args ) throws Exception
    {
        try
        {
            method.setAccessible(true);
            return method.invoke( target, convert( args ) );
        }
        catch (InvocationTargetException e)
        {
            throw new SystemUnderDevelopmentException( e.getCause() );
        }
    }
470816
public static void main(String[] args) throws Exception {
    AlluxioFramework framework = new AlluxioFramework();
    JCommander jc = new JCommander(framework);
    try {
      jc.parse(args);
    } catch (Exception e) {
      System.out.println(e.getMessage());
      jc.usage();
      System.exit(1);
    }
    framework.run();
  }
230128
private void doit(String[] args)
    {
        try
        {
            // load parameters from the commandline
            loadParameters(args);

            // Try to load the private key
            importKeyPair();
        }
        catch (Exception e)
        {
            System.out.println("Exception: " + e.getMessage());
            e.printStackTrace();
            
            System.exit(23);
        }
    }
739956
public void tell (Name arg1, String arg2, ChatService.TellListener arg3)
    {
        ChatMarshaller.TellMarshaller listener3 = new ChatMarshaller.TellMarshaller();
        listener3.listener = arg3;
        sendRequest(TELL, new Object[] {
            arg1, arg2, listener3
        });
    }
1282292
public void add(final String arg) {
        if (arg != null) {
            final Argument argument = parse(arg);
            add(argument);
        }
    }
802070
public Serializable invoke(Serializable[] args)
   {
      if (args != null)
         return new IllegalArgumentException("Unsupported argument list: " + Arrays.toString(args));

      System.exit(0);

      return null;
   }
873457
public void send(HeadersAmp headers,
                   String to, 
                   String methodName,
                   Object ...args)
    throws IOException
  {
    if (log.isLoggable(Level.FINEST)) {
      log.finest(this + " send " + methodName + Arrays.asList(args)
                + "\n  {to:" + to + "," + headers + "}");
    }
    
    try {
      JsonWriterImpl jOut = _jOut;

      jOut.init();

      jOut.writeStartArray();
      jOut.write("send");

      writeHeaders(jOut, headers);

      jOut.write(to);
      jOut.write(methodName);

      writeArgs(jOut, args);

      jOut.writeEndArray();

      jOut.close();
    } catch (Throwable e) {
      log.log(Level.WARNING, e.toString(), e);
      
      throw e;
    }
  }
684441
@SuppressWarnings(
	{ "unchecked" })
	public static <T> List<T> toList(T...args)
	{
		if(args == null || args.length ==0)
			return null;
		
		ArrayList<T> list = new ArrayList<>(args.length);
		for (T t : args)
		{
			list.add(t);
		}
		
		return list;
	}
825928
public static base_response send(nitro_service client, arp resource) throws Exception {
		arp sendresource = new arp();
		sendresource.ipaddress = resource.ipaddress;
		sendresource.td = resource.td;
		sendresource.all = resource.all;
		return sendresource.perform_operation(client,"send");
	}
542138
public static void main(final String[] args) throws Exception {
        final AclTool tool = new AclTool(new DefaultCLIToolLogger());
        tool.setShouldExit(true);
        int exitCode = 1; //pessimistic initial value

        try {
            tool.run(args);
            exitCode = 0;
        } catch (OptionsPrompt e) {
            exitCode = 2;
            tool.error(e.getMessage());
            tool.error(e.getPrompt());
            if (tool.argVerbose) {
                e.printStackTrace();
            }
        } catch (CLIToolOptionsException e) {
            exitCode = 2;
            tool.error(e.getMessage());
            if (tool.argVerbose) {
                e.printStackTrace();
            }
        } catch (Throwable e) {
            if (e.getMessage() == null || tool.argVerbose) {
                e.printStackTrace();
            }
            tool.error("Error: " + e.getMessage());
        }
        tool.exit(exitCode);
    }
813530
public static void main(String[] args) {
        String xml = "<Ping xmlns:ps='http:'><G a='8'><ps:H> asf\n</ps:H></G><ps:EventName>START</ps:EventName></Ping>";
        String path_string = "//G[H=asf]";
        try {
            XmlObject xmlBean = XmlObject.Factory.parse(xml);
            XmlPath path = new XmlPath(path_string);
            String value = path.evaluate(xmlBean);
            System.out.println("Value=" + value);
        } catch (Exception ex) {
            ex.printStackTrace();
        }
    }
565037
public T addAppArgs(String... args) {
    for (String arg : args) {
      checkNotNull(arg, "arg");
      builder.appArgs.add(arg);
    }
    return self();
  }
902981
public static <E> E send(Object o, String methodName, Float arg) {
    return send(o, methodName, (Object) arg);
  }
853578
@SuppressWarnings("unchecked")
        public static void executeCommand(String[] args) throws Exception {

            OptionParser parser = getParser();

            // declare parameters
            List<String> meta = null;
            String url = null;
            List<Integer> nodeIds = null;
            Boolean allNodes = true;
            Boolean confirm = false;

            // parse command-line input
            args = AdminToolUtils.copyArrayAddFirst(args, "--" + OPT_HEAD_META_SET);
            OptionSet options = parser.parse(args);
            if(options.has(AdminParserUtils.OPT_HELP)) {
                printHelp(System.out);
                return;
            }

            // check required options and/or conflicting options
            AdminParserUtils.checkRequired(options, OPT_HEAD_META_SET);
            AdminParserUtils.checkRequired(options, AdminParserUtils.OPT_URL);
            AdminParserUtils.checkOptional(options,
                                           AdminParserUtils.OPT_NODE,
                                           AdminParserUtils.OPT_ALL_NODES);

            // load parameters
            meta = AdminToolUtils.getValueList((List<String>) options.valuesOf(OPT_HEAD_META_SET),
                                               "=");
            if(meta.size() != 2 && meta.size() != 4) {
                throw new VoldemortException("Invalid metakey-metafile pairs.");
            }
            url = (String) options.valueOf(AdminParserUtils.OPT_URL);
            if(options.has(AdminParserUtils.OPT_NODE)) {
                nodeIds = (List<Integer>) options.valuesOf(AdminParserUtils.OPT_NODE);
                allNodes = false;
            }
            if(options.has(AdminParserUtils.OPT_CONFIRM)) {
                confirm = true;
            }

            // print summary
            System.out.println("Set metadata");
            System.out.println("Metadata:");
            for(Integer i = 0; i < meta.size(); i += 2) {
                System.out.println("  set \'" + meta.get(i) + "\' from file \'" + meta.get(i + 1)
                                   + "\'");
            }
            System.out.println("Location:");
            System.out.println("  bootstrap url = " + url);
            if(allNodes) {
                System.out.println("  node = all nodes");
            } else {
                System.out.println("  node = " + Joiner.on(", ").join(nodeIds));
            }

            AdminClient adminClient = AdminToolUtils.getAdminClient(url);

            if(allNodes) {
                nodeIds = AdminToolUtils.getAllNodeIds(adminClient);
            }

            AdminToolUtils.assertServerNotInRebalancingState(adminClient, nodeIds);

            if(meta.size() == 2) {
                String metaKey = meta.get(0), metaValue = meta.get(1);
                String metaFile = metaValue.replace("~", System.getProperty("user.home"));

                if(metaKey.equals(MetadataStore.STORES_KEY)) {
                    if(!Utils.isReadableFile(metaFile)) {
                        throw new VoldemortException("Stores definition xml file path incorrect");
                    }
                    StoreDefinitionsMapper mapper = new StoreDefinitionsMapper();
                    List<StoreDefinition> newStoreDefs = mapper.readStoreList(new File(metaFile));
                    StoreDefinitionUtils.validateSchemasAsNeeded(newStoreDefs);

                    // original metadata
                    Integer nodeIdToGetStoreXMLFrom = nodeIds.iterator().next();
                    Versioned<String> storesXML = adminClient.metadataMgmtOps.getRemoteMetadata(nodeIdToGetStoreXMLFrom,
                                                                                                MetadataStore.STORES_KEY);

                    List<StoreDefinition> oldStoreDefs = mapper.readStoreList(new StringReader(storesXML.getValue()));

                    printChangeStoreSummary(oldStoreDefs, newStoreDefs, System.err);
                    if(!AdminToolUtils.askConfirm(confirm, "set metadata")) {
                        return;
                    }

                    // execute command
                    doMetaSet(adminClient, nodeIds, metaKey, mapper.writeStoreList(newStoreDefs));
                    if(!allNodes) {
                        System.err.println("WARNING: Metadata version update of stores goes to all servers, "
                                           + "although this set-metadata oprations only goes to node: ");
                        for(Integer nodeId: nodeIds) {
                            System.err.println(nodeId);
                        }
                    }
                    doMetaUpdateVersionsOnStores(adminClient, oldStoreDefs, newStoreDefs);
                } else {

                    // execute command
                    if(!AdminToolUtils.askConfirm(confirm, "set metadata")) {
                        return;
                    }

                    if(metaKey.equals(MetadataStore.CLUSTER_KEY)
                       || metaKey.equals(MetadataStore.REBALANCING_SOURCE_CLUSTER_XML)) {
                        if(!Utils.isReadableFile(metaFile)) {
                            throw new VoldemortException("Cluster xml file path incorrect");
                        }
                        ClusterMapper mapper = new ClusterMapper();
                        Cluster newCluster = mapper.readCluster(new File(metaFile));
                        doMetaSet(adminClient, nodeIds, metaKey, mapper.writeCluster(newCluster));
                    } else if(metaKey.equals(MetadataStore.SLOP_STREAMING_ENABLED_KEY)
                              || metaKey.equals(MetadataStore.PARTITION_STREAMING_ENABLED_KEY)
                              || metaKey.equals(MetadataStore.READONLY_FETCH_ENABLED_KEY)
                              || metaKey.equals(MetadataStore.QUOTA_ENFORCEMENT_ENABLED_KEY)) {
                        doMetaSet(adminClient, nodeIds, metaKey, metaValue);
                    } else if(metaKey.equals(KEY_OFFLINE)) {
                        boolean setOffline = Boolean.parseBoolean(metaValue);
                        if(setOffline && nodeIds.size() > 1) {
                            throw new VoldemortException("Setting more than one node to offline is not allowed.");
                        }
                        for(Integer nodeId: nodeIds) {
                            adminClient.metadataMgmtOps.setRemoteOfflineState(nodeId, setOffline);
                        }
                    } else if(metaKey.equals(MetadataStore.REBALANCING_STEAL_INFO)) {
                        if(!Utils.isReadableFile(metaFile)) {
                            throw new VoldemortException("Rebalancing steal info file path incorrect");
                        }
                        String rebalancingStealInfoJsonString = FileUtils.readFileToString(new File(metaFile));
                        RebalancerState state = RebalancerState.create(rebalancingStealInfoJsonString);
                        doMetaSet(adminClient, nodeIds, metaKey, state.toJsonString());
                    } else {
                        throw new VoldemortException("Incorrect metadata key");
                    }
                }
            } else if(meta.size() == 4) {
                // set metadata pair cluster.xml, stores.xml
                String clusterFile, storesFile;

                if(meta.get(0).equals(MetadataStore.CLUSTER_KEY)
                   && meta.get(2).equals(MetadataStore.STORES_KEY)) {
                    clusterFile = meta.get(1);
                    storesFile = meta.get(3);
                } else if(meta.get(0).equals(MetadataStore.STORES_KEY)
                          && meta.get(2).equals(MetadataStore.CLUSTER_KEY)) {
                    storesFile = meta.get(1);
                    clusterFile = meta.get(3);
                } else {
                    throw new VoldemortException("meta set-pair keys must be <cluster.xml, stores.xml>");
                }

                clusterFile = clusterFile.replace("~", System.getProperty("user.home"));
                storesFile = storesFile.replace("~", System.getProperty("user.home"));

                ClusterMapper clusterMapper = new ClusterMapper();
                StoreDefinitionsMapper storeDefsMapper = new StoreDefinitionsMapper();

                // original metadata
                Integer nodeIdToGetStoreXMLFrom = nodeIds.iterator().next();
                Versioned<String> storesXML = adminClient.metadataMgmtOps.getRemoteMetadata(nodeIdToGetStoreXMLFrom,
                                                                                            MetadataStore.STORES_KEY);

                List<StoreDefinition> oldStoreDefs = storeDefsMapper.readStoreList(new StringReader(storesXML.getValue()));

                if(!Utils.isReadableFile(clusterFile)) {
                    throw new VoldemortException("Cluster xml file path incorrect");
                }
                Cluster cluster = clusterMapper.readCluster(new File(clusterFile));

                if(!Utils.isReadableFile(storesFile)) {
                    throw new VoldemortException("Stores definition xml file path incorrect");
                }
                List<StoreDefinition> newStoreDefs = storeDefsMapper.readStoreList(new File(storesFile));

                StoreDefinitionUtils.validateSchemasAsNeeded(newStoreDefs);

                printChangeStoreSummary(oldStoreDefs, newStoreDefs, System.err);

                if(!AdminToolUtils.askConfirm(confirm, "set metadata")) {
                    return;
                }

                // execute command
                doMetaSetPair(adminClient,
                              nodeIds,
                              clusterMapper.writeCluster(cluster),
                              storeDefsMapper.writeStoreList(newStoreDefs));
                if(!allNodes) {
                    System.err.println("WARNING: Metadata version update of stores goes to all servers, "
                                       + "although this set-metadata oprations only goes to node: ");
                    for(Integer nodeId: nodeIds) {
                        System.err.println(nodeId);
                    }
                }
                doMetaUpdateVersionsOnStores(adminClient, oldStoreDefs, newStoreDefs);
            }
        }
1337422
public void speak (String arg1, byte arg2)
    {
        sendRequest(SPEAK, new Object[] {
            arg1, Byte.valueOf(arg2)
        });
    }
769905
public static void main(String[] args) throws Exception {
        if (args.length < 1 || args.length > 2) {
            throw new IOException("One or two arguments expected.");
        }
        ServerConfiguration config =
                new ServerConfigurationParser(new FileInputStream(new File(args[0])))
                        .parse();
        if (args.length == 2) {
            Properties props = new Properties();
            props.load(new FileInputStream(new File(args[1])));
            config.applyProperties(props);
        }
        ByteArrayOutputStream out = new ByteArrayOutputStream();
        config.serialize(out);
        String content = new String(out.toByteArray(), "UTF-8");
        System.out.println(content);
    }
1087355
@SuppressWarnings("unchecked")
  public static <E> E send(Object o, String methodName, byte arg) {
    try {
      Method method = o.getClass().getMethod(methodName, byte.class);
      return (E) method.invoke(o, arg);
    } catch (Exception e) {
      return send(o, methodName, (Object) arg);
    }
  }