Package org.restlet.util
Class WrapperRestlet
java.lang.Object
org.restlet.Restlet
org.restlet.util.WrapperRestlet
- All Implemented Interfaces:
Uniform
Restlet wrapper. Useful for application developer who need to wrap a Restlet
instance.
- Author:
- Thierry Boileau
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReturns the parent application if it exists, or null.Returns the author(s).Returns the context.Returns the description.Returns the context's logger.getName()Returns the display name.getOwner()Returns the owner(s).voidHandles a call.booleanIndicates if the Restlet is started.booleanIndicates if the Restlet is stopped.voidSets the author(s).voidsetContext(Context context) Sets the context.voidsetDescription(String description) Sets the description.voidSets the display name.voidSets the owner(s).voidstart()Starts the Restlet.voidstop()Stops the Restlet.Methods inherited from class org.restlet.Restlet
createFinder, finalize, getFinderClass, handle, handle, handle, setFinderClass
-
Constructor Details
-
WrapperRestlet
Constructor.- Parameters:
wrappedRestlet- The wrapped Restlet instance.
-
-
Method Details
-
getApplication
Description copied from class:RestletReturns the parent application if it exists, or null.- Overrides:
getApplicationin classRestlet- Returns:
- The parent application if it exists, or null.
-
getAuthor
Description copied from class:RestletReturns the author(s). -
getContext
Description copied from class:RestletReturns the context.- Overrides:
getContextin classRestlet- Returns:
- The context.
-
getDescription
Description copied from class:RestletReturns the description.- Overrides:
getDescriptionin classRestlet- Returns:
- The description
-
getLogger
Description copied from class:RestletReturns the context's logger. -
getName
Description copied from class:RestletReturns the display name. -
getOwner
Description copied from class:RestletReturns the owner(s). -
handle
Description copied from class:RestletHandles a call. The default behavior is to initialize the Restlet by setting the current context using theContext.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 toStatus.SERVER_ERROR_INTERNAL.Subclasses overriding this method should make sure that they call super.handle(request, response) before adding their own logic.
-
isStarted
public boolean isStarted()Description copied from class:RestletIndicates if the Restlet is started. -
isStopped
public boolean isStopped()Description copied from class:RestletIndicates if the Restlet is stopped. -
setAuthor
Description copied from class:RestletSets the author(s). -
setContext
Description copied from class:RestletSets the context.- Overrides:
setContextin classRestlet- Parameters:
context- The context.
-
setDescription
Description copied from class:RestletSets the description.- Overrides:
setDescriptionin classRestlet- Parameters:
description- The description.
-
setName
Description copied from class:RestletSets the display name. -
setOwner
Description copied from class:RestletSets the owner(s). -
start
Description copied from class:RestletStarts the Restlet. By default its only sets "started" internal property to true. WARNING: this method must be called at the end of the starting process by subclasses otherwise concurrent threads could enter into the call handling logic too early. -
stop
Description copied from class:RestletStops the Restlet. By default its only sets "started" internal property to false. WARNING: this method must be called at the beginning of the stopping process by subclasses otherwise concurrent threads could continue to (improperly) handle calls.
-