sys::Obj sys::Virtual sys::Component web::Weblet
public abstract class Weblet
Weblet is the base class for Objects which handle HTTP requests for a specified URI prefix.
Weblets will not be registered with the WebService until the register() method is invoked. This could be done in _sInit(), or at some other time. Weblets can be removed from the WebService using unregister().
public Weblet nextWeblet
Used for WebService's linked list of weblets
public virtual Str description()
Get a brief description of the weblet.
public virtual void doDelete(WebReq req, WebRes res)
Service a DELETE request.
public virtual void get(WebReq req, WebRes res)
Service a GET request.
public virtual void head(WebReq req, WebRes res)
Service a HEAD request.
public virtual void post(WebReq req, WebRes res)
Service a POST request.
public abstract Str prefix()
Get the weblet's prefix which should be a simple name (no slash) used for routing URIs to this Weblet.
public virtual void put(WebReq req, WebRes res)
Service a PUT request.
public void register()
Register the weblet with the WebService.
public virtual void service(WebReq req, WebRes res)
Service the specified request. Default implementation routes to get(), head(), post(), put(), or delete().
public void unregister()
Remove this weblet from the WebService.