|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.restlet.Uniform
org.restlet.Restlet
org.restlet.util.WrapperRestlet
public class WrapperRestlet
Restlet wrapper. Useful for application developer who need to wrap a Restlet instance.
| Constructor Summary | |
|---|---|
WrapperRestlet(Restlet wrappedRestlet)
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. |
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 WrapperRestlet(Restlet wrappedRestlet)
wrappedRestlet - The wrapped Restlet instance.| Method Detail |
|---|
public Application getApplication()
Restlet
getApplication in class Restletpublic Context getContext()
Restlet
getContext in class Restletpublic Logger getLogger()
Restlet
getLogger in class Restlet
public void handle(Request request,
Response response)
RestletContext.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.
Subclasses overriding this method should make sure that they call super.handle(request, response) before adding their own logic.
handle in class Restletrequest - The request to handle.response - The response to update.public boolean isStarted()
Restlet
isStarted in class Restletpublic boolean isStopped()
Restlet
isStopped in class Restletpublic void setContext(Context context)
Restlet
setContext in class Restletcontext - The context.
public void start()
throws Exception
Restlet
start in class RestletException
public void stop()
throws Exception
Restlet
stop in class RestletException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||