org.apache.ftpserver.usermanager.impl
Class TransferRatePermission

java.lang.Object
  extended by org.apache.ftpserver.usermanager.impl.TransferRatePermission
All Implemented Interfaces:
Authority

public class TransferRatePermission
extends java.lang.Object
implements Authority

Internal class, do not use directly. The max upload rate permission

Version:
$Rev$, $Date$
Author:
The Apache MINA Project (dev@mina.apache.org)

Constructor Summary
TransferRatePermission(int maxDownloadRate, int maxUploadRate)
           
 
Method Summary
 AuthorizationRequest authorize(AuthorizationRequest request)
          Authorize an AuthorizationRequest.
 boolean canAuthorize(AuthorizationRequest request)
          Indicates weather this Authority can authorize a certain request
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TransferRatePermission

public TransferRatePermission(int maxDownloadRate,
                              int maxUploadRate)
Method Detail

authorize

public AuthorizationRequest authorize(AuthorizationRequest request)
Description copied from interface: Authority
Authorize an AuthorizationRequest.

Specified by:
authorize in interface Authority
Parameters:
request - The AuthorizationRequest
Returns:
Returns a populated AuthorizationRequest as long as If Authority.canAuthorize(AuthorizationRequest) returns true for the AuthorizationRequest, otherwise returns null. Authority.canAuthorize(AuthorizationRequest) should always be checked before calling this method.
See Also:
Authority.authorize(AuthorizationRequest)

canAuthorize

public boolean canAuthorize(AuthorizationRequest request)
Description copied from interface: Authority
Indicates weather this Authority can authorize a certain request

Specified by:
canAuthorize in interface Authority
Parameters:
request - The request to authorize
Returns:
True if the request can be authorized by this Authority
See Also:
Authority.canAuthorize(AuthorizationRequest)


Copyright © 2003-2011 Apache Software Foundation. All Rights Reserved.