[[contributing-java-plugin]]
== Contributing a Java Plugin

Now you can write your own Java plugin for use with {ls}.
We have provided instructions and GitHub examples to give
you a head start. 

Native support for Java plugins in {ls} consists of several components
including:

* Extensions to the Java execution engine to support running Java plugins in
Logstash pipelines
* APIs for developing Java plugins. 
The APIs are in the `co.elastic.logstash.api` package. 
A Java plugin might break if it references classes or specific concrete
implementations of API interfaces outside that package. The implementation of
classes outside of the API package may change at any time.
* Tooling to automate the packaging and deployment of Java plugins in Logstash.

[float]
=== Process overview
Here are the steps:

. Choose the type of plugin you want to create: input, codec, filter, or output. 
. Set up your environment. 
. Code the plugin.
. Package and deploy the plugin.
. Run Logstash with your new plugin.

[float]
==== Let's get started 
Here are the example repos:

* https://github.com/logstash-plugins/logstash-input-java_input_example[Input plugin example]
* https://github.com/logstash-plugins/logstash-codec-java_codec_example[Codec plugin example]
* https://github.com/logstash-plugins/logstash-filter-java_filter_example[Filter plugin example]
* https://github.com/logstash-plugins/logstash-output-java_output_example[Output plugin example]

Here are the instructions:

* <<java-input-plugin>>
* <<java-codec-plugin>>
* <<java-filter-plugin>>
* <<java-output-plugin>>


include::java-input.asciidoc[]
include::java-codec.asciidoc[]
include::java-filter.asciidoc[]
include::java-output.asciidoc[]

