Created
September 27, 2015 22:46
-
-
Save albertoruvel/432552a92d714b7e5d3c to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* To change this license header, choose License Headers in Project Properties. | |
* To change this template file, choose Tools | Templates | |
* and open the template in the editor. | |
*/ | |
package com.springip.server; | |
import com.springip.server.model.Person; | |
import com.springip.server.model.Result; | |
/** | |
* | |
* @author Alberto | |
*/ | |
public class EchoService { | |
public Result echo(Person person){ | |
Result r = null; | |
System.out.println("Got to echo service.."); | |
System.out.println("Checking person data.."); | |
if(person == null){ | |
System.out.println("Person is null.."); | |
System.out.println("Returning bad response"); | |
r = new Result(0); | |
} | |
else{ | |
System.out.println("Person is not null.."); | |
System.out.println("Person name: " + person.getName()); | |
System.out.println("Person age: " + person.getAge()); | |
r = new Result(1); | |
} | |
System.out.println("Returning result.."); | |
return r; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment