Add Java-based trigger sample.