package com.nextrow.restservice.core;
import javax.ws.rs.GET;
import javax.ws.rs.Path;
import javax.ws.rs.Produces;
import javax.ws.rs.core.MediaType;
import org.apache.felix.scr.annotations.Component;
import org.apache.felix.scr.annotations.Service;
@Service
@Component(metatype = false)
@Path("/helloservice")
public class SampleResource {
@GET
@Path("/sayhi")
public String helloWorld() {
return "SampleResource says hi";
}
@GET
@Path("/getoperation")
@Produces({ MediaType.TEXT_PLAIN })
public String getServiceOperation() {
String status = "false";
// service.dosomething return
return status;
}
}