|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.restlet.util.Engine
public abstract class Engine
Facade to the engine implementating the Restlet API. Note that this is an SPI class that is not intended for public usage.
| Field Summary | |
|---|---|
static String |
MAJOR_NUMBER
Major version number. |
static String |
MINOR_NUMBER
Minor version number. |
static String |
RELEASE_NUMBER
Release number. |
static String |
VERSION
Complete version. |
| Constructor Summary | |
|---|---|
Engine()
|
|
| Method Summary | |
|---|---|
abstract Resource |
createDirectoryResource(Directory handler,
Request request,
Response response)
Creates a directory resource. |
abstract Helper |
createHelper(Application application,
Context parentContext)
Creates a new helper for a given component. |
abstract Helper |
createHelper(Client client)
Creates a new helper for a given client connector. |
abstract Helper |
createHelper(Component component)
Creates a new helper for a given component. |
abstract Helper |
createHelper(Server server)
Creates a new helper for a given server connector. |
static ClassLoader |
getClassLoader()
Returns a class loader to use when creating instantiating implementation classes. |
static Engine |
getInstance()
Returns the registered Restlet engine. |
abstract 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. |
static int |
hashCode(Object... objects)
Computes the hash code of a set of objects. |
abstract void |
parse(Logger logger,
Form form,
Representation representation)
Parses a representation into a form. |
abstract void |
parse(Logger logger,
Form form,
String queryString,
CharacterSet characterSet)
Parses an URL encoded query string into a given form. |
static void |
setClassLoader(ClassLoader newClassloader)
Sets a new class loader to use when creating instantiating implementation classes. |
static void |
setInstance(Engine engine)
Sets the registered Restlet engine. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final String MAJOR_NUMBER
public static final String MINOR_NUMBER
public static final String RELEASE_NUMBER
public static final String VERSION
| Constructor Detail |
|---|
public Engine()
| Method Detail |
|---|
public static ClassLoader getClassLoader()
public static Engine getInstance()
public static int hashCode(Object... objects)
public static void setClassLoader(ClassLoader newClassloader)
newClassloader - The new class loader to use.public static void setInstance(Engine engine)
engine - The registered Restlet engine.
public abstract Resource createDirectoryResource(Directory handler,
Request request,
Response response)
throws IOException
handler - The parent directory handler.request - The request to handle.response - The response to return.
IOException
public abstract Helper createHelper(Application application,
Context parentContext)
application - The application to help.parentContext - The parent context, typically the component's context.
public abstract Helper createHelper(Client client)
client - The client to help.
public abstract Helper createHelper(Component component)
component - The component to help.
public abstract Helper createHelper(Server server)
server - The server to help.
public abstract Variant getPreferredVariant(ClientInfo client,
List<Variant> variants,
Language defaultLanguage)
client - The client preferences.variants - The list of variants to compare.defaultLanguage - The default language.
public abstract void parse(Logger logger,
Form form,
Representation representation)
logger - The logger to use.form - The target form.representation - The representation to parse.
public abstract void parse(Logger logger,
Form form,
String queryString,
CharacterSet characterSet)
logger - The logger to use.form - The target form.queryString - Query string.characterSet - The supported character encoding.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||