|
||||||||||
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 abstract 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:
KEY
constant to lookup the
Context.attributes property.
Field Summary | |
---|---|
static String |
KEY
Name of the attribute key containing a reference to the current application. |
Constructor Summary | |
---|---|
Application()
Constructor. |
|
Application(Context parentContext)
Constructor. |
Method Summary | |
---|---|
abstract 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()
Returns the converter service. |
DecoderService |
getDecoderService()
Returns the decoder service. |
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. |
TunnelService |
getTunnelService()
Returns the tunnel service. |
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)
Sets the converter service. |
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 |
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 |
---|
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 |
Field Detail |
---|
public static final String KEY
Constructor Detail |
---|
public Application()
public Application(Context parentContext)
parentContext
- The parent context. Typically the component's context.Method Detail |
---|
public abstract Restlet createRoot()
public String getAuthor()
public ConnectorService getConnectorService()
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)
handle
in class Restlet
request
- The request to handle.response
- The response to update.public void setAuthor(String author)
author
- The author(s).public void setDescription(String description)
description
- The description.public void setName(String name)
name
- The display name.public void setOwner(String owner)
owner
- The owner(s).public void start() throws Exception
Restlet
start
in class Restlet
Exception
public void stop() throws Exception
Restlet
stop
in class Restlet
Exception
public void setConnectorService(ConnectorService connectorService)
connectorService
- The connector service.public void setConverterService(ConverterService converterService)
converterService
- The converter service.public void setDecoderService(DecoderService decoderService)
decoderService
- The decoder service.public void setMetadataService(MetadataService metadataService)
metadataService
- The metadata service.public void setStatusService(StatusService statusService)
statusService
- The status service.public void setTunnelService(TunnelService tunnelService)
tunnelService
- The tunnel service.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |