[
https://issues.apache.org/jira/browse/FTPSERVER-225?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12652987#action_12652987
]
Niklas Gustavsson commented on FTPSERVER-225:
---------------------------------------------
> I can get Listener and UserManager objects from the FtpServerContext. But I
> can't get the FtpServerContext object from the FtpServer object I created (It
> was possible in
> 1.0.0-M3 version), I have to cast the FtpServer object to DefaultFtpServer,
> and use a private API.
> I think it would be in the public API.
This is on purpose, the context is very powerful and therefore hard to manage
and ensure thread safety, therefore it's been moved to the internal API. You
can of course use it, but beware of the potential problems.
> Moreover, the easiest way to create a user is to instantiate the BaseUser
> class, which is in the private API.
> I would like to be able to create users from the public API (maybe through a
> factory).
Agreed, this is a known limitation. We should have a factory for creating
users. Maybe not until after 1.0.
> Also, classes implementing Authority (TransferRatePermission,
> WritePermission, ConcurrentLoginPermission) don't seem to be instantiatable
> through public API (I'm
> not sure it's really necessary, but I currently use "new
> TransferRatePermission(0, 0)" as authorities for users I create).
I have to think some more on this.
> NB: Isn't org.apache.ftpserver.listener.Listener class name is too generic?
We're trying to stablize the API right now, so it might be too late for a name
change for 1.0.
I'll schedule this issue for 1.1 if you don't mind? We're trying to focus on
getting 1.0 out at the moment.
> Missing entries in public API for embedded context
> --------------------------------------------------
>
> Key: FTPSERVER-225
> URL: https://issues.apache.org/jira/browse/FTPSERVER-225
> Project: FtpServer
> Issue Type: Wish
> Components: Core
> Affects Versions: 1.0.0-M4
> Reporter: Olivier Lourdais
> Priority: Minor
> Fix For: 1.1
>
>
> I use Apache FTP Server embedded in an application. From this application, I
> have to:
> - create and delete FTP users on the fly,
> - be able to stop a FTP connection (and any associated data connection) from
> the server side.
> I can get Listener and UserManager objects from the FtpServerContext. But I
> can't get the FtpServerContext object from the FtpServer object I created (It
> was possible in 1.0.0-M3 version), I have to cast the FtpServer object to
> DefaultFtpServer, and use a private API.
> I think it would be in the public API.
> Moreover, the easiest way to create a user is to instantiate the BaseUser
> class, which is in the private API.
> I would like to be able to create users from the public API (maybe through a
> factory).
> Also, classes implementing Authority (TransferRatePermission,
> WritePermission, ConcurrentLoginPermission) don't seem to be instantiatable
> through public API (I'm not sure it's really necessary, but I currently use
> "new TransferRatePermission(0, 0)" as authorities for users I create).
> NB: Isn't org.apache.ftpserver.listener.Listener class name is too generic?
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.