On May 7, 2008, at 10:23 AM, Bill Burke wrote:
>
> Can you elaborate on what createEndpoint() is supposed to do? Is it
> a way for somebody to programmatically add resources?
>
> Your recent conversation with Sergey confused me...
>
Sorry about that. Its a way to create an instance of an endpoint class
in a Java SE environment. E.g. if you wanted to use Grizzly to publish
a JAX-RS application then you'd do something like:
ApplicationConfig config = new MyApplicationConfig(...);
RuntimeDelegate rd = RuntimeDelegate.getInstance();
Adapter a = rd.createEndpoint(config, Adapter.class);
SelectorThread st = GrizzlyServerFactory.create(
“
http://127.0.0.1:8084/”, a);
where Adaptor is a Grizzly-defined interface. The createEndpoint
method is generic so it can be used for a variety of HTTP servers.
Jersey supports Grizzly, the LW HTTP server built into Sun's SE 6.0
runtime and JAX-WS Provider but implementations are free to decide
what types they want to support.
Marc.
---
Marc Hadley <marc.hadley at sun.com>
CTO Office, Sun Microsystems.