com.noelios.restlet.component
Class ClientRoute

java.lang.Object
  extended by org.restlet.Uniform
      extended by org.restlet.Restlet
          extended by org.restlet.Filter
              extended by org.restlet.Route
                  extended by com.noelios.restlet.component.ClientRoute

public class ClientRoute
extends Route

Router scorer based on a target client connector.

Author:
Jerome Louvel (contact@noelios.com)

Constructor Summary
ClientRoute(Router router, Client target)
          Constructor.
 
Method Summary
 Client getClient()
          Returns the target client.
 float score(Request request, Response response)
          Returns the score for a given call (between 0 and 1.0).
 void setNext(Client next)
          Sets the next client.
 
Methods inherited from class org.restlet.Route
beforeHandle, extractCookie, extractEntity, extractQuery, getRouter, getTemplate, setTemplate, validate
 
Methods inherited from class org.restlet.Filter
afterHandle, doHandle, getNext, handle, hasNext, setNext, setNext
 
Methods inherited from class org.restlet.Restlet
getContext, getLogger, init, isStarted, isStopped, setContext, start, stop
 
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

ClientRoute

public ClientRoute(Router router,
                   Client target)
Constructor.

Parameters:
router - The parent router.
target - The target client.
Method Detail

getClient

public Client getClient()
Returns the target client.

Returns:
The target client.

setNext

public void setNext(Client next)
Sets the next client.

Parameters:
next - The next client.

score

public float score(Request request,
                   Response response)
Returns the score for a given call (between 0 and 1.0).

Overrides:
score in class Route
Parameters:
request - The request to score.
response - The response to score.
Returns:
The score for a given call (between 0 and 1.0).


Copyright © 2005-2007 Noelios Consulting.