|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.restlet.Uniform
org.restlet.Restlet
org.restlet.Application
public class Application
Restlet that can be attached to one or more VirtualHosts. Applications are
guaranteed to receive calls with their base reference set relatively to the
VirtualHost that served them. This class is both a descriptor able to create
the root Restlet and the actual Restlet that can be attached to one or more
VirtualHost instances.
Applications also have many useful Services associated. They are available as
properties that can be eventually overriden:
| Constructor Summary | |
|---|---|
Application()
Constructor. |
|
Application(Context parentContext)
Constructor. |
|
| Method Summary | |
|---|---|
Restlet |
createRoot()
Creates a root Restlet that will receive all incoming calls. |
String |
getAuthor()
Returns the author(s). |
ConnectorService |
getConnectorService()
Returns the connector service. |
ConverterService |
getConverterService()
Deprecated. Since 1.1 with no replacement as it doesn't fit well with content negotiation. Most users prefer to handle those conversion in Resource subclasses. |
static Application |
getCurrent()
This variable is stored internally as a thread local variable and updated each time a call enters an application. |
DecoderService |
getDecoderService()
Returns the decoder service, enabled by default. |
String |
getDescription()
Returns the description. |
MetadataService |
getMetadataService()
Returns the metadata service. |
String |
getName()
Returns the display name. |
String |
getOwner()
Returns the owner(s). |
Restlet |
getRoot()
Returns the root Restlet. |
StatusService |
getStatusService()
Returns the status service, enabled by default. |
TunnelService |
getTunnelService()
Returns the tunnel service, enabled by default. |
void |
handle(Request request,
Response response)
Handles a call. |
void |
setAuthor(String author)
Sets the author(s). |
void |
setConnectorService(ConnectorService connectorService)
Sets the connector service. |
void |
setConverterService(ConverterService converterService)
Deprecated. Since 1.1 with no replacement as it doesn't fit well with content negotiation. Most users prefer to handle those conversion in Resource subclasses. |
static void |
setCurrent(Application application)
Sets the context to associated with the current thread. |
void |
setDecoderService(DecoderService decoderService)
Sets the decoder service. |
void |
setDescription(String description)
Sets the description. |
void |
setMetadataService(MetadataService metadataService)
Sets the metadata service. |
void |
setName(String name)
Sets the display name. |
void |
setOwner(String owner)
Sets the owner(s). |
void |
setRoot(Restlet root)
Sets the root Restlet. |
void |
setStatusService(StatusService statusService)
Sets the status service. |
void |
setTunnelService(TunnelService tunnelService)
Sets the tunnel service. |
void |
start()
Starts the Restlet. |
void |
stop()
Stops the Restlet. |
| Methods inherited from class org.restlet.Restlet |
|---|
getApplication, getContext, getLogger, init, isStarted, isStopped, setContext |
| 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 |
|---|
public Application()
public Application(Context parentContext)
parentContext - The parent context. Typically the component's context.| Method Detail |
|---|
public static Application getCurrent()
public static void setCurrent(Application application)
application - The thread's context.public Restlet createRoot()
public String getAuthor()
public ConnectorService getConnectorService()
@Deprecated public ConverterService getConverterService()
public DecoderService getDecoderService()
public String getDescription()
public MetadataService getMetadataService()
public String getName()
public String getOwner()
public Restlet getRoot()
public StatusService getStatusService()
public TunnelService getTunnelService()
public void handle(Request request,
Response response)
RestletRestlet.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.
handle in class Restletrequest - The request to handle.response - The response to update.public void setAuthor(String author)
author - The author(s).public void setConnectorService(ConnectorService connectorService)
connectorService - The connector service.@Deprecated public void setConverterService(ConverterService converterService)
converterService - The converter service.public void setDecoderService(DecoderService decoderService)
decoderService - The decoder service.public void setDescription(String description)
description - The description.public void setMetadataService(MetadataService metadataService)
metadataService - The metadata service.public void setName(String name)
name - The display name.public void setOwner(String owner)
owner - The owner(s).public void setRoot(Restlet root)
root - The root Restlet.public void setStatusService(StatusService statusService)
statusService - The status service.public void setTunnelService(TunnelService tunnelService)
tunnelService - The tunnel service.
public void start()
throws Exception
Restlet
start in class RestletException
public void stop()
throws Exception
Restlet
stop in class RestletException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||