org.objectweb.proactive.core.body.request
Interface RequestProcessor

All Known Implementing Classes:
Service.FlushingServeOldestRequestProcessor, Service.FlushingServeYoungestRequestProcessor, Service.ServingRequestProcessor

public interface RequestProcessor

A class implementing this interface can process requests.

It implements one method processRequest that takes a request and returns an int saying whether the request shall be removed and served, removed without serving or kept.

It is used as a call back interface allowing a custom processing on request stored in the request queue.

Typically it can be used to serve requests stored in a request queue in a custom manner. When doing custom processing, a request should be REMOVED from the queue BEFORE serving.

Since:
ProActive 0.9
Version:
1.0, 2001/10/23
Author:
ProActive Team

Field Summary
static int KEEP
          Constant indicating that the request shall be kept.
static int REMOVE
          Constant indicating that the request shall removed without being served.
static int REMOVE_AND_SERVE
          Constant indicating that the request shall be removed and served.
 
Method Summary
 int processRequest(Request request)
          Returns one of the constants indicating the desired treatment for the request.
 

Field Detail

REMOVE_AND_SERVE

public static final int REMOVE_AND_SERVE
Constant indicating that the request shall be removed and served.

See Also:
Constant Field Values

REMOVE

public static final int REMOVE
Constant indicating that the request shall removed without being served.

See Also:
Constant Field Values

KEEP

public static final int KEEP
Constant indicating that the request shall be kept.

See Also:
Constant Field Values
Method Detail

processRequest

public int processRequest(Request request)
Returns one of the constants indicating the desired treatment for the request.

Parameters:
request - the request to process
Returns:
one of the three constants above


Copyright © April 2004 INRIA All Rights Reserved.