public static void main()

in publish-events/channel/client-libraries/java/src/main/java/com/google/cloud/eventarc/publishing/example/PublishEventsExample.java [123:137]


  public static void main(String[] args) throws Exception {
    String projectId = args[0];
    String region = args[1];
    String channel = args[2];
    // Controls the format of events sent to Eventarc.
    // 'true' for using text format.
    // 'false' for proto (preferred) format.
    boolean useTextEvent = args.length > 3 ? Boolean.parseBoolean(args[3]) : false;

    String channelName = "projects/" + projectId + "/locations/" + region + "/channels/" + channel;
    System.out.println("Channel: " + channelName);
    System.out.println("useTextEvent: " + useTextEvent);

    new PublishEventsExample().PublishEvent(channelName, useTextEvent);
  }