All Packages  Class Hierarchy  This Package  Previous  Next  Index
  Class w3c.jigsaw.filters.AccessLimitFilter
java.lang.Object
   |
   +----w3c.tools.store.AttributeHolder
           |
           +----w3c.tools.store.Resource
                   |
                   +----w3c.tools.store.ResourceFrame
                           |
                           +----w3c.jigsaw.resources.ResourceFilter
                                   |
                                   +----w3c.jigsaw.filters.AccessLimitFilter
  -  public class AccessLimitFilter
  -  extends ResourceFilter
This filters limit the simultaneous accesses to its target resource.
   
  -   ATTR_LIMIT ATTR_LIMIT
-   Attribute index - The maximum allowed simultaneous accesses.
  
-   ATTR_TIMEOUT ATTR_TIMEOUT
-   Attribute index - The time to wait for the lock (if limit reached)
  
-   count count
-   Current number of requets that have reached the target.
   
  -   AccessLimitFilter() AccessLimitFilter()
-  
   
  -   getLimit() getLimit()
-   Get the maximum number of allowed simultaneous accesses.
  
-   getTimeout() getTimeout()
-   Get the timeout before we send back an error.
  
-   ingoingFilter(Request) ingoingFilter(Request)
-   Count number of hits to the page, block when limit exceeded.
  
-   outgoingFilter(Request, Reply) outgoingFilter(Request, Reply)
-   Notify that someone has exit the target entity.
   
 ATTR_LIMIT
ATTR_LIMIT
 protected static int ATTR_LIMIT
  -  Attribute index - The maximum allowed simultaneous accesses.
 
 ATTR_TIMEOUT
ATTR_TIMEOUT
 protected static int ATTR_TIMEOUT
  -  Attribute index - The time to wait for the lock (if limit reached)
 
 count
count
 protected int count
  -  Current number of requets that have reached the target.
 
   
 AccessLimitFilter
AccessLimitFilter
 public AccessLimitFilter()
   
 getLimit
getLimit
 public int getLimit()
  -  Get the maximum number of allowed simultaneous accesses.
 
 getTimeout
getTimeout
 public int getTimeout()
  -  Get the timeout before we send back an error.
 A client will wait only for this duration before being thrown an
 error.
 
 ingoingFilter
ingoingFilter
 public synchronized Reply ingoingFilter(Request request) throws HTTPException
  -  Count number of hits to the page, block when limit exceeded.
 This filter maintains the actual number of hits to its target. When this
 number exceeds the predefined limit, it blocks the caller until some
 othre thread exits the target.
   
- 
    -  Parameters:
    
-  request - The request to be handled.
    
-  Overrides:
    
-  ingoingFilter in class ResourceFilter
  
 
 outgoingFilter
outgoingFilter
 public synchronized Reply outgoingFilter(Request request,
                                          Reply reply) throws HTTPException
  -  Notify that someone has exit the target entity.
 This method decrements the actual number of hits to the filter's
 target, and notify any awaiting threads that they can now enter
 safely.
   
- 
    -  Parameters:
    
-  request - The request being handled.
    -  reply - The reply to be emited.
    
-  Overrides:
    
-  outgoingFilter in class ResourceFilter
  
 
All Packages  Class Hierarchy  This Package  Previous  Next  Index