|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.rexsl.page.BaseResource
public class BaseResource
Base implementation of Resource.
It is recommended to use this class as a base of all your JAX-RS resource
classes and construct pages with PageBuilder,
on top of BasePage, for example:
@Path("/")
public class MainRs extends BaseResource {
@GET
@Produces(MediaTypes.APPLICATION_XML)
public BasePage front() {
return new PageBuilder()
.stylesheet("/xsl/front.xsl")
.build(BasePage.class)
.init(this)
.append(new JaxbBundle("text", "Hello!"));
}
}
BasePage,
PageBuilder| Constructor Summary | |
|---|---|
BaseResource()
|
|
| Method Summary | |
|---|---|
HttpHeaders |
httpHeaders()
All Http Headers. |
HttpServletRequest |
httpServletRequest()
Request just received. |
Providers |
providers()
All registered JAX-RS providers. |
void |
setHttpHeaders(HttpHeaders hdrs)
Set HttpHeaders. |
void |
setHttpServletRequest(HttpServletRequest request)
Set HttpServletRequest. |
void |
setProviders(Providers prov)
Set Providers. |
void |
setUriInfo(UriInfo info)
Set URI Info. |
long |
started()
When this resource creation was started by JAX-RS implementation. |
UriInfo |
uriInfo()
Get URI Info. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public BaseResource()
| Method Detail |
|---|
public final long started()
started in interface Resourcepublic final Providers providers()
providers in interface Resourcepublic final HttpHeaders httpHeaders()
httpHeaders in interface Resourcepublic final UriInfo uriInfo()
uriInfo in interface Resourcepublic final HttpServletRequest httpServletRequest()
httpServletRequest in interface Resource
@Context
public final void setUriInfo(@NotNull
UriInfo info)
@Context annotation.
info - The info to inject
@Context
public final void setProviders(@NotNull
Providers prov)
@Context annotation.
prov - List of providers
@Context
public final void setHttpHeaders(@NotNull
HttpHeaders hdrs)
@Context annotation.
hdrs - List of headers
@Context
public final void setHttpServletRequest(@NotNull
HttpServletRequest request)
@Context annotation.
request - The request
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||