org.restlet.util
Class Helper<T extends Restlet>

java.lang.Object
  extended by org.restlet.util.Helper<T>

public abstract class Helper<T extends Restlet>
extends java.lang.Object

Delegate used by API classes to get support from the implementation classes. Note that this is an SPI class that is not intended for public usage.

Author:
Jerome Louvel

Constructor Summary
Helper(T helped)
          Constructor.
 
Method Summary
 java.util.Map<java.lang.String,java.lang.Object> getAttributes()
          Returns the map of attributes exchanged between the API and the Engine via this helper.
 Context getContext()
          Returns the helped Restlet context.
 T getHelped()
          Returns the helped Restlet.
 Series<Parameter> getHelpedParameters()
          Returns the helped Restlet parameters.
 java.util.logging.Logger getLogger()
          Returns the helped Restlet logger.
 void handle(Request request, Response response)
          Handles a call.
 void setHelped(T helpedRestlet)
          Sets the helped Restlet.
abstract  void start()
          Start callback.
abstract  void stop()
          Stop callback.
abstract  void update()
          Update callback with less impact than a stop() followed by a start().
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Helper

public Helper(T helped)
Constructor.

Parameters:
helped - The helped Restlet.
Method Detail

getAttributes

public java.util.Map<java.lang.String,java.lang.Object> getAttributes()
Returns the map of attributes exchanged between the API and the Engine via this helper.

Returns:
The map of attributes.

getContext

public Context getContext()
Returns the helped Restlet context.

Returns:
The helped Restlet context.

getHelped

public T getHelped()
Returns the helped Restlet.

Returns:
The helped Restlet.

getLogger

public java.util.logging.Logger getLogger()
Returns the helped Restlet logger.

Returns:
The helped Restlet logger.

getHelpedParameters

public Series<Parameter> getHelpedParameters()
Returns the helped Restlet parameters.

Returns:
The helped Restlet parameters.

handle

public void handle(Request request,
                   Response response)
Handles a call.

Parameters:
request - The request to handle.
response - The response to update.

setHelped

public void setHelped(T helpedRestlet)
Sets the helped Restlet.

Parameters:
helpedRestlet - The helped Restlet.

start

public abstract void start()
                    throws java.lang.Exception
Start callback.

Throws:
java.lang.Exception

stop

public abstract void stop()
                   throws java.lang.Exception
Stop callback.

Throws:
java.lang.Exception

update

public abstract void update()
                     throws java.lang.Exception
Update callback with less impact than a stop() followed by a start().

Throws:
java.lang.Exception


Copyright © 2005-2008 Noelios Technologies.