|
||||||||||
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.Component
public class Component
Restlet managing a set of Connectors, VirtualHosts and Applications.
Applications are expected to be directly attached to VirtualHosts. Components
also expose several services: access logging and status setting.
From an architectural point of view, here is the REST definition: "A
component is an abstract unit of software instructions and internal state
that provides a transformation of data via its interface." Roy T. Fielding
Constructor Summary | |
---|---|
Component()
Constructor. |
Method Summary | |
---|---|
ClientList |
getClients()
Returns the modifiable list of client connectors. |
VirtualHost |
getDefaultHost()
Returns the default virtual host. |
List<VirtualHost> |
getHosts()
Returns the modifiable list of host routers. |
LogService |
getLogService()
Returns the global log service. |
ServerList |
getServers()
Returns the modifiable list of server connectors. |
StatusService |
getStatusService()
Returns the status service. |
void |
handle(Request request,
Response response)
Handles a call. |
void |
setLogService(LogService logService)
Sets the global log service. |
void |
setStatusService(StatusService statusService)
Sets the status service. |
void |
start()
Starts the component and all its connectors. |
void |
stop()
Stops the component and all its connectors. |
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 |
Constructor Detail |
---|
public Component()
Method Detail |
---|
public ClientList getClients()
public ServerList getServers()
public void start() throws Exception
start
in class Restlet
Exception
public void stop() throws Exception
stop
in class Restlet
Exception
public VirtualHost getDefaultHost()
public List<VirtualHost> getHosts()
public LogService getLogService()
setLogService(LogService)
method, then a default
logger service is created. This default service is enabled by default and
has a logger name composed of the canonical name of the current
component's class or subclass, appended with the instance hash code
between parenthesis (eg. "com.mycompany.MyComponent(1439)").
public StatusService getStatusService()
public void handle(Request request, Response response)
handle
in class Restlet
request
- The request to handle.response
- The response to update.public void setLogService(LogService logService)
logService
- The global log service.public void setStatusService(StatusService statusService)
statusService
- The status service.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |