Sedona

web::Weblet


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().


nextWeblet

public Weblet nextWeblet

Used for WebService's linked list of weblets

description

public virtual Str description()

Get a brief description of the weblet.

doDelete

public virtual void doDelete(WebReq req, WebRes res)

Service a DELETE request.

get

public virtual void get(WebReq req, WebRes res)

Service a GET request.

head

public virtual void head(WebReq req, WebRes res)

Service a HEAD request.

post

public virtual void post(WebReq req, WebRes res)

Service a POST request.

prefix

public abstract Str prefix()

Get the weblet's prefix which should be a simple name (no slash) used for routing URIs to this Weblet.

put

public virtual void put(WebReq req, WebRes res)

Service a PUT request.

register

public void register()

Register the weblet with the WebService.

service

public virtual void service(WebReq req, WebRes res)

Service the specified request. Default implementation routes to get(), head(), post(), put(), or delete().

unregister

public void unregister()

Remove this weblet from the WebService.