The Java API is under active development and will be refactored in the next releases. You can browse the javadoc, but most classes are not documented yet.
For now, the best way to use the API is to:
Create a class that extends the DefaultGateway.
Initialize a GatewayServer with your newly created class.
Call the Gateway.start() method to enable your Python program to access your gateway.