net.ubisoa.common
Class BaseRouter

java.lang.Object
  extended by org.restlet.Restlet
      extended by org.restlet.routing.Router
          extended by net.ubisoa.common.BaseRouter
All Implemented Interfaces:
Uniform
Direct Known Subclasses:
PushRouter

public class BaseRouter
extends Router

The base router for all UbiSOA's services.

Contains a FileResource attached to /{type}/{filename} and a FaviconResource attached to /favicon.ico.

Example: Creating a base router for a Restful application.

public Restlet createInboundRoot() { Router router = new BaseRouter(getContext()); router.attach(…); … return router;
}

Author:
Edgardo Avilés-López

Field Summary
 
Fields inherited from class org.restlet.routing.Router
BEST, CUSTOM, FIRST, LAST, MODE_BEST_MATCH, MODE_CUSTOM, MODE_FIRST_MATCH, MODE_LAST_MATCH, MODE_NEXT_MATCH, MODE_RANDOM_MATCH, NEXT, RANDOM
 
Constructor Summary
BaseRouter(Context context)
          The main constructor.
 
Method Summary
 
Methods inherited from class org.restlet.routing.Router
attach, attach, attach, attach, attach, attach, attachDefault, attachDefault, createFinder, createRoute, createRoute, detach, detach, doHandle, getCustom, getDefaultMatchingMode, getDefaultMatchingQuery, getDefaultMatchQuery, getDefaultRoute, getFinderClass, getMatchingMode, getMaxAttempts, getNext, getRequiredScore, getRetryDelay, getRoutes, getRoutingMode, handle, logRoute, setDefaultMatchingMode, setDefaultMatchingQuery, setDefaultMatchQuery, setDefaultRoute, setFinderClass, setMaxAttempts, setRequiredScore, setRetryDelay, setRoutes, setRoutingMode, start, stop
 
Methods inherited from class org.restlet.Restlet
finalize, getApplication, getAuthor, getContext, getDescription, getLogger, getName, getOwner, isStarted, isStopped, setAuthor, setContext, setDescription, setName, setOwner
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BaseRouter

public BaseRouter(Context context)
The main constructor. This is where the FileResource and FaviconResource are attached respectively to /{type}/{filename} and /favicon.ico.

Parameters:
context - The Restlet context.