org.locomotive.module.base
Class BaseHandler

java.lang.Object
  |
  +--org.locomotive.loco.handler.GenericHandler
        |
        +--org.locomotive.module.base.BaseHandler

public class BaseHandler
extends GenericHandler

The base handler is an example handler that accompanies the Loco. It provides a simple login/authentication module, a user manager/viewer, and a sample registration. It can be used to validate the Loco server privledged user for viewing and manipulating the Loco via the core Loco ServerHandler. By default, the base handler is available using the module name "base" in the HandlerRoutingTable.


Fields inherited from class org.locomotive.loco.handler.GenericHandler
already_displayed_page, conn, DEBUG, ERROR, form_data, handler_uri, hd, NORMAL, session, steam_vars, url_tokens, user, WARNING
 
Constructor Summary
BaseHandler()
           
 
Method Summary
 void handleRequest(HandlerData hd_in)
          main entry point called by RequestManager for each new request.
 boolean init(Log log)
          The required init method, as defined in org.locomotive.loco.Handler.
static void sendErrorMsg(HandlerData hd, java.lang.String msg)
          Deprecated. in favor of Loco.sendErrorMsg
 boolean shutdown(Log log)
          The required shutdown method, as defined in org.locomotive.loco.Handler.
 
Methods inherited from class org.locomotive.loco.handler.GenericHandler
displayPage, displayString, handleException, log, logEvent, sayBadURL
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BaseHandler

public BaseHandler()
Method Detail

handleRequest

public void handleRequest(HandlerData hd_in)
main entry point called by RequestManager for each new request.
Overrides:
handleRequest in class GenericHandler

sendErrorMsg

public static void sendErrorMsg(HandlerData hd,
                                java.lang.String msg)
Deprecated. in favor of Loco.sendErrorMsg

sends a generic error message back to the client.
Parameters:
hd - - the HandlerData as passed into the Handler
msg - - the error message code to be sent

init

public boolean init(Log log)
The required init method, as defined in org.locomotive.loco.Handler. In this example, we don't actually need to do anything.
Overrides:
init in class GenericHandler
See Also:
org.locomotive.loco.Handler#init

shutdown

public boolean shutdown(Log log)
The required shutdown method, as defined in org.locomotive.loco.Handler. In this example, we don't actually need to do anything.
Overrides:
shutdown in class GenericHandler
See Also:
org.locomotive.loco.Handler#shutdown