|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.restlet.Uniform
org.restlet.Restlet
public class Restlet
Uniform class that provides a context and life cycle support. It has many subclasses that focus on specific ways to process calls. The context property is typically provided by a parent Component as a way to encapsulate access to shared features such as logging and client connectors.
| Constructor Summary | |
|---|---|
Restlet()
Constructor. |
|
Restlet(Context context)
Constructor. |
|
| Method Summary | |
|---|---|
Application |
getApplication()
Returns the parent application if it exists, or null. |
Context |
getContext()
Returns the context. |
Logger |
getLogger()
Returns the context's logger. |
void |
handle(Request request,
Response response)
Handles a call. |
protected void |
init(Request request,
Response response)
Deprecated. Instead, make sure that you call the handle(Request, Response) method from your Restlet
superclass. |
boolean |
isStarted()
Indicates if the Restlet is started. |
boolean |
isStopped()
Indicates if the Restlet is stopped. |
void |
setContext(Context context)
Sets the context. |
void |
start()
Starts the Restlet. |
void |
stop()
Stops the Restlet. |
| Methods inherited from class org.restlet.Uniform |
|---|
delete, delete, get, get, handle, head, head, options, options, post, post, put, put |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public Restlet()
public Restlet(Context context)
context - The context.| Method Detail |
|---|
public Application getApplication()
public Context getContext()
public Logger getLogger()
public void handle(Request request,
Response response)
init(Request, Response) method. In next version,
init(Request, Response) will be removed and its logic directly
added to this method instead.
Subclasses overriding this method should make sure that they call super.handle(request, response) before adding their own logic.
handle in class Uniformrequest - The request to handle.response - The response to update.
@Deprecated
protected void init(Request request,
Response response)
handle(Request, Response) method from your Restlet
superclass.
Context.setCurrent(Context) method and by attempting to start it,
unless it was already started. If an exception is thrown during the start
action, then the response status is set to
Status.SERVER_ERROR_INTERNAL.
request - The request to handle.response - The response to update.public boolean isStarted()
public boolean isStopped()
public void setContext(Context context)
context - The context.
public void start()
throws Exception
Exception
public void stop()
throws Exception
Exception
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||