org.restlet.util
Class WrapperRestlet

java.lang.Object
  extended by org.restlet.Uniform
      extended by org.restlet.Restlet
          extended by org.restlet.util.WrapperRestlet

public class WrapperRestlet
extends Restlet

Restlet wrapper. Useful for application developer who need to wrap a Restlet instance.

Author:
Thierry Boileau

Constructor Summary
WrapperRestlet(Restlet wrappedRestlet)
          Constructor.
 
Method Summary
 Application getApplication()
          Returns the parent application if it exists, or null.
 Context getContext()
          Returns the context.
 java.util.logging.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.Restlet
init
 
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

WrapperRestlet

public WrapperRestlet(Restlet wrappedRestlet)
Constructor.

Parameters:
wrappedRestlet - The wrapped Restlet instance.
Method Detail

getApplication

public Application getApplication()
Description copied from class: Restlet
Returns the parent application if it exists, or null.

Overrides:
getApplication in class Restlet
Returns:
The parent application if it exists, or null.

getContext

public Context getContext()
Description copied from class: Restlet
Returns the context.

Overrides:
getContext in class Restlet
Returns:
The context.

getLogger

public java.util.logging.Logger getLogger()
Description copied from class: Restlet
Returns the context's logger.

Overrides:
getLogger in class Restlet
Returns:
The context's logger.

handle

public void handle(Request request,
                   Response response)
Description copied from class: Restlet
Handles a call. The default behavior is to call the (now deprecated) Restlet.init(Request, Response) method. In next version, Restlet.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.

Overrides:
handle in class Restlet
Parameters:
request - The request to handle.
response - The response to update.

isStarted

public boolean isStarted()
Description copied from class: Restlet
Indicates if the Restlet is started.

Overrides:
isStarted in class Restlet
Returns:
True if the Restlet is started.

isStopped

public boolean isStopped()
Description copied from class: Restlet
Indicates if the Restlet is stopped.

Overrides:
isStopped in class Restlet
Returns:
True if the Restlet is stopped.

setContext

public void setContext(Context context)
Description copied from class: Restlet
Sets the context.

Overrides:
setContext in class Restlet
Parameters:
context - The context.

start

public void start()
           throws java.lang.Exception
Description copied from class: Restlet
Starts the Restlet.

Overrides:
start in class Restlet
Throws:
java.lang.Exception

stop

public void stop()
          throws java.lang.Exception
Description copied from class: Restlet
Stops the Restlet.

Overrides:
stop in class Restlet
Throws:
java.lang.Exception


Copyright © 2005-2008 Noelios Technologies.