@venkatramana - You can use Splunk SDK for Java. Below are references:
I hope this helps!!! If it does kindly upvote!!!