Package org.restlet.engine
Class RestletHelper<T extends Restlet>
- java.lang.Object
-
- org.restlet.engine.Helper
-
- org.restlet.engine.RestletHelper<T>
-
- Direct Known Subclasses:
CompositeHelper,ConnectorHelper
public abstract class RestletHelper<T extends Restlet> extends Helper
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.
-
-
Field Summary
Fields Modifier and Type Field Description private java.util.Map<java.lang.String,java.lang.Object>attributesThe map of attributes exchanged between the API and the Engine via this helper.private ThelpedThe helped Restlet.
-
Constructor Summary
Constructors Constructor Description RestletHelper(T helped)Constructor.
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description 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.ContextgetContext()Returns the helped Restlet context.TgetHelped()Returns the helped Restlet.Series<Parameter>getHelpedParameters()Returns the helped Restlet parameters.java.util.logging.LoggergetLogger()Returns the helped Restlet logger.MetadataServicegetMetadataService()Returns the metadata service.voidhandle(Request request, Response response)Handles a call.voidsetHelped(T helpedRestlet)Sets the helped Restlet.abstract voidstart()Start callback.abstract voidstop()Stop callback.abstract voidupdate()
-
-
-
Constructor Detail
-
RestletHelper
public RestletHelper(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.
-
getHelpedParameters
public Series<Parameter> getHelpedParameters()
Returns the helped Restlet parameters.- Returns:
- The helped Restlet parameters.
-
getLogger
public java.util.logging.Logger getLogger()
Returns the helped Restlet logger.- Returns:
- The helped Restlet logger.
-
getMetadataService
public MetadataService getMetadataService()
Returns the metadata service. If the parent application doesn't exist, a new instance is created.- Returns:
- The metadata service.
-
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.ExceptionStart callback.- Throws:
java.lang.Exception
-
stop
public abstract void stop() throws java.lang.ExceptionStop callback.- Throws:
java.lang.Exception
-
update
public abstract void update() throws java.lang.Exception- Throws:
java.lang.Exception
-
-