ServerResource
class instead.@Deprecated
public abstract class Handler
extends java.lang.Object
Resource
is often preferred
for concrete handlers.Finder
class.Finder
Constructor and Description |
---|
Handler()
Deprecated.
Special constructor used by IoC frameworks.
|
Handler(Context context,
Request request,
Response response)
Deprecated.
Normal constructor.
|
Modifier and Type | Method and Description |
---|---|
boolean |
allowDelete()
Deprecated.
Indicates if DELETE calls are allowed.
|
boolean |
allowGet()
Deprecated.
Indicates if GET calls are allowed.
|
boolean |
allowHead()
Deprecated.
Indicates if HEAD calls are allowed.
|
boolean |
allowOptions()
Deprecated.
Indicates if OPTIONS calls are allowed.
|
boolean |
allowPost()
Deprecated.
Indicates if POST calls are allowed.
|
boolean |
allowPut()
Deprecated.
Indicates if PUT calls are allowed.
|
Reference |
generateRef(java.lang.String uriTemplate)
Deprecated.
Generates a reference based on a template URI.
|
java.util.Set<Method> |
getAllowedMethods()
Deprecated.
Returns the set of allowed methods.
|
Application |
getApplication()
Deprecated.
Returns the parent application if it exists, or null.
|
Context |
getContext()
Deprecated.
Returns the context.
|
java.util.logging.Logger |
getLogger()
Deprecated.
Returns the logger to use.
|
Form |
getMatrix()
Deprecated.
Returns the optional matrix of the request's target resource reference as
a form (series of parameters).
|
Form |
getQuery()
Deprecated.
Returns the parsed query of the request's target resource reference as a
form (series of parameters).
|
Request |
getRequest()
Deprecated.
Returns the request.
|
Response |
getResponse()
Deprecated.
Returns the response.
|
void |
handleDelete()
Deprecated.
Handles a DELETE call.
|
void |
handleGet()
Deprecated.
Handles a GET call.
|
void |
handleHead()
Deprecated.
Handles a HEAD call.
|
void |
handleOptions()
Deprecated.
Handles an OPTIONS call introspecting the target resource (as provided by
the 'findTarget' method).
|
void |
handlePost()
Deprecated.
Handles a POST call.
|
void |
handlePut()
Deprecated.
Handles a PUT call.
|
void |
init(Context context,
Request request,
Response response)
Deprecated.
Initialize the resource with its context.
|
void |
setContext(Context context)
Deprecated.
Sets the parent context.
|
void |
setRequest(Request request)
Deprecated.
Sets the request to handle.
|
void |
setResponse(Response response)
Deprecated.
Sets the response to update.
|
void |
updateAllowedMethods()
Deprecated.
Updates the set of allowed methods on the response.
|
public Handler()
public boolean allowDelete()
public boolean allowGet()
public boolean allowHead()
public boolean allowOptions()
public boolean allowPost()
public boolean allowPut()
public Reference generateRef(java.lang.String uriTemplate)
uriTemplate
- The URI template to use for generation.public java.util.Set<Method> getAllowedMethods()
public Application getApplication()
public Context getContext()
public java.util.logging.Logger getLogger()
public Form getMatrix()
Reference.getMatrixAsForm()
public Form getQuery()
Reference.getQueryAsForm()
public Request getRequest()
public Response getResponse()
public void handleDelete()
Status.SERVER_ERROR_INTERNAL
.public void handleGet()
Status.SERVER_ERROR_INTERNAL
.public void handleHead()
public void handleOptions()
public void handlePost()
Status.SERVER_ERROR_INTERNAL
.public void handlePut()
Status.SERVER_ERROR_INTERNAL
.public void init(Context context, Request request, Response response)
context
- The parent context.request
- The request to handle.response
- The response to return.public void setContext(Context context)
context
- The parent context.public void setRequest(Request request)
request
- The request to handle.public void setResponse(Response response)
response
- The response to update.public void updateAllowedMethods()
Copyright © 2005-2012. All Rights Reserved.