Skip to content

Instantly share code, notes, and snippets.

@marianogonzalez
Created September 26, 2014 15:08
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 marianogonzalez/0bda832ecfc115cbccfd to your computer and use it in GitHub Desktop.
Save marianogonzalez/0bda832ecfc115cbccfd to your computer and use it in GitHub Desktop.
@Path("/")
public class HelloWorldComponent {
private HelloWorldInterface helloWorldBinding;
@GET
@Path("/sayHello")
@Produces("text/plain")
public String sayHelloFromBinding() {
return helloWorldBinding.sayHello("s");
}
public void setHelloWorldBinding(HelloWorldInterface helloWorldBinding) {
this.helloWorldBinding = helloWorldBinding;
}
public HelloWorldInterface getHelloWorldBinding() {
return this.helloWorldBinding;
}
public static interface HelloWorldInterfac {
public String sayHello(String s);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment