examples/pubsub-publish-avro-example/src/main/java/com/google/cloud/pso/pubsub/EmployeePublisherMain.java
/**
     * The main entry point for the {@link EmployeePublisherMain} class.
     *
     * @param args program arguments
     * @throws IOException
     */
The main entry point for the  EmployeePublisherMain class.
@param args program arguments
@throws IOException
The main entry point for the EmployeePublisherMain class . @param args program arguments @throws IOException
public static void main(String[] args) throws IOException {
        ObjectPublisher.Args parsedArgs = new ObjectPublisher.Args();
        JCommander jCommander = JCommander.newBuilder().addObject(parsedArgs).build();
        jCommander.setProgramName(EmployeePublisherMain.class.getCanonicalName());
        try {
            jCommander.parse(args);
        } catch (ParameterException e) {
            jCommander.usage();
            return;
        }
        if (parsedArgs.isHelp()) {
            jCommander.usage();
        } else {
            EmployeePublisher publisher = new EmployeePublisher();
            publisher.publish(parsedArgs);
        }
    }
public static void main ( String [ ] args ) throws IOException { ObjectPublisher . Args parsedArgs = new ObjectPublisher . Args ( ) ; JCommander jCommander = JCommander . newBuilder ( ) . addObject ( parsedArgs ) . build ( ) ; jCommander . setProgramName ( EmployeePublisherMain . class . getCanonicalName ( ) ) ; try { jCommander . parse ( args ) ; } catch ( ParameterException e ) { jCommander . usage ( ) ; return ; } if ( parsedArgs . isHelp ( ) ) { jCommander . usage ( ) ; } else { EmployeePublisher publisher = new EmployeePublisher ( ) ; publisher . publish ( parsedArgs ) ; } }
The main entry point for the {@link EmployeePublisherMain} class.
The main entry point for the { @link EmployeePublisherMain } class .