Ring central cloud communication Platform provides webhook to notify you for any events like voicemail, SMS from your account.In this blog we will see how to set up you application to receive notifications from ringcentral platform through webhook. I am using jetty server to run my webserver which is listening to the port 5000. Server server = new Server( 5000 ) ; server.setHandler( new WebhookServer()) ; server.start() ; server.join() ; override the handle method to set status to 200 OK to return success response from webserver. public void handle(String target , Request baseRequest , HttpServletRequest request , HttpServletResponse response) throws IOException , ServletException { response.setStatus(HttpServletResponse.SC_OK) ; response.setHeader( "Validation-Token" , request.getHeader( "Validation-Token" )) ; if (request.getMethod() == "POST" ) { String body = request.getReader().lines().collect(java.util.stream....
This is My first post on Spring. Happy Learning !! 1.Download Eclipse from https://www.eclipse.org/downloads/ 2. Once you install the Eclipse navigate to Help->Eclipse Marketplace and download Spring tools Spring uses IOC (Inversion of Control) container to create, initialize, manages objects and you don't need to create the java objects from the class which avoids tight coupling. In this blog, you will learn about the different ways of creating the java objects through spring core container IOC. Create a java project Create a bean class Hello.java- Spring uses setter methods to initialize the objects package com.practice; public class Hello { public Hello() { System.out.println("Hello constructor"); } public String message; public void getMessage() { System.out.println("Your Message"+ message); } public void setMessage(String message) { this.message = message; } } Create a spring bean configuration...
Mule is a project management tool to manage dependency and you can use it to develop a project and test it. 1. Create a mule project and select use Maven checkbox to enable maven support to the project and click finish. Maven will start downloading the dependency it requires to build a project based on pom.xml example: project1 2. Create a mule flow by adding a http connector and set payload 3. Add the http listener configurations details as below Host: Localhost Port :8081 path: /hello Allowed Method: GET 4. Configure the Set Payload component to set the value to "Hello World!" Once you add http connector Maven adds the dependency in pom.xml and automatically download its required dependencies <dependency> ...
Comments
Post a Comment