| java.lang.Object org.restlet.util.Engine
All known Subclasses: com.noelios.restlet.Engine,
Engine | abstract public class Engine (Code) | | Facade to the engine implementating the Restlet API. Note that this is an SPI
class that is not intended for public usage.
author: Jerome Louvel (contact@noelios.com) |
Method Summary | |
abstract public Resource | createDirectoryResource(Directory handler, Request request, Response response) Creates a directory resource.
Parameters: handler - The parent directory handler. Parameters: request - The request to handle. Parameters: response - The response to return. | abstract public Helper | createHelper(Application application, Context parentContext) Creates a new helper for a given component.
Parameters: application - The application to help. Parameters: parentContext - The parent context, typically the component's context. | abstract public Helper | createHelper(Client client) Creates a new helper for a given client connector.
Parameters: client - The client to help. | abstract public Helper | createHelper(Component component) Creates a new helper for a given component.
Parameters: component - The component to help. | abstract public Helper | createHelper(Server server) Creates a new helper for a given server connector.
Parameters: server - The server to help. | public static ClassLoader | getClassLoader() Returns a class loader to use when creating instantiating implementation
classes. | public static Engine | getInstance() Returns the registered Restlet engine. | abstract public Variant | getPreferredVariant(ClientInfo client, List<Variant> variants, Language defaultLanguage) Returns the best variant representation for a given resource according
the the client preferences. A default language is provided in case
the variants don't match the client preferences.
Parameters: client - The client preferences. Parameters: variants - The list of variants to compare. Parameters: defaultLanguage - The default language. | public static int | hashCode(Object... objects) Computes the hash code of a set of objects. | abstract public void | parse(Logger logger, Form form, Representation representation) Parses a representation into a form. | abstract public void | parse(Logger logger, Form form, String queryString, CharacterSet characterSet) Parses an URL encoded query string into a given form. | public static void | setClassLoader(ClassLoader newClassloader) Sets a new class loader to use when creating instantiating implementation
classes. | public static void | setInstance(Engine engine) Sets the registered Restlet engine. |
MAJOR_NUMBER | final public static String MAJOR_NUMBER(Code) | | Major version number.
|
MINOR_NUMBER | final public static String MINOR_NUMBER(Code) | | Minor version number.
|
RELEASE_NUMBER | final public static String RELEASE_NUMBER(Code) | | Release number.
|
VERSION | final public static String VERSION(Code) | | Complete version.
|
createDirectoryResource | abstract public Resource createDirectoryResource(Directory handler, Request request, Response response) throws IOException(Code) | | Creates a directory resource.
Parameters: handler - The parent directory handler. Parameters: request - The request to handle. Parameters: response - The response to return. A new directory resource. throws: IOException - |
createHelper | abstract public Helper createHelper(Application application, Context parentContext)(Code) | | Creates a new helper for a given component.
Parameters: application - The application to help. Parameters: parentContext - The parent context, typically the component's context. The new helper. |
createHelper | abstract public Helper createHelper(Client client)(Code) | | Creates a new helper for a given client connector.
Parameters: client - The client to help. The new helper. |
createHelper | abstract public Helper createHelper(Component component)(Code) | | Creates a new helper for a given component.
Parameters: component - The component to help. The new helper. |
createHelper | abstract public Helper createHelper(Server server)(Code) | | Creates a new helper for a given server connector.
Parameters: server - The server to help. The new helper. |
getClassLoader | public static ClassLoader getClassLoader()(Code) | | Returns a class loader to use when creating instantiating implementation
classes. By default, it reused the classloader of this Engine's class.
|
getInstance | public static Engine getInstance()(Code) | | Returns the registered Restlet engine.
The registered Restlet engine. |
getPreferredVariant | abstract public Variant getPreferredVariant(ClientInfo client, List<Variant> variants, Language defaultLanguage)(Code) | | Returns the best variant representation for a given resource according
the the client preferences. A default language is provided in case
the variants don't match the client preferences.
Parameters: client - The client preferences. Parameters: variants - The list of variants to compare. Parameters: defaultLanguage - The default language. The preferred variant. See Also: Apache
* content negotiation algorithm |
hashCode | public static int hashCode(Object... objects)(Code) | | Computes the hash code of a set of objects. Follows the algorithm
specified in List.hasCode().
The hash code of a set of objects. |
parse | abstract public void parse(Logger logger, Form form, Representation representation)(Code) | | Parses a representation into a form.
Parameters: logger - The logger to use. Parameters: form - The target form. Parameters: representation - The representation to parse. |
parse | abstract public void parse(Logger logger, Form form, String queryString, CharacterSet characterSet)(Code) | | Parses an URL encoded query string into a given form.
Parameters: logger - The logger to use. Parameters: form - The target form. Parameters: queryString - Query string. Parameters: characterSet - The supported character encoding. |
setClassLoader | public static void setClassLoader(ClassLoader newClassloader)(Code) | | Sets a new class loader to use when creating instantiating implementation
classes.
Parameters: newClassloader - The new class loader to use. |
setInstance | public static void setInstance(Engine engine)(Code) | | Sets the registered Restlet engine.
Parameters: engine - The registered Restlet engine. |
|
|