text: # Example handler method in Java 
  
  package example; 
  
  import com.amazonaws.services.lambda.runtime.Context 
  
  import com.amazonaws.services.lambda.runtime.RequestHandler 
  
  import com.amazonaws.services.lambda.runtime.LambdaLogger 
  
  // Handler value: example.Handler 
  
  public class Handler implements RequestHandler<Map<String,String>, String>{ 
  
   Gson gson = new GsonBuilder().setPrettyPrinting().create(); 
  
   @Override 
  
   public String handleRequest(Map<String,String> event, Context context) 
  
   { 
  
   LambdaLogger logger = context.getLogger(); 
  
   String response = new String("200 OK"); 
  
   logger.log("EVENT: " + gson.toJson(event)); 
  
   return response; 
  
   } 
  
  } 