|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.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. |
String |
getAuthor()
Returns the author(s). |
Context |
getContext()
Returns the context. |
String |
getDescription()
Returns the description. |
Logger |
getLogger()
Returns the context's logger. |
String |
getName()
Returns the display name. |
String |
getOwner()
Returns the owner(s). |
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 |
setAuthor(String author)
Sets the author(s). |
void |
setContext(Context context)
Sets the context. |
void |
setDescription(String description)
Sets the description. |
void |
setName(String name)
Sets the display name. |
void |
setOwner(String owner)
Sets the owner(s). |
void |
start()
Starts the Restlet. |
void |
stop()
Stops the Restlet. |
Methods inherited from class org.restlet.Restlet |
---|
createFinder, finalize, getFinderClass, handle, handle, handle, setFinderClass |
Methods inherited from class java.lang.Object |
---|
clone, equals, 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 Restlet
public String getAuthor()
Restlet
getAuthor
in class Restlet
public Context getContext()
Restlet
getContext
in class Restlet
public String getDescription()
Restlet
getDescription
in class Restlet
public Logger getLogger()
Restlet
getLogger
in class Restlet
public String getName()
Restlet
getName
in class Restlet
public String getOwner()
Restlet
getOwner
in class Restlet
public void handle(Request request, Response response)
Restlet
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
.
Subclasses overriding this method should make sure that they call super.handle(request, response) before adding their own logic.
handle
in interface Uniform
handle
in class Restlet
request
- The request to handle.response
- The response to update.public boolean isStarted()
Restlet
isStarted
in class Restlet
public boolean isStopped()
Restlet
isStopped
in class Restlet
public void setAuthor(String author)
Restlet
setAuthor
in class Restlet
author
- The author(s).public void setContext(Context context)
Restlet
setContext
in class Restlet
context
- The context.public void setDescription(String description)
Restlet
setDescription
in class Restlet
description
- The description.public void setName(String name)
Restlet
setName
in class Restlet
name
- The display name.public void setOwner(String owner)
Restlet
setOwner
in class Restlet
owner
- The owner(s).public void start() throws Exception
Restlet
start
in class Restlet
Exception
public void stop() throws Exception
Restlet
stop
in class Restlet
Exception
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |