Examples of BaseCommand


Examples of com.google.cloud.genomics.api.client.commands.BaseCommand

    try {
      // Parse the command line
      cmdLine.setArgs(args);

      // Authorization
      BaseCommand command = cmdLine.getCommand();
      List<String> scopes = command.getScopes();
      VerificationCodeReceiver receiver = command.noLocalServer ? new GooglePromptReceiver() :
          new LocalServerReceiver();

      GenomicsFactory genomicsFactory = GenomicsFactory.builder("genomics_java_client")
          .setScopes(scopes)
          .setUserName("user" + scopes.toString())
          .setVerificationCodeReceiver(Suppliers.ofInstance(receiver))
          .setRootUrl(command.rootUrl)
          .setServicePath("/")
          .build();

      File clientSecrets = new File(command.clientSecretsFilename);
      if (!clientSecrets.exists()) {
        System.err.println(
            "Client secrets file " + command.clientSecretsFilename + " does not exist."
            + " Visit https://developers.google.com/genomics to learn how"
            + " to install a client_secrets.json file.  If you have installed a client_secrets.json"
            + " in a specific location, use --client_secrets_filename <path>/client_secrets.json.");
        return;
      }

      File dataStoreFile = new File(System.getProperty("user.home"), ".store/genomics_java_client");
      command.setDataStoreFactory(new ReadableFileDataStoreFactory(dataStoreFile));
      command.handleRequest(genomicsFactory.fromClientSecretsFile(clientSecrets));

    } catch (IllegalArgumentException | ParameterException e) {
      cmdLine.printHelp(e.getMessage() + "\n", System.out);
    } catch (GoogleJsonResponseException e) {
      System.out.println("API request failed: " + BaseCommand.getErrorMessage(e));
View Full Code Here

Examples of io.fabric8.gateway.handlers.detecting.protocol.openwire.command.BaseCommand

     * @throws IOException
     */
    public void tightUnmarshal(OpenWireFormat wireFormat, Object o, DataByteArrayInputStream dataIn, BooleanStream bs) throws IOException {
        super.tightUnmarshal(wireFormat, o, dataIn, bs);

        BaseCommand info = (BaseCommand)o;
        info.setCommandId(dataIn.readInt());
        info.setResponseRequired(bs.readBoolean());

    }
View Full Code Here

Examples of org.apache.activemq.apollo.openwire.command.BaseCommand

     * @throws IOException
     */
    public void tightUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn, BooleanStream bs) throws IOException {
        super.tightUnmarshal(wireFormat, o, dataIn, bs);

        BaseCommand info = (BaseCommand)o;
        info.setCommandId(dataIn.readInt());
        info.setResponseRequired(bs.readBoolean());

    }
View Full Code Here

Examples of org.apache.activemq.apollo.openwire.command.BaseCommand

    /**
     * Write the booleans that this object uses to a BooleanStream
     */
    public int tightMarshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) throws IOException {

        BaseCommand info = (BaseCommand)o;

        int rc = super.tightMarshal1(wireFormat, o, bs);
        bs.writeBoolean(info.isResponseRequired());

        return rc + 4;
    }
View Full Code Here

Examples of org.apache.activemq.apollo.openwire.command.BaseCommand

     * @throws IOException thrown if an error occurs
     */
    public void tightMarshal2(OpenWireFormat wireFormat, Object o, DataOutput dataOut, BooleanStream bs) throws IOException {
        super.tightMarshal2(wireFormat, o, dataOut, bs);

        BaseCommand info = (BaseCommand)o;
        dataOut.writeInt(info.getCommandId());
        bs.readBoolean();

    }
View Full Code Here

Examples of org.apache.activemq.apollo.openwire.command.BaseCommand

     * @throws IOException
     */
    public void looseUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn) throws IOException {
        super.looseUnmarshal(wireFormat, o, dataIn);

        BaseCommand info = (BaseCommand)o;
        info.setCommandId(dataIn.readInt());
        info.setResponseRequired(dataIn.readBoolean());

    }
View Full Code Here

Examples of org.apache.activemq.apollo.openwire.command.BaseCommand

    /**
     * Write the booleans that this object uses to a BooleanStream
     */
    public void looseMarshal(OpenWireFormat wireFormat, Object o, DataOutput dataOut) throws IOException {

        BaseCommand info = (BaseCommand)o;

        super.looseMarshal(wireFormat, o, dataOut);
        dataOut.writeInt(info.getCommandId());
        dataOut.writeBoolean(info.isResponseRequired());

    }
View Full Code Here

Examples of org.apache.activemq.apollo.openwire.command.BaseCommand

     * @throws IOException
     */
    public void tightUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn, BooleanStream bs) throws IOException {
        super.tightUnmarshal(wireFormat, o, dataIn, bs);

        BaseCommand info = (BaseCommand)o;
        info.setCommandId(dataIn.readInt());
        info.setResponseRequired(bs.readBoolean());

    }
View Full Code Here

Examples of org.apache.activemq.apollo.openwire.command.BaseCommand

    /**
     * Write the booleans that this object uses to a BooleanStream
     */
    public int tightMarshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) throws IOException {

        BaseCommand info = (BaseCommand)o;

        int rc = super.tightMarshal1(wireFormat, o, bs);
        bs.writeBoolean(info.isResponseRequired());

        return rc + 4;
    }
View Full Code Here

Examples of org.apache.activemq.apollo.openwire.command.BaseCommand

     * @throws IOException thrown if an error occurs
     */
    public void tightMarshal2(OpenWireFormat wireFormat, Object o, DataOutput dataOut, BooleanStream bs) throws IOException {
        super.tightMarshal2(wireFormat, o, dataOut, bs);

        BaseCommand info = (BaseCommand)o;
        dataOut.writeInt(info.getCommandId());
        bs.readBoolean();

    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.