org.apache.ftpserver.usermanager.impl
Class TransferRatePermission
java.lang.Object
org.apache.ftpserver.usermanager.impl.TransferRatePermission
- All Implemented Interfaces:
- Authority
public class TransferRatePermission
- extends Object
- implements Authority
Internal class, do not use directly.
The max upload rate permission
- Author:
- Apache MINA Project
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
TransferRatePermission
public TransferRatePermission(int maxDownloadRate,
int maxUploadRate)
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.