Skip to content

Instantly share code, notes, and snippets.

@albertoruvel
Created September 27, 2015 22:46
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save albertoruvel/432552a92d714b7e5d3c to your computer and use it in GitHub Desktop.
Save albertoruvel/432552a92d714b7e5d3c to your computer and use it in GitHub Desktop.
/*
* 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